Bug#637182: llvm-gcc-4.5: undefined reference to `memset' error when compiling Wine with optimization (regression)

Austin English austinenglish at gmail.com
Tue Aug 9 09:25:51 UTC 2011


On Tue, Aug 9, 2011 at 02:23, Sylvestre Ledru <sylvestre at debian.org> wrote:
> Le mardi 09 août 2011 à 02:20 -0700, Austin English a écrit :
>> On Tue, Aug 9, 2011 at 02:14, Sylvestre Ledru <sylvestre at debian.org> wrote:
>> > Le mardi 09 août 2011 à 02:17 -0700, Austin English a écrit :
>> >
>> >> The bug appears when linking, not sure how to get a reduced testcase for that, please advise if needed.
>> > Well, if I don't have a simple testcase to reproduce it, I am not sure I
>> > can do anything here for you ...
>> > ,
>> > Sorry
>> > Sylvestre
>>
>> Well, by that I meant a simplified C testcase :). I can provide the
>> objects themselves. Here you go:
>> llvm-gcc -o wine-preloader -static -nostartfiles -nodefaultlibs
>> -Wl,-Ttext=0x7c400000 preloader.o libwine_port.a
>>
>> to reproduce the bug.
> I would not say no to a C testcase (I run 64 bits).
> Anyway, does it work when you remove this option
> -nodefaultlibs
> ?

No, but does give more info:

austin at debian:~/637182$ llvm-gcc -o wine-preloader -static
-nodefaultlibs -Wl,-Ttext=0x7c400000 preloader.o libwine_port.a
preloader.o: In function `_start':
preloader.c:(.text+0x0): multiple definition of `_start'
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
0 has invalid symbol index 12
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
1 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
2 has invalid symbol index 2
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
3 has invalid symbol index 2
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
4 has invalid symbol index 12
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
5 has invalid symbol index 14
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
6 has invalid symbol index 14
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
7 has invalid symbol index 14
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
8 has invalid symbol index 2
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
9 has invalid symbol index 2
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
10 has invalid symbol index 13
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
11 has invalid symbol index 14
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
12 has invalid symbol index 14
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
13 has invalid symbol index 14
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
14 has invalid symbol index 14
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
15 has invalid symbol index 14
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
16 has invalid symbol index 14
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
17 has invalid symbol index 14
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
18 has invalid symbol index 14
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
19 has invalid symbol index 14
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
20 has invalid symbol index 14
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
21 has invalid symbol index 14
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_info): relocation
22 has invalid symbol index 22
/usr/bin/ld.bfd.real:
/usr/lib/debug/usr/lib/i386-linux-gnu/crt1.o(.debug_line): relocation
0 has invalid symbol index 2
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.5.3/../../../crt1.o:/build/buildd-eglibc_2.13-10-i386-ZRJwLW/eglibc-2.13/csu/../sysdeps/i386/elf/start.S:119:
first defined here
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.5.3/../../../crt1.o: In
function `_start':
(.text+0xc): undefined reference to `__libc_csu_fini'
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.5.3/../../../crt1.o: In
function `_start':
(.text+0x11): undefined reference to `__libc_csu_init'
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.5.3/../../../crt1.o: In
function `_start':
(.text+0x18): undefined reference to `main'
/usr/lib/i386-linux-gnu/gcc/i486-linux-gnu/4.5.3/../../../crt1.o: In
function `_start':
(.text+0x1d): undefined reference to `__libc_start_main'
preloader.o: In function `set_process_name':
preloader.c:(.text+0x5e7): undefined reference to `memset'
preloader.o: In function `map_so_lib':
preloader.c:(.text+0xadc): undefined reference to `memset'
collect2: ld returned 1 exit status

-- 
-Austin





More information about the Pkg-llvm-team mailing list