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]

[PATCH] [BZ #16512] Strip @@GLIBC_.* and @@GCC_.* from symbol names


"readelf -r" may dislay symbol version in dynamic relocation:

Relocation section '.rel.plt' at offset 0x1726c contains 12 entries:
 Offset     Info    Type            Sym.Value  Sym. Name
 4180100c  0003e107 R_386_JUMP_SLOT   4177cea0  _Unwind_Find_FDE@@GCC_3.0
...

This patch strip the default symbol versions, @@GLIBC_.* and @@GCC_.*,
from symbol names in dynamic relocations so that the output will match
the expected localplt.data which doesnt contain symbol versions.  OK
to install?

Thanks.

H.J.
---
 ChangeLog                  | 6 ++++++
 scripts/check-localplt.awk | 5 ++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index b54386f..b3a8d50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2014-01-29  H.J. Lu  <hongjiu.lu@intel.com>
 
+	[BZ #16512]
+	* scripts/check-localplt.awk: Strip @@GLIBC_.* and @@GCC_.* from
+	symbol names.
+
+2014-01-29  H.J. Lu  <hongjiu.lu@intel.com>
+
 	[BZ #16510]
 	* sysdeps/x86/fpu/bits/mathinline.h: Check __SSE2_MATH__ instead
 	of __x86_64__ when disabling x87 inline functions.
diff --git a/scripts/check-localplt.awk b/scripts/check-localplt.awk
index bb1b912..8dcd06c 100644
--- a/scripts/check-localplt.awk
+++ b/scripts/check-localplt.awk
@@ -30,7 +30,10 @@ NF != 2 {
 }
 
 {
-  key = $1 " " $2
+  name = $2;
+  sub(/@@GLIBC_.*/, "", name);
+  sub(/@@GCC_.*/, "", name);
+  key = $1 " " name
   if (key in accept) {
     delete accept[key]
   } else {
-- 
1.8.5.3


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