From 8f5e83fb735af978b99ea6e22574560bf667d1d6 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 8 Aug 2017 07:15:29 +0930 Subject: [PATCH] More support for ld --hash-style in the ld testsuite These were discovered when running --hash-style=gnu as default, the previous batch being --hash-style=both. * testsuite/ld-aarch64/ifunc-1-local.d: Run ld with --hash-style=sysv. * testsuite/ld-aarch64/ifunc-2-local.d: Likewise. * testsuite/ld-aarch64/ifunc-3a.d: Likewise. * testsuite/ld-frv/fdpic-pie-1.d: Likewise. * testsuite/ld-frv/fdpic-pie-2.d: Likewise. * testsuite/ld-frv/fdpic-pie-7.d: Likewise. * testsuite/ld-frv/fdpic-pie-8.d: Likewise. * testsuite/ld-arm/arm-elf.exp: Add --hash-style=sysv to "Using Thumb lib by another lib" test's ld options. * testsuite/ld-elf/note-3.l: Match .gnu.hash. * testsuite/ld-elf/note-3.t: Add .gnu.hash output section. --- ld/ChangeLog | 14 ++++++++++++++ ld/testsuite/ld-aarch64/ifunc-1-local.d | 2 +- ld/testsuite/ld-aarch64/ifunc-2-local.d | 2 +- ld/testsuite/ld-aarch64/ifunc-3a.d | 2 +- ld/testsuite/ld-arm/arm-elf.exp | 4 +++- ld/testsuite/ld-elf/note-3.l | 2 +- ld/testsuite/ld-elf/note-3.t | 1 + ld/testsuite/ld-frv/fdpic-pie-1.d | 2 +- ld/testsuite/ld-frv/fdpic-pie-2.d | 2 +- ld/testsuite/ld-frv/fdpic-pie-7.d | 2 +- ld/testsuite/ld-frv/fdpic-pie-8.d | 2 +- 11 files changed, 26 insertions(+), 9 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 96dc608db24..9af0eeb949e 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,17 @@ +2017-08-08 Alan Modra + + * testsuite/ld-aarch64/ifunc-1-local.d: Run ld with --hash-style=sysv. + * testsuite/ld-aarch64/ifunc-2-local.d: Likewise. + * testsuite/ld-aarch64/ifunc-3a.d: Likewise. + * testsuite/ld-frv/fdpic-pie-1.d: Likewise. + * testsuite/ld-frv/fdpic-pie-2.d: Likewise. + * testsuite/ld-frv/fdpic-pie-7.d: Likewise. + * testsuite/ld-frv/fdpic-pie-8.d: Likewise. + * testsuite/ld-arm/arm-elf.exp: Add --hash-style=sysv to "Using + Thumb lib by another lib" test's ld options. + * testsuite/ld-elf/note-3.l: Match .gnu.hash. + * testsuite/ld-elf/note-3.t: Add .gnu.hash output section. + 2017-08-07 H.J. Lu * testsuite/ld-elf/pr21903.s (start): Removed. diff --git a/ld/testsuite/ld-aarch64/ifunc-1-local.d b/ld/testsuite/ld-aarch64/ifunc-1-local.d index 0e307e0493a..779d973cb1b 100644 --- a/ld/testsuite/ld-aarch64/ifunc-1-local.d +++ b/ld/testsuite/ld-aarch64/ifunc-1-local.d @@ -1,4 +1,4 @@ -#ld: -shared +#ld: -shared --hash-style=sysv #objdump: -dw #target: aarch64*-*-* diff --git a/ld/testsuite/ld-aarch64/ifunc-2-local.d b/ld/testsuite/ld-aarch64/ifunc-2-local.d index 103f3e440b3..27710bca045 100644 --- a/ld/testsuite/ld-aarch64/ifunc-2-local.d +++ b/ld/testsuite/ld-aarch64/ifunc-2-local.d @@ -1,4 +1,4 @@ -#ld: -shared +#ld: -shared --hash-style=sysv #objdump: -dw #target: aarch64*-*-* diff --git a/ld/testsuite/ld-aarch64/ifunc-3a.d b/ld/testsuite/ld-aarch64/ifunc-3a.d index 4f61a8bee3b..3e19b335c59 100644 --- a/ld/testsuite/ld-aarch64/ifunc-3a.d +++ b/ld/testsuite/ld-aarch64/ifunc-3a.d @@ -1,5 +1,5 @@ #source: ifunc-3.s -#ld: -shared +#ld: -shared --hash-style=sysv #objdump: -dw #target: aarch64*-*-* diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp index 8bab9d8edbb..3b33522076e 100644 --- a/ld/testsuite/ld-arm/arm-elf.exp +++ b/ld/testsuite/ld-arm/arm-elf.exp @@ -333,7 +333,9 @@ set armelftests_nonacl { {{objdump -fdw mixed-app-v5.d} {objdump -Rw mixed-app.r} {readelf -Ds mixed-app.sym}} "mixed-app-v5"} - {"Using Thumb lib by another lib" "-shared tmpdir/mixed-lib.so" "" "" {use-thumb-lib.s} + {"Using Thumb lib by another lib" + "-shared --hash-style=sysv tmpdir/mixed-lib.so" "" + "" {use-thumb-lib.s} {{readelf -Ds use-thumb-lib.sym}} "use-thumb-lib.so"} {"TLS gnu shared library inlined trampoline" diff --git a/ld/testsuite/ld-elf/note-3.l b/ld/testsuite/ld-elf/note-3.l index 551ebaa795a..7e99bedc15b 100644 --- a/ld/testsuite/ld-elf/note-3.l +++ b/ld/testsuite/ld-elf/note-3.l @@ -1,2 +1,2 @@ -.*warning: section '.hash' is being made into a note +.*warning: section '(.gnu|).hash' is being made into a note .* diff --git a/ld/testsuite/ld-elf/note-3.t b/ld/testsuite/ld-elf/note-3.t index 13324ae5470..47f3fe1c95c 100644 --- a/ld/testsuite/ld-elf/note-3.t +++ b/ld/testsuite/ld-elf/note-3.t @@ -14,6 +14,7 @@ SECTIONS treated as notes... */ .hash : { *(.hash) } + .gnu.hash : { *(.gnu.hash) } .dynstr : { *(.dynstr) } .dynsym : { *(.dynsym) } diff --git a/ld/testsuite/ld-frv/fdpic-pie-1.d b/ld/testsuite/ld-frv/fdpic-pie-1.d index 5369d076032..6b40e74b369 100644 --- a/ld/testsuite/ld-frv/fdpic-pie-1.d +++ b/ld/testsuite/ld-frv/fdpic-pie-1.d @@ -1,7 +1,7 @@ #name: FRV uClinux PIC relocs to local symbols, pie linking #source: fdpic1.s #objdump: -DR -j .text -j .data -j .got -j .plt -#ld: -pie +#ld: -pie --hash-style=sysv .*: file format elf.*frv.* diff --git a/ld/testsuite/ld-frv/fdpic-pie-2.d b/ld/testsuite/ld-frv/fdpic-pie-2.d index 40c15325b40..9e06d8f251f 100644 --- a/ld/testsuite/ld-frv/fdpic-pie-2.d +++ b/ld/testsuite/ld-frv/fdpic-pie-2.d @@ -1,7 +1,7 @@ #name: FRV uClinux PIC relocs to global symbols, pie linking #source: fdpic2.s #objdump: -DR -j .text -j .data -j .got -j .plt -#ld: -pie +#ld: -pie --hash-style=sysv .*: file format elf.*frv.* diff --git a/ld/testsuite/ld-frv/fdpic-pie-7.d b/ld/testsuite/ld-frv/fdpic-pie-7.d index 7eceec2ea64..3968c0bf3e8 100644 --- a/ld/testsuite/ld-frv/fdpic-pie-7.d +++ b/ld/testsuite/ld-frv/fdpic-pie-7.d @@ -1,7 +1,7 @@ #name: FRV uClinux PIC relocs to local symbols with addends, pie linking #source: fdpic7.s #objdump: -DR -j .text -j .data -j .got -j .plt -#ld: -pie +#ld: -pie --hash-style=sysv .*: file format elf.*frv.* diff --git a/ld/testsuite/ld-frv/fdpic-pie-8.d b/ld/testsuite/ld-frv/fdpic-pie-8.d index 8f7c34411bd..62f456b7481 100644 --- a/ld/testsuite/ld-frv/fdpic-pie-8.d +++ b/ld/testsuite/ld-frv/fdpic-pie-8.d @@ -1,7 +1,7 @@ #name: FRV uClinux PIC relocs to global symbols with addends, pie linking #source: fdpic8.s #objdump: -DR -j .text -j .data -j .got -j .plt -#ld: -pie +#ld: -pie --hash-style=sysv .*: file format elf.*frv.*