From: kaf24@firebug.cl.cam.ac.uk Date: Wed, 13 Sep 2006 13:24:42 +0000 (+0100) Subject: Better PIC code production: Using #pragma GCC visibility, *all* X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15658^2~53^2~8 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=deb051deec5a5355e49f98a0427dac036c3c7471;p=xen.git Better PIC code production: Using #pragma GCC visibility, *all* data references benefit, not just the ones to objects defined in the same translation unit. However, as this now is a header file change, detection logic cannot be used as nicely, so I guess we want to keep the previous change and add this one on top. Signed-off-by: Jan Beulich --- diff --git a/xen/include/xen/compiler.h b/xen/include/xen/compiler.h index 2cf74900dc..d70833efb5 100644 --- a/xen/include/xen/compiler.h +++ b/xen/include/xen/compiler.h @@ -35,6 +35,11 @@ #define offsetof(a,b) ((unsigned long)&(((a *)0)->b)) #endif +#if defined(__x86_64__) && (__GNUC__ > 3) +/* Results in more efficient PIC code (no indirections through GOT or PLT). */ +#pragma GCC visibility push(hidden) +#endif + /* This macro obfuscates arithmetic on a variable address so that gcc shouldn't recognize the original var, and make assumptions about it */ /*