From d3d9c95aefded7716d037e241f9d23a1cccab45a Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 14 Oct 2015 05:59:50 -0700 Subject: Support PLT and GOT references in local PIC check Linker in binutils 2.26 and newer generate GOT references instead PLT references when -z now is passed to linker. We need to extend scripts/localplt.awk to allow PLT or GOT references. [BZ #19007] * scripts/localplt.awk: Also allow GOT references. * sysdeps/unix/sysv/linux/i386/localplt.data: Mark _Unwind_Find_FDE, calloc, memalign, realloc and __libc_memalign with "+ REL R_386_GLOB_DAT". * sysdeps/x86_64/localplt.data: Mark calloc, memalign, realloc and __libc_memalign with "+ RELA R_X86_64_GLOB_DAT". --- scripts/localplt.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/localplt.awk b/scripts/localplt.awk index f75b3b427b..beaa342922 100644 --- a/scripts/localplt.awk +++ b/scripts/localplt.awk @@ -7,7 +7,7 @@ BEGIN { result = 0 } FILENAME != lastfile { - if (lastfile && jmprel_offset == 0) { + if (lastfile && jmprel_offset == 0 && rela_offset == 0 && rel_offset == 0) { print FILENAME ": *** failed to find expected output (readelf -WSdr)"; result = 2; } -- cgit 1.4.1