This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] sparc: Prevent all but undef weak syms from becoming dynamic.
>> Prevent sparc backend making symbols dynamic unless they are
>> undefined
>> weak. By doing so, stop dynamic linker confusing these symbols with
>> library symbols.
>>
>> Your patch seems to fix all the currently failing tests of the LD
>> testsuite in sparc64:
>>
>> FAIL: Run indirect5 3
>> FAIL: Run indirect5 4
>> FAIL: Run indirect6 3
>> FAIL: Run indirect6 4
>> FAIL: indirect5c dynsym
>> FAIL: indirect5d dynsym
>> FAIL: indirect6c dynsym
>> FAIL: indirect6d dynsym
>> FAIL: Run pr2404 with PIE
>> FAIL: Run pr2404 with PIE (-z now)
>>
>> These all pass now. Which is great! :)
>>
>> However, it also triggers a regression:
>>
>> gcc -B/home/jemarch/couts2/binutils-gdb/build/ld/tmpdir/ld/
>> -L/usr/local/sparc64-unknown-linux-gnu/lib64 \
>> -L/usr/local/lib64 -L/lib64 -L/usr/lib64
>> -L/usr/local/sparc64-unknown-linux-gnu/lib -L/usr/local/lib -L/lib\
>> -L/usr/lib -o tmpdir/ifunc-mainpn
>> -L/home/jemarch/couts2/binutils-gdb/ld/testsuite/ld-ifunc -pie
>> -Wl,-z,\
>> now -Wl,--no-as-needed tmpdir/libifunc-libn.so tmpdir/ifunc-main.o
>> Executing on host: sh -c {gcc
>> -B/home/jemarch/couts2/binutils-gdb/build/ld/tmpdir/ld/
>> -L/usr/local/sparc6\
>> 4-unknown-linux-gnu/lib64 -L/usr/local/lib64 -L/lib64 -L/usr/lib64
>> -L/usr/local/sparc64-unknown-linux-gnu/l\
>> ib -L/usr/local/lib -L/lib -L/usr/lib -o tmpdir/ifunc-mainpn
>> -L/home/jemarch/couts2/binutils-gdb/ld/tests\
>> uite/ld-ifunc -pie -Wl,-z,now -Wl,--no-as-needed
>> tmpdir/libifunc-libn.so tmpdir/ifunc-main.o 2>&1} /dev/nu\
>> ll ld.tmp (timeout = 300)
>> spawn [open ...]^M
>> Running: tmpdir/ifunc-mainpn > tmpdir/ifunc-mainpn.out
>> child killed: segmentation violation
>> FAIL: Run ifunc-main with PIE (-z now)
>>
>> Could you please take a look?
>> Thanks!
>
> Hi Jose,
>
> Thank you for the review and bringing the issue to my attention! I
> am looking into it.
>
> Egeyar
The patch is updated and attached. It fixes ld's test cases that fail
on sparc. No regressions are revealed by made check. Please take a
look.
Applied.
Thank you very mucho!