[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Better PIC code production: Using #pragma GCC visibility, *all*



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 29bc328cd8d39b79349e004323de2b57ab90d94b
# Parent  21dc71840bc0b5fab570c7125a857e5d55e10d01
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 <jbeulich@xxxxxxxxxx>
---
 xen/include/xen/compiler.h |    5 +++++
 1 files changed, 5 insertions(+)

diff -r 21dc71840bc0 -r 29bc328cd8d3 xen/include/xen/compiler.h
--- a/xen/include/xen/compiler.h        Wed Sep 13 14:12:28 2006 +0100
+++ b/xen/include/xen/compiler.h        Wed Sep 13 14:24:42 2006 +0100
@@ -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 */
 /*

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.