This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH 08/12] De-PLTize __stack_chk_fail internal calls within libc.so.


> On 15 Dec 2016, Florian Weimer spake thusly:
>
>> * Florian Weimer:
>>
>>> I think this means removing any definition of a C function definition 
>>> called __stack_chk_fail_local from libc.so, and instead use a strong 
>>> alias from __stack_chk_fail to __stack_chk_fail_local to define the 
>>> symbol.  The alias will not incorporate a PLT reference.  If you look at 
>>> include/libc-symbols.h, strong_alias and hidden_def are quite similar.
>>
>> It may also be a good idea to switch to a different symbol for
>> __stack_chk_fail_local because this collides with the name GCC uses on
>> some architectures for a similar purpose.  Or is this the intent here?
>
> That's the point. On targets where __stack_chk_fail_local is called
> (e.g. x86-32), we're not generating the calls to this thing: GCC is.
> We cannot pick a different name.

Ahh, and GCC does not synthesize a local definition, so there is no
actual collision.

Then the strong_alias approach should work for libc.so.
libc_nonshared.a still needs a hidden function definition, of course.


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