|
From: Tom H. <to...@co...> - 2005-08-26 16:43:00
|
In message <200...@ac...>
Julian Seward <js...@ac...> wrote:
> sewardj@feenicks:~/VgASPACEM/aspacem/memcheck$
> (cd ../coregrind && make) \
> && gcc -Wmissing-prototypes -Winline -Wall -Wshadow -O -g -m32 \
> -mpreferred-stack-boundary=2 -O2 -Wno-long-long -o valgrind_memcheck \
> -static ../coregrind/libcoregrind.a \
> -Wl,-defsym,valt_load_address=0xb0000000 \
> -Wl,-T,../valt_load_address.lds mac_leakcheck.o \
> mac_malloc_wrappers.o mc_main.o mac_shared.o mc_translate.o \
> -nodefaultlibs -lgcc
>
> /usr/lib/gcc-lib/i586-suse-linux/3.3.4/../../../crt1.o(.text+0xc): In function
> `_start':
> ../sysdeps/i386/elf/start.S:109: undefined reference to `__libc_csu_fini'
> /usr/lib/gcc-lib/i586-suse-linux/3.3.4/../../../crt1.o(.text+0x11):../sysdeps/i386/elf/start.S:110:
> undefined reference to `__libc_csu_init'
> /usr/lib/gcc-lib/i586-suse-linux/3.3.4/../../../crt1.o(.text+0x1d):../sysdeps/i386/elf/start.S:119:
> undefined reference to `__libc_start_main'
> collect2: ld returned 1 exit status
I think you need -nostartfiles as well. At the moment it is linking
crt1.o which is trying to start the C library (it pushs the address
of main and that of those init and fini functions and then calls
__libc_start_main to start the C library.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|