This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [LD][Testsuite] Add --no-dynamic-linker option to dynamic-1 rdynamic-1 test case.


On Mon, Jun 12, 2017 at 9:58 AM, Renlin Li <renlin.li@foss.arm.com> wrote:
> Hi H.J.,
>
> Thanks for your hint.
>
> the check_shared_lib_support returns TRUE for arm-none-eabi target triple.
> That's why those test gets executed.
>
> However, my arm-none-eabi toolchain is configured to disable shared. So by
> default the binary created by this toolchain is statically linked.

Please update check_shared_lib_support for your target.

> There is a mismatch here.
>
> Regards,
> Renlin
>
>
> On 12/06/17 13:33, H.J. Lu wrote:
>>
>> On Mon, Jun 12, 2017 at 3:13 AM, Renlin Li <renlin.li@foss.arm.com> wrote:
>>>
>>> Hi all,
>>>
>>> After the change here:
>>>
>>> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=3c5fce9bc29b216af7d10f8d6e4d8c3f11a48359
>>>
>>> dynamic-1 rdynamic-1 start to fail.
>>>
>>> It is required to have --no-dynamic-linker together with -static
>>> -E/--dynamic-list before adding dynamic symbol table to static
>>> executable.
>>
>>
>> But they aren't static executables:
>>
>> [hjl@gnu-tools-1 build-x86_64-linux]$ ldd ld/tmpdir/dynamic-1
>> linux-vdso.so.1 (0x00007ffdbcd6e000)
>> libc.so.6 => /lib64/libc.so.6 (0x00007f086348a000)
>> /lib64/ld-linux-x86-64.so.2 (0x0000555e4a89c000)
>> [hjl@gnu-tools-1 build-x86_64-linux]$ ldd ld/tmpdir/rdynamic-1
>> linux-vdso.so.1 (0x00007fff041b2000)
>> libc.so.6 => /lib64/libc.so.6 (0x00007fa502db2000)
>> /lib64/ld-linux-x86-64.so.2 (0x0000558a968c9000)
>> [hjl@gnu-tools-1 build-x86_64-linux]$
>>
>> Why are they static on your machine?
>>
>>> This patch add "--no-dynamic-linker" to the testes. Okay to commit?
>>>
>>> Regards,
>>> Renlin
>>>
>>>
>>> ld/ChangeLog:
>>>
>>> 2017-06-12  Renlin Li  <renlin.li@arm.com>
>>>
>>>          * testsuite/ld-elf/shared.exp (build_tests): Add
>>> --no-dynamic-linker
>>> option to
>>>          rdynamic-1 and dynamic-1 tests.
>>
>>
>>
>>
>



-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]