This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Use comdat instead of .gnu.linkonce for i386 setup pic register
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 16 Feb 2017 16:03:09 -0200
- Subject: Re: [PATCH] Use comdat instead of .gnu.linkonce for i386 setup pic register
- Authentication-results: sourceware.org; auth=none
- References: <1483991301-14420-1-git-send-email-adhemerval.zanella@linaro.org> <CAKCAbMidrovZx6rPLq6dn2kNwig9jC8_JwBJdsFaXNAu5gYZrA@mail.gmail.com> <cd6b3a09-e115-9828-4eaa-0c6534dcbd00@linaro.org> <4c598a9b-f9ba-498b-2277-d735f7a4c188@linaro.org> <5c81373f-bf5d-ed1d-6112-691a126146f8@linaro.org>
Ping.
On 24/01/2017 18:14, Adhemerval Zanella wrote:
>
>
> On 17/01/2017 08:24, Adhemerval Zanella wrote:
>>
>>
>> On 10/01/2017 12:02, Adhemerval Zanella wrote:
>>>
>>>
>>> On 09/01/2017 18:26, Zack Weinberg wrote:
>>>> On Mon, Jan 9, 2017 at 2:48 PM, Adhemerval Zanella
>>>> <adhemerval.zanella@linaro.org> wrote:
>>>>> GCC has moved from using .gnu.linkonce for i386 setup pic register with
>>>>> minimum current version (as for binutils minimum binutils that support
>>>>> comdat). This patch replace linkonce usage by comdat.
>>>>
>>>> Is this change compatible with older GCC/binutils versions as well as
>>>> the new ones?
>>>>
>>>> zw
>>>>
>>>
>>> I am trying to pinpoint when binutils added comdat support for i686 and
>>> this [1] is the oldest thread I found.
>>>
>>> I also checked with some ancient binutils version and version older than
>>> 2.16 I see:
>>>
>>> test.o: In function `__x86.get_pc_thunk.bx':
>>> test.o(.text.__x86.get_pc_thunk.bx+0x0): multiple definition of `__x86.get_pc_thunk.bx'
>>> /usr/lib/gcc/x86_64-linux-gnu/5/../../../i386-linux-gnu/crti.o(.gnu.linkonce.t.__x86.get_pc_thunk.bx+0x0): first defined here
>>>
>>> Which seems that the can not handle either comdat at all or the mix of
>>> linkonce and comdat. For binutils 2.16.1 and forward I am getting a
>>> different issue trying to link a binary with and more recent ctri.o
>>> (unrecognized relocation (0x2b) in section `.init', which is R_386_GOT32X
>>> and old binutils won't generate it anyway).
>>>
>>> So I think that either unlikely someone will use an older binutils than
>>> the one used to glibc and even this scenario may fail with some issue
>>> as the R_386_GOT32X. Also, 2.16.1 is quite old and not really supported
>>> (glibc itself required 2.22).
>>>
>>> [1] https://gcc.gnu.org/ml/gcc/2004-05/msg00030.html
>>>
>>
>> Ping.
>>
>
> Ping.
>