This is the mail archive of the 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: RFC: GCC plugin to find encrypted function pointer calls in glibc

On 04/30/2016 06:20 PM, Aldy Hernandez wrote:
On 04/30/2016 12:12 PM, Florian Weimer wrote:
On 04/30/2016 03:21 AM, Carlos O'Donell wrote:

(1) static inline wrapper with function attribute:

For a representative set of architectures, say x86_64, i686, ppc64,
s390x, aarch64, and arm, does a 4.7 or newer compiler do as good a
job with a static inline function as it does with the macro that
evaluates to a bare assembly?

We need both because the inline function cannot be type-generic.  There
would have to be a macro wrapping the inline function, with an
appropriate cast to preserve the function pointer type.

Correct, but it's localized in one file per architecture, right?  So,
not a big problem?

Agreed, I don't see a problem with that. Just the inline function would have to be architecture-specific. These days, we probably don't even need custom inline assembly anymore (just the architecture-specified way to access thread-local state).


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