51f0aa
commit 9637d8a253493be471d9a71640e91349f7a8a050
51f0aa
Author: H.J. Lu <hjl.tools@gmail.com>
51f0aa
Date:   Wed Jul 29 11:57:54 2015 -0700
51f0aa
51f0aa
    Extend local PLT reference check
51f0aa
51f0aa
    On x86, linker in binutils 2.26 and newer consolidates R_*_JUMP_SLOT with
51f0aa
    R_*_GLOB_DAT relocation against the same symbol.  This patch extends
51f0aa
    local PLT reference check to support alternate relocations.
51f0aa
51f0aa
        [BZ #18078]
51f0aa
        * scripts/check-localplt.awk: Support alternate relocations.
51f0aa
        * scripts/localplt.awk: Also check relocations in DT_RELA/DT_REL
51f0aa
        sections.
51f0aa
        * sysdeps/unix/sysv/linux/i386/localplt.data: Mark free and
51f0aa
        malloc entries with + REL R_386_GLOB_DAT.
51f0aa
        * sysdeps/x86_64/localplt.data: New file.
51f0aa
51f0aa
51f0aa
commit da53d6dbc28d2a90d6e14dd661e68611c3b741cf
51f0aa
Author: Carlos O'Donell <carlos@redhat.com>
51f0aa
Date:   Thu Nov 6 15:48:44 2014 -0500
51f0aa
51f0aa
    Run check-localpltk/textrel/execstack over ld.so.
51f0aa
51f0aa
    For maximum paranoia we run ld.so through the normal set
51f0aa
    of tests for all of the shared libraries. This includes
51f0aa
    running ld.so through check-localplt, check-textrel, and
51f0aa
    check-execstack. While none of these should trigger any
51f0aa
    failures given the way ld.so is built, it might possibly
51f0aa
    fail if a developer does something wrong. This paranoia
51f0aa
    was triggered by a discussion over the use of __strcpy
51f0aa
    vs. strcpy [1] and if the symbol could leak and use the
51f0aa
    libc.so version.
51f0aa
51f0aa
    The check-localplt test fails right away because localplt.data
51f0aa
    needs updating for all arches. By default we add 6 new symbols:
51f0aa
    __tls_get_addr, __libc_memalign, malloc, calloc, realloc and
51f0aa
    free. Other machines like i386, power, and s390 require some
51f0aa
    different symbol sets e.g. ___tls_get_addr vs. __tls_get_addr
51f0aa
    for i386.
51f0aa
51f0aa
commit d3d9c95aefded7716d037e241f9d23a1cccab45a
51f0aa
Author: H.J. Lu <hjl.tools@gmail.com>
51f0aa
Date:   Wed Oct 14 05:59:50 2015 -0700
51f0aa
51f0aa
    Support PLT and GOT references in local PIC check
51f0aa
51f0aa
commit a0af371c25ac1f215cf0db64e54cbb9a1b51f78c
51f0aa
Author: Alan Modra <amodra@gmail.com>
51f0aa
Date:   Fri Feb 20 15:23:28 2015 +1030
51f0aa
51f0aa
    Fix localplt test breakage with new readelf
51f0aa
51f0aa
    Since 2014-11-24 binutils git commit bb4d2ac2, readelf has appended
51f0aa
    the symbol version to symbols shown in reloc dumps.
51f0aa
51f0aa
        [BZ #16512]
51f0aa
        * scripts/localplt.awk: Strip off symbol version.
51f0aa
        * NEWS: Mention bug fix.
51f0aa
51f0aa
diff -Nrup a/elf/Makefile b/elf/Makefile
51f0aa
--- a/elf/Makefile	2017-10-22 09:16:02.451399056 -0400
51f0aa
+++ b/elf/Makefile	2017-10-22 09:16:39.217285466 -0400
51f0aa
@@ -915,7 +915,7 @@ $(objpfx)tst-pie1: $(objpfx)tst-piemod1.
51f0aa
 ifeq (yes,$(build-shared))
51f0aa
 tests: $(objpfx)check-textrel.out $(objpfx)check-execstack.out
51f0aa
 
51f0aa
-all-built-dso := $(common-objpfx)libc.so \
51f0aa
+all-built-dso := $(common-objpfx)elf/ld.so $(common-objpfx)libc.so \
51f0aa
 		 $(filter-out $(common-objpfx)linkobj/libc.so, \
51f0aa
 			      $(sort $(wildcard $(addprefix $(common-objpfx), \
51f0aa
 							    */lib*.so \
51f0aa
@@ -974,6 +974,7 @@ tests: $(objpfx)check-localplt.out
51f0aa
 
51f0aa
 localplt-built-dso := $(addprefix $(common-objpfx),\
51f0aa
 				  libc.so \
51f0aa
+                                  elf/ld.so \
51f0aa
 				  math/libm.so \
51f0aa
 				  rt/librt.so \
51f0aa
 				  dlfcn/libdl.so \
51f0aa
diff -Nrup a/ports/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data b/ports/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data
51f0aa
--- a/ports/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data	2017-10-22 09:16:01.379402341 -0400
51f0aa
+++ b/ports/sysdeps/unix/sysv/linux/aarch64/nptl/localplt.data	2017-10-22 09:16:39.217285466 -0400
51f0aa
@@ -12,3 +12,15 @@ libm.so: matherr
51f0aa
 libm.so: __signbit
51f0aa
 libm.so: __signbitf
51f0aa
 libm.so: __signbitl
51f0aa
+# The dynamic loader needs __tls_get_addr for TLS.
51f0aa
+ld.so: __tls_get_addr
51f0aa
+# The dynamic loader uses __libc_memalign internally to allocate aligned
51f0aa
+# TLS storage. The other malloc family of functions are expected to allow
51f0aa
+# user symbol interposition.
51f0aa
+ld.so: __libc_memalign + RELA R_X86_64_GLOB_DAT
51f0aa
+# The main malloc is interposed into the dynamic linker, for
51f0aa
+# allocations after the initial link (when dlopen is used).
51f0aa
+ld.so: malloc
51f0aa
+ld.so: calloc
51f0aa
+ld.so: realloc
51f0aa
+ld.so: free
51f0aa
diff -Nrup a/scripts/check-localplt.awk b/scripts/check-localplt.awk
51f0aa
--- a/scripts/check-localplt.awk	2012-12-24 22:02:13.000000000 -0500
51f0aa
+++ b/scripts/check-localplt.awk	2017-10-22 09:16:39.218285463 -0400
51f0aa
@@ -3,9 +3,16 @@
51f0aa
 # Each line is either a comment starting with # or it looks like:
51f0aa
 #	libfoo.so: function
51f0aa
 # or
51f0aa
+#      libfoo.so: function + {RELA|REL} RELOC
51f0aa
+# or
51f0aa
 #	libfoo.so: function ?
51f0aa
 # The latter means that a PLT entry for function is optional in libfoo.so.
51f0aa
 # The former means one is required.
51f0aa
+# The first entry means that one is required.
51f0aa
+# The second entry means that one is required and relocation may also be
51f0aa
+# {RELA|REL} RELOC.
51f0aa
+# The third entry means that a PLT entry for function is optional in
51f0aa
+# libfoo.so.
51f0aa
 # The second file argument is - and this (stdin) receives the output
51f0aa
 # of the check-localplt program.
51f0aa
 
51f0aa
@@ -14,7 +21,10 @@ BEGIN { result = 0 }
51f0aa
 FILENAME != "-" && /^#/ { next }
51f0aa
 
51f0aa
 FILENAME != "-" {
51f0aa
-  if (NF != 2 && !(NF == 3 && $3 == "?")) {
51f0aa
+  if (NF == 5 && $3 == "+" && ($4 == "RELA" || $4 == "REL")) {
51f0aa
+    accept_type[$1 " " $2] = $4;
51f0aa
+    accept_reloc[$1 " " $2] = $5;
51f0aa
+  } else if (NF != 2 && !(NF == 3 && $3 == "?")) {
51f0aa
     printf "%s:%d: bad data line: %s\n", FILENAME, FNR, $0 > "/dev/stderr";
51f0aa
     result = 2;
51f0aa
   } else {
51f0aa
@@ -23,7 +33,7 @@ FILENAME != "-" {
51f0aa
   next;
51f0aa
 }
51f0aa
 
51f0aa
-NF != 2 {
51f0aa
+NF != 2 && !(NF == 4 && ($3 == "RELA" || $3 == "REL")) {
51f0aa
   print "Unexpected output from check-localplt:", $0 > "/dev/stderr";
51f0aa
   result = 2;
51f0aa
   next
51f0aa
@@ -31,7 +41,23 @@ NF != 2 {
51f0aa
 
51f0aa
 {
51f0aa
   key = $1 " " $2
51f0aa
-  if (key in accept) {
51f0aa
+  if ($3 == "RELA" || $3 == "REL") {
51f0aa
+    # Entries like:
51f0aa
+    # libc.so: free + RELA R_X86_64_GLOB_DAT
51f0aa
+    # may be ignored.
51f0aa
+    if (key in accept_type && accept_type[key] == $3 && accept_reloc[key] == $4) {
51f0aa
+      # Match
51f0aa
+      # libc.so: free + RELA R_X86_64_GLOB_DAT
51f0aa
+      delete accept_type[key]
51f0aa
+    }
51f0aa
+  } else if (NF == 2 && key in accept_reloc) {
51f0aa
+    # Match
51f0aa
+    # libc.so: free
51f0aa
+    # against
51f0aa
+    # libc.so: free + RELA R_X86_64_GLOB_DAT
51f0aa
+    if (key in accept_type)
51f0aa
+      delete accept_type[key]
51f0aa
+  } else if (key in accept) {
51f0aa
     delete accept[key]
51f0aa
   } else {
51f0aa
     print "Extra PLT reference:", $0;
51f0aa
@@ -49,5 +75,11 @@ END {
51f0aa
     }
51f0aa
   }
51f0aa
 
51f0aa
+  for (key in accept_type) {
51f0aa
+    # It's mandatory.
51f0aa
+    print "Missing required PLT or " accept_reloc[key] " reference:", key;
51f0aa
+    result = 1;
51f0aa
+  }
51f0aa
+
51f0aa
   exit(result);
51f0aa
 }
51f0aa
diff -Nrup a/scripts/localplt.awk b/scripts/localplt.awk
51f0aa
--- a/scripts/localplt.awk	2012-12-24 22:02:13.000000000 -0500
51f0aa
+++ b/scripts/localplt.awk	2017-10-22 09:16:39.218285463 -0400
51f0aa
@@ -7,12 +7,14 @@
51f0aa
 BEGIN { result = 0 }
51f0aa
 
51f0aa
 FILENAME != lastfile {
51f0aa
-  if (lastfile && jmprel_offset == 0) {
51f0aa
+  if (lastfile && jmprel_offset == 0 && rela_offset == 0 && rel_offset == 0) {
51f0aa
     print FILENAME ": *** failed to find expected output (readelf -WSdr)";
51f0aa
     result = 2;
51f0aa
   }
51f0aa
   lastfile = FILENAME;
51f0aa
   jmprel_offset = 0;
51f0aa
+  rela_offset = 0;
51f0aa
+  rel_offset = 0;
51f0aa
   delete section_offset_by_address;
51f0aa
 }
51f0aa
 
51f0aa
@@ -32,9 +34,39 @@ $1 == "Offset" && $2 == "Info" { in_relo
51f0aa
 NF == 0 { in_relocs = 0 }
51f0aa
 
51f0aa
 in_relocs && relocs_offset == jmprel_offset && NF >= 5 {
51f0aa
-  symval = strtonum("0x" $4);
51f0aa
-  if (symval != 0)
51f0aa
-    print whatfile, $5
51f0aa
+  # Relocations against GNU_IFUNC symbols are not shown as an hexadecimal
51f0aa
+  # value, but rather as the resolver symbol followed by ().
51f0aa
+  if ($4 ~ /\(\)/) {
51f0aa
+    print whatfile, gensub(/@.*/, "", "g", $5)
51f0aa
+  } else {
51f0aa
+    symval = strtonum("0x" $4);
51f0aa
+    if (symval != 0)
51f0aa
+      print whatfile, gensub(/@.*/, "", "g", $5)
51f0aa
+  }
51f0aa
+}
51f0aa
+
51f0aa
+in_relocs && relocs_offset == rela_offset && NF >= 5 {
51f0aa
+  # Relocations against GNU_IFUNC symbols are not shown as an hexadecimal
51f0aa
+  # value, but rather as the resolver symbol followed by ().
51f0aa
+  if ($4 ~ /\(\)/) {
51f0aa
+    print whatfile, gensub(/@.*/, "", "g", $5), "RELA", $3
51f0aa
+  } else {
51f0aa
+    symval = strtonum("0x" $4);
51f0aa
+    if (symval != 0)
51f0aa
+      print whatfile, gensub(/@.*/, "", "g", $5), "RELA", $3
51f0aa
+  }
51f0aa
+}
51f0aa
+
51f0aa
+in_relocs && relocs_offset == rel_offset && NF >= 5 {
51f0aa
+  # Relocations against GNU_IFUNC symbols are not shown as an hexadecimal
51f0aa
+  # value, but rather as the resolver symbol followed by ().
51f0aa
+  if ($4 ~ /\(\)/) {
51f0aa
+    print whatfile, gensub(/@.*/, "", "g", $5), "REL", $3
51f0aa
+  } else {
51f0aa
+    symval = strtonum("0x" $4);
51f0aa
+    if (symval != 0)
51f0aa
+      print whatfile, gensub(/@.*/, "", "g", $5), "REL", $3
51f0aa
+  }
51f0aa
 }
51f0aa
 
51f0aa
 in_relocs { next }
51f0aa
@@ -56,4 +88,25 @@ $2 == "(JMPREL)" {
51f0aa
   next
51f0aa
 }
51f0aa
 
51f0aa
+$2 == "(RELA)" {
51f0aa
+  rela_addr = strtonum($3);
51f0aa
+  if (rela_addr in section_offset_by_address) {
51f0aa
+    rela_offset = section_offset_by_address[rela_addr];
51f0aa
+  } else {
51f0aa
+    print FILENAME ": *** DT_RELA does not match any section's address";
51f0aa
+    result = 2;
51f0aa
+  }
51f0aa
+  next
51f0aa
+}
51f0aa
+
51f0aa
+$2 == "(REL)" {
51f0aa
+  rel_addr = strtonum($3);
51f0aa
+  if (rel_addr in section_offset_by_address) {
51f0aa
+    rel_offset = section_offset_by_address[rel_addr];
51f0aa
+  } else {
51f0aa
+    print FILENAME ": *** DT_REL does not match any section's address";
51f0aa
+    result = 2;
51f0aa
+  }
51f0aa
+  next
51f0aa
+}
51f0aa
 END { exit(result) }
51f0aa
diff -Nrup a/sysdeps/generic/localplt.data b/sysdeps/generic/localplt.data
51f0aa
--- a/sysdeps/generic/localplt.data	2012-12-24 22:02:13.000000000 -0500
51f0aa
+++ b/sysdeps/generic/localplt.data	2017-10-22 09:18:03.383023954 -0400
51f0aa
@@ -7,3 +7,9 @@ libc.so: malloc
51f0aa
 libc.so: memalign
51f0aa
 libc.so: realloc
51f0aa
 libm.so: matherr
51f0aa
+# The main malloc is interposed into the dynamic linker, for
51f0aa
+# allocations after the initial link (when dlopen is used).
51f0aa
+ld.so: malloc
51f0aa
+ld.so: calloc
51f0aa
+ld.so: realloc
51f0aa
+ld.so: free
51f0aa
diff -Nrup a/sysdeps/unix/sysv/linux/i386/nptl/localplt.data b/sysdeps/unix/sysv/linux/i386/nptl/localplt.data
51f0aa
--- a/sysdeps/unix/sysv/linux/i386/nptl/localplt.data	2012-12-24 22:02:13.000000000 -0500
51f0aa
+++ b/sysdeps/unix/sysv/linux/i386/nptl/localplt.data	2017-10-22 09:16:39.218285463 -0400
51f0aa
@@ -1,7 +1,21 @@
51f0aa
-libc.so: _Unwind_Find_FDE
51f0aa
-libc.so: calloc
51f0aa
-libc.so: free
51f0aa
-libc.so: malloc
51f0aa
-libc.so: memalign
51f0aa
-libc.so: realloc
51f0aa
-libm.so: matherr
51f0aa
+# Linker in binutils 2.26 and newer consolidates R_X86_64_JUMP_SLOT
51f0aa
+# relocation with R_386_GLOB_DAT relocation against the same symbol.
51f0aa
+libc.so: _Unwind_Find_FDE + REL R_386_GLOB_DAT
51f0aa
+libc.so: calloc + REL R_386_GLOB_DAT
51f0aa
+libc.so: free + REL R_386_GLOB_DAT
51f0aa
+libc.so: malloc + REL R_386_GLOB_DAT
51f0aa
+libc.so: memalign + REL R_386_GLOB_DAT
51f0aa
+libc.so: realloc + REL R_386_GLOB_DAT
51f0aa
+libm.so: matherr + REL R_386_GLOB_DAT
51f0aa
+# The dynamic loader uses __libc_memalign internally to allocate aligned
51f0aa
+# TLS storage. The other malloc family of functions are expected to allow
51f0aa
+# user symbol interposition.
51f0aa
+ld.so: __libc_memalign + REL R_386_GLOB_DAT
51f0aa
+# The dynamic loader needs __tls_get_addr for TLS.
51f0aa
+ld.so: ___tls_get_addr + REL R_386_GLOB_DAT
51f0aa
+# The main malloc is interposed into the dynamic linker, for
51f0aa
+# allocations after the initial link (when dlopen is used).
51f0aa
+ld.so: malloc + REL R_386_GLOB_DAT
51f0aa
+ld.so: calloc + REL R_386_GLOB_DAT
51f0aa
+ld.so: realloc + REL R_386_GLOB_DAT
51f0aa
+ld.so: free + REL R_386_GLOB_DAT
51f0aa
diff -Nrup a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/localplt.data
51f0aa
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/localplt.data	2012-12-24 22:02:13.000000000 -0500
51f0aa
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/nptl/localplt.data	2017-10-22 09:16:39.218285463 -0400
51f0aa
@@ -5,3 +5,13 @@ libc.so: malloc
51f0aa
 libc.so: memalign
51f0aa
 libc.so: realloc
51f0aa
 libm.so: matherr
51f0aa
+# The dynamic loader uses __libc_memalign internally to allocate aligned
51f0aa
+# TLS storage. The other malloc family of functions are expected to allow
51f0aa
+# user symbol interposition.
51f0aa
+ld.so: __libc_memalign
51f0aa
+# The main malloc is interposed into the dynamic linker, for
51f0aa
+# allocations after the initial link (when dlopen is used).
51f0aa
+ld.so: malloc
51f0aa
+ld.so: calloc
51f0aa
+ld.so: realloc
51f0aa
+ld.so: free
51f0aa
diff -Nrup a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/localplt.data b/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/localplt.data
51f0aa
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/localplt.data	2012-12-24 22:02:13.000000000 -0500
51f0aa
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/nptl/localplt.data	2017-10-22 09:16:39.218285463 -0400
51f0aa
@@ -4,3 +4,13 @@ libc.so: malloc
51f0aa
 libc.so: memalign
51f0aa
 libc.so: realloc
51f0aa
 libm.so: matherr
51f0aa
+# The dynamic loader uses __libc_memalign internally to allocate aligned
51f0aa
+# TLS storage. The other malloc family of functions are expected to allow
51f0aa
+# user symbol interposition.
51f0aa
+ld.so: __libc_memalign
51f0aa
+# The main malloc is interposed into the dynamic linker, for
51f0aa
+# allocations after the initial link (when dlopen is used).
51f0aa
+ld.so: malloc
51f0aa
+ld.so: calloc
51f0aa
+ld.so: realloc
51f0aa
+ld.so: free
51f0aa
diff -Nrup a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/localplt.data b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/localplt.data
51f0aa
--- a/sysdeps/unix/sysv/linux/s390/s390-32/nptl/localplt.data	2012-12-24 22:02:13.000000000 -0500
51f0aa
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/nptl/localplt.data	2017-10-22 09:16:39.219285460 -0400
51f0aa
@@ -5,3 +5,13 @@ libc.so: malloc
51f0aa
 libc.so: memalign
51f0aa
 libc.so: realloc
51f0aa
 libm.so: matherr
51f0aa
+# The dynamic loader uses __libc_memalign internally to allocate aligned
51f0aa
+# TLS storage. The other malloc family of functions are expected to allow
51f0aa
+# user symbol interposition.
51f0aa
+ld.so: __libc_memalign
51f0aa
+# The main malloc is interposed into the dynamic linker, for
51f0aa
+# allocations after the initial link (when dlopen is used).
51f0aa
+ld.so: malloc
51f0aa
+ld.so: calloc
51f0aa
+ld.so: realloc
51f0aa
+ld.so: free
51f0aa
diff -Nrup a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/localplt.data b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/localplt.data
51f0aa
--- a/sysdeps/unix/sysv/linux/s390/s390-64/nptl/localplt.data	2012-12-24 22:02:13.000000000 -0500
51f0aa
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/nptl/localplt.data	2017-10-22 09:16:39.219285460 -0400
51f0aa
@@ -5,3 +5,13 @@ libc.so: malloc
51f0aa
 libc.so: memalign
51f0aa
 libc.so: realloc
51f0aa
 libm.so: matherr
51f0aa
+# The dynamic loader uses __libc_memalign internally to allocate aligned
51f0aa
+# TLS storage. The other malloc family of functions are expected to allow
51f0aa
+# user symbol interposition.
51f0aa
+ld.so: __libc_memalign
51f0aa
+# The main malloc is interposed into the dynamic linker, for
51f0aa
+# allocations after the initial link (when dlopen is used).
51f0aa
+ld.so: malloc
51f0aa
+ld.so: calloc
51f0aa
+ld.so: realloc
51f0aa
+ld.so: free
51f0aa
diff -Nrup a/sysdeps/x86_64/nptl/localplt.data b/sysdeps/x86_64/nptl/localplt.data
51f0aa
--- a/sysdeps/x86_64/nptl/localplt.data	1969-12-31 19:00:00.000000000 -0500
51f0aa
+++ b/sysdeps/x86_64/nptl/localplt.data	2017-10-22 09:16:39.219285460 -0400
51f0aa
@@ -0,0 +1,23 @@
51f0aa
+# See scripts/check-localplt.awk for how this file is processed.
51f0aa
+# PLT use is required for the malloc family and for matherr because
51f0aa
+# users can define their own functions and have library internals call them.
51f0aa
+# Linker in binutils 2.26 and newer consolidates R_X86_64_JUMP_SLOT
51f0aa
+# relocation with R_X86_64_GLOB_DAT relocation against the same symbol.
51f0aa
+libc.so: calloc + RELA R_X86_64_GLOB_DAT
51f0aa
+libc.so: free + RELA R_X86_64_GLOB_DAT
51f0aa
+libc.so: malloc + RELA R_X86_64_GLOB_DAT
51f0aa
+libc.so: memalign + RELA R_X86_64_GLOB_DAT
51f0aa
+libc.so: realloc + RELA R_X86_64_GLOB_DAT
51f0aa
+libm.so: matherr + RELA R_X86_64_GLOB_DAT
51f0aa
+# The dynamic loader uses __libc_memalign internally to allocate aligned
51f0aa
+# TLS storage. The other malloc family of functions are expected to allow
51f0aa
+# user symbol interposition.
51f0aa
+ld.so: __libc_memalign + RELA R_X86_64_GLOB_DAT
51f0aa
+# The dynamic loader needs __tls_get_addr for TLS.
51f0aa
+ld.so: __tls_get_addr + RELA R_X86_64_GLOB_DAT
51f0aa
+# The main malloc is interposed into the dynamic linker, for
51f0aa
+# allocations after the initial link (when dlopen is used).
51f0aa
+ld.so: malloc + RELA R_X86_64_GLOB_DAT
51f0aa
+ld.so: calloc + RELA R_X86_64_GLOB_DAT
51f0aa
+ld.so: realloc + RELA R_X86_64_GLOB_DAT
51f0aa
+ld.so: free + RELA R_X86_64_GLOB_DAT