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][BZ 18960] setlocale.c: Mark *_used symbols as unaligned.


On 09/28/2015 02:22 PM, Rich Felker wrote:
>> It seems a bit like overkill right now though. I think just making the
>> value 16 with a comment will work.
> 
> Is there a reason this hack with absolute definitions is being used
> rather than just defining actual objects for the symbols to resolve to
> (or aliasing them to objects that already exist)? This approach would
> not require any ABI-specific knowledge.

Yes, exactly, I was just wondering this myself.

I think indeed we can just do away with the micro-optimization of using
the address as a flag and just allocate an object with a known value.

Keep in mind this is only for static linking, since that's the only time
NL_CURRENT_INDIRECT is defined.

In the dynamic linking case everything is loaded in the libc.so DSO at
load time, there is no way to avoid the overhead of handling all of the
categories.

Cheers,
Carlos.


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