aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-07-29 11:57:54 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-07-29 11:58:06 -0700
commit9637d8a253493be471d9a71640e91349f7a8a050 (patch)
tree75c20d5036504483c85fc60a52ec003a51b65b00 /sysdeps/x86_64/localplt.data
parentAdded runtime check for AVX vector math tests. (diff)
downloadglibc-9637d8a253493be471d9a71640e91349f7a8a050.tar.gz
glibc-9637d8a253493be471d9a71640e91349f7a8a050.tar.bz2
glibc-9637d8a253493be471d9a71640e91349f7a8a050.zip
Extend local PLT reference check
On x86, linker in binutils 2.26 and newer consolidates R_*_JUMP_SLOT with R_*_GLOB_DAT relocation against the same symbol. This patch extends local PLT reference check to support alternate relocations. [BZ #18078] * scripts/check-localplt.awk: Support alternate relocations. * scripts/localplt.awk: Also check relocations in DT_RELA/DT_REL sections. * sysdeps/unix/sysv/linux/i386/localplt.data: Mark free and malloc entries with + REL R_386_GLOB_DAT. * sysdeps/x86_64/localplt.data: New file.
Diffstat (limited to 'sysdeps/x86_64/localplt.data')
-rw-r--r--sysdeps/x86_64/localplt.data19
1 files changed, 19 insertions, 0 deletions
diff --git a/sysdeps/x86_64/localplt.data b/sysdeps/x86_64/localplt.data
new file mode 100644
index 0000000000..d140476dfe
--- /dev/null
+++ b/sysdeps/x86_64/localplt.data
@@ -0,0 +1,19 @@
+# See scripts/check-localplt.awk for how this file is processed.
+# PLT use is required for the malloc family and for matherr because
+# users can define their own functions and have library internals call them.
+# Linker in binutils 2.26 and newer consolidates R_X86_64_JUMP_SLOT
+# relocation with R_X86_64_GLOB_DAT relocation against the same symbol.
+libc.so: calloc
+libc.so: free + RELA R_X86_64_GLOB_DAT
+libc.so: malloc + RELA R_X86_64_GLOB_DAT
+libc.so: memalign
+libc.so: realloc
+libm.so: matherr
+# The dynamic loader uses __libc_memalign internally to allocate aligned
+# TLS storage. The other malloc family of functions are expected to allow
+# user symbol interposition.
+ld.so: __libc_memalign
+ld.so: malloc
+ld.so: calloc
+ld.so: realloc
+ld.so: free + RELA R_X86_64_GLOB_DAT