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] powerpc: New feature - HWCAP/HWCAP2 bits in the TCB


On Tue, Jun 09, 2015 at 04:48:10PM +0100, Szabolcs Nagy wrote:
> >> if hwcap is useful abi between compiler and libc
> >> then why is this done in a powerpc specific way?
> > 
> > Other platform are free use this technique.
> 
> i think this is not a sustainable approach for
> compiler abi extensions.
> 
> (it means juggling with magic offsets on the order
> of compilers * libcs * targets).
> 
> unfortunately accessing the ssp canary is already
> broken this way, i'm not sure what's a better abi,
> but it's probably worth thinking about one before
> the tcb code gets too messy.

For the canary I think it makes sense, even though it's ugly -- the
compiler has to generate a reference in every single function (for
'all' mode, or just most non-trivial functions in 'strong' mode).
That's much different from a feature (hwcap) that should only be used
at init-time and where, even if programmers did abuse it and use it
over and over at runtime, it's only going to be a small constant
overhead in a presumably medium to large sized function, and the cost
is only the need to setup the GOT register and load from the GOT,
anyway.

Rich


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