diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2022-01-05 07:12:03 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2022-01-12 06:04:51 -0800 |
commit | f2e37a5c7f8c8f761d2d86f2a69efe07503dc640 (patch) | |
tree | db77266086c3d28118e38e76830809fc4d668560 /ld/testsuite/ld-x86-64 | |
parent | 23cc1de50b006fa10e295bdb4455540f001515e9 (diff) | |
download | gdb-f2e37a5c7f8c8f761d2d86f2a69efe07503dc640.zip gdb-f2e37a5c7f8c8f761d2d86f2a69efe07503dc640.tar.gz gdb-f2e37a5c7f8c8f761d2d86f2a69efe07503dc640.tar.bz2 |
elf: Support DT_RELR in linker tests
Allow eabling and disabling DT_RELR in linker tests. Disable DT_RELR in
linker tests which don't expect DT_RELR in linker outputs.
binutils/
* testsuite/lib/binutils-common.exp (run_dump_test): Make
DT_RELR_LDFLAGS and NO_DT_RELR_LDFLAGS global.
ld/
* testsuite/config/default.exp (DT_RELR_LDFLAGS): New.
(DT_RELR_CC_LDFLAGS): Likewise.
(NO_DT_RELR_LDFLAGS): Likewise.
(NO_DT_RELR_CC_LDFLAGS): Likewise.
* testsuite/ld-elf/shared.exp: Pass $NO_DT_RELR_LDFLAGS to
linker for some tests.
* testsuite/ld-i386/export-class.exp: Likewise.
* testsuite/ld-i386/i386.exp: Likewise.
* testsuite/ld-i386/ibt-plt-2a.d: Pass $NO_DT_RELR_LDFLAGS to
linker.
* testsuite/ld-i386/ibt-plt-3a.d: Likewise.
* testsuite/ld-i386/ibt-plt-3c.d: Likewise.
* testsuite/ld-i386/pr26869.d: Likewise.
* testsuite/ld-i386/report-reloc-1.d: Likewise.
* testsuite/ld-ifunc/ifunc-2-i386-now.d: Likewise.
* testsuite/ld-ifunc/ifunc-2-local-i386-now.d: Likewise.
* testsuite/ld-ifunc/ifunc-2-local-x86-64-now.d: Likewise.
* testsuite/ld-ifunc/ifunc-2-x86-64-now.d: Likewise.
* testsuite/ld-ifunc/pr17154-x86-64.d: Likewise.
* testsuite/ld-x86-64/bnd-branch-1-now.d: Likewise.
* testsuite/ld-x86-64/bnd-ifunc-1-now.d: Likewise.
* testsuite/ld-x86-64/bnd-ifunc-2-now.d: Likewise.
* testsuite/ld-x86-64/bnd-ifunc-2.d: Likewise.
* testsuite/ld-x86-64/bnd-plt-1-now.d: Likewise.
* testsuite/ld-x86-64/bnd-plt-1.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-2a-x32.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-2a.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-3a-x32.d: Likewise.
* testsuite/ld-x86-64/ibt-plt-3a.d: Likewise.
* testsuite/ld-x86-64/ilp32-4.d: Likewise.
* testsuite/ld-x86-64/load1c.d: Likewise.
* testsuite/ld-x86-64/load1d.d: Likewise.
* testsuite/ld-x86-64/pr13082-2b.d: Likewise.
* testsuite/ld-x86-64/pr14207.d: Likewise.
* testsuite/ld-x86-64/pr18176.d: Likewise.
* testsuite/ld-x86-64/pr19162.d: Likewise.
* testsuite/ld-x86-64/pr19636-2d.d: Likewise.
* testsuite/ld-x86-64/pr19636-2l.d: Likewise.
* testsuite/ld-x86-64/pr20253-1d.d: Likewise.
* testsuite/ld-x86-64/pr20253-1f.d: Likewise.
* testsuite/ld-x86-64/pr20253-1j.d: Likewise.
* testsuite/ld-x86-64/pr20253-1l.d: Likewise.
* testsuite/ld-x86-64/report-reloc-1-x32.d: Likewise.
* testsuite/ld-x86-64/report-reloc-1.d: Likewise.
* testsuite/ld-x86-64/export-class.exp (x86_64_export_class_test):
Pass $NO_DT_RELR_LDFLAGS to linker.
* testsuite/ld-x86-64/x86-64.exp: Pass $NO_DT_RELR_LDFLAGS to
linker for some tests.
Diffstat (limited to 'ld/testsuite/ld-x86-64')
27 files changed, 70 insertions, 48 deletions
diff --git a/ld/testsuite/ld-x86-64/bnd-branch-1-now.d b/ld/testsuite/ld-x86-64/bnd-branch-1-now.d index b7bc4e5..b1bcea3 100644 --- a/ld/testsuite/ld-x86-64/bnd-branch-1-now.d +++ b/ld/testsuite/ld-x86-64/bnd-branch-1-now.d @@ -1,6 +1,6 @@ #source: bnd-branch-1.s -mx86-used-note=no #as: --64 -#ld: -z now -shared -melf_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -z now -shared -melf_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/bnd-ifunc-1-now.d b/ld/testsuite/ld-x86-64/bnd-ifunc-1-now.d index 15ecfe1..86ba30a 100644 --- a/ld/testsuite/ld-x86-64/bnd-ifunc-1-now.d +++ b/ld/testsuite/ld-x86-64/bnd-ifunc-1-now.d @@ -1,6 +1,6 @@ #source: bnd-ifunc-1.s #as: --64 -madd-bnd-prefix -mx86-used-note=no -#ld: -z now -shared -melf_x86_64 -z bndplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -z now -shared -melf_x86_64 -z bndplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/bnd-ifunc-2-now.d b/ld/testsuite/ld-x86-64/bnd-ifunc-2-now.d index 211d72d..fa7ec07 100644 --- a/ld/testsuite/ld-x86-64/bnd-ifunc-2-now.d +++ b/ld/testsuite/ld-x86-64/bnd-ifunc-2-now.d @@ -1,6 +1,6 @@ #source: bnd-ifunc-2.s #as: --64 -madd-bnd-prefix -mx86-used-note=no -#ld: -z now -shared -melf_x86_64 -z bndplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -z now -shared -melf_x86_64 -z bndplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/bnd-ifunc-2.d b/ld/testsuite/ld-x86-64/bnd-ifunc-2.d index f80ba15..36534b1 100644 --- a/ld/testsuite/ld-x86-64/bnd-ifunc-2.d +++ b/ld/testsuite/ld-x86-64/bnd-ifunc-2.d @@ -1,5 +1,5 @@ #as: --64 -madd-bnd-prefix -mx86-used-note=no -#ld: -shared -melf_x86_64 -z bndplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -shared -melf_x86_64 -z bndplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw #... diff --git a/ld/testsuite/ld-x86-64/bnd-plt-1-now.d b/ld/testsuite/ld-x86-64/bnd-plt-1-now.d index 24e2821..47289a0 100644 --- a/ld/testsuite/ld-x86-64/bnd-plt-1-now.d +++ b/ld/testsuite/ld-x86-64/bnd-plt-1-now.d @@ -1,6 +1,6 @@ #source: bnd-branch-1.s #as: --64 -mx86-used-note=no -#ld: -z now -shared -melf_x86_64 -z bndplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -z now -shared -melf_x86_64 -z bndplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/bnd-plt-1.d b/ld/testsuite/ld-x86-64/bnd-plt-1.d index 0df3255..f047da8 100644 --- a/ld/testsuite/ld-x86-64/bnd-plt-1.d +++ b/ld/testsuite/ld-x86-64/bnd-plt-1.d @@ -1,6 +1,6 @@ #source: bnd-branch-1.s #as: --64 -mx86-used-note=no -#ld: -shared -melf_x86_64 -z bndplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -shared -melf_x86_64 -z bndplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/export-class.exp b/ld/testsuite/ld-x86-64/export-class.exp index 26896d1..14c2d24 100644 --- a/ld/testsuite/ld-x86-64/export-class.exp +++ b/ld/testsuite/ld-x86-64/export-class.exp @@ -31,6 +31,7 @@ if { ![istarget x86_64*-*-linux*] } { } proc x86_64_export_class_test { abi flag emul } { + global NO_DT_RELR_LDFLAGS set testname "x86-64 $abi symbol export class test" @@ -75,7 +76,7 @@ proc x86_64_export_class_test { abi flag emul } { run_ld_link_tests [list \ [list \ "$testname (final shared object)" \ - "$LDFLAGS -shared -Tdata=0x12340000 tmpdir/x86-64-$abi-export-class-ref-r.o tmpdir/x86-64-$abi-export-class-lib.so" "" \ + "$LDFLAGS $NO_DT_RELR_LDFLAGS -shared -Tdata=0x12340000 tmpdir/x86-64-$abi-export-class-ref-r.o tmpdir/x86-64-$abi-export-class-lib.so" "" \ "$AFLAGS" \ { ../ld-elf/export-class-dep.s ../ld-elf/export-class-def.s } \ [list \ diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d index a19cece..23e31e6 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2a-x32.d @@ -1,6 +1,6 @@ #source: ibt-plt-2.s #as: --x32 -#ld: -shared -m elf32_x86_64 -z ibtplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -shared -m elf32_x86_64 -z ibtplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/ibt-plt-2a.d b/ld/testsuite/ld-x86-64/ibt-plt-2a.d index 9278592..adbbf62 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-2a.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-2a.d @@ -1,6 +1,6 @@ #source: ibt-plt-2.s #as: --64 -defsym __64_bit__=1 -#ld: -shared -m elf_x86_64 -z ibtplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -shared -m elf_x86_64 -z ibtplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d b/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d index d6f8bb3..f52b1cc 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3a-x32.d @@ -1,6 +1,6 @@ #source: ibt-plt-3.s #as: --x32 -#ld: -shared -m elf32_x86_64 -z ibtplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -shared -m elf32_x86_64 -z ibtplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/ibt-plt-3a.d b/ld/testsuite/ld-x86-64/ibt-plt-3a.d index 9c15ed4..8bd8851 100644 --- a/ld/testsuite/ld-x86-64/ibt-plt-3a.d +++ b/ld/testsuite/ld-x86-64/ibt-plt-3a.d @@ -1,6 +1,6 @@ #source: ibt-plt-3.s #as: --64 -defsym __64_bit__=1 -#ld: -shared -m elf_x86_64 -z ibtplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -shared -m elf_x86_64 -z ibtplt --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/ilp32-4.d b/ld/testsuite/ld-x86-64/ilp32-4.d index 34be012..ad5c9cd 100644 --- a/ld/testsuite/ld-x86-64/ilp32-4.d +++ b/ld/testsuite/ld-x86-64/ilp32-4.d @@ -1,5 +1,5 @@ #as: --x32 -#ld: -m elf32_x86_64 -shared --no-ld-generated-unwind-info --hash-style=sysv +#ld: -m elf32_x86_64 -shared --no-ld-generated-unwind-info --hash-style=sysv $NO_DT_RELR_LDFLAGS #readelf: -d -S --wide #target: x86_64-*-linux* diff --git a/ld/testsuite/ld-x86-64/load1c.d b/ld/testsuite/ld-x86-64/load1c.d index db9c69f..7404c70 100644 --- a/ld/testsuite/ld-x86-64/load1c.d +++ b/ld/testsuite/ld-x86-64/load1c.d @@ -1,6 +1,6 @@ #source: load1.s #as: --64 -#ld: -shared -melf_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -shared -melf_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/load1d.d b/ld/testsuite/ld-x86-64/load1d.d index 7ccae53..1b474a3 100644 --- a/ld/testsuite/ld-x86-64/load1d.d +++ b/ld/testsuite/ld-x86-64/load1d.d @@ -1,6 +1,6 @@ #source: load1.s #as: --x32 -#ld: -shared -melf32_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -shared -melf32_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/pr13082-2b.d b/ld/testsuite/ld-x86-64/pr13082-2b.d index c218eaf..71c44fc 100644 --- a/ld/testsuite/ld-x86-64/pr13082-2b.d +++ b/ld/testsuite/ld-x86-64/pr13082-2b.d @@ -1,7 +1,7 @@ #source: pr13082-2.s #name: PR ld/13082-2 (b) #as: --x32 -#ld: -pie -melf32_x86_64 +#ld: -pie -melf32_x86_64 $NO_DT_RELR_LDFLAGS #readelf: -r --wide Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 1 entry: diff --git a/ld/testsuite/ld-x86-64/pr14207.d b/ld/testsuite/ld-x86-64/pr14207.d index f330600..e3af361 100644 --- a/ld/testsuite/ld-x86-64/pr14207.d +++ b/ld/testsuite/ld-x86-64/pr14207.d @@ -1,6 +1,6 @@ #name: PR ld/14207 #as: --64 -#ld: -melf_x86_64 -shared -z relro -z now --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -melf_x86_64 -shared -z relro -z now --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #readelf: -l --wide #target: x86_64-*-linux* diff --git a/ld/testsuite/ld-x86-64/pr18176.d b/ld/testsuite/ld-x86-64/pr18176.d index 4e3ad9f..a99ff15 100644 --- a/ld/testsuite/ld-x86-64/pr18176.d +++ b/ld/testsuite/ld-x86-64/pr18176.d @@ -1,6 +1,6 @@ #name: PR ld/18176 #as: --64 -#ld: -melf_x86_64 -shared -z relro -T pr18176.t -z max-page-size=0x200000 -z common-page-size=0x1000 +#ld: -melf_x86_64 -shared -z relro -T pr18176.t -z max-page-size=0x200000 -z common-page-size=0x1000 $NO_DT_RELR_LDFLAGS #readelf: -l --wide #target: x86_64-*-linux* diff --git a/ld/testsuite/ld-x86-64/pr19162.d b/ld/testsuite/ld-x86-64/pr19162.d index 2d51dab..f458853 100644 --- a/ld/testsuite/ld-x86-64/pr19162.d +++ b/ld/testsuite/ld-x86-64/pr19162.d @@ -1,7 +1,7 @@ #source: pr19162a.s #source: pr19162b.s #as: --64 -#ld: -melf_x86_64 -shared -z noseparate-code -z max-page-size=0x200000 -z common-page-size=0x1000 --hash-style=sysv +#ld: -melf_x86_64 -shared -z noseparate-code -z max-page-size=0x200000 -z common-page-size=0x1000 --hash-style=sysv $NO_DT_RELR_LDFLAGS #readelf: -l --wide #target: x86_64-*-linux* diff --git a/ld/testsuite/ld-x86-64/pr19636-2d.d b/ld/testsuite/ld-x86-64/pr19636-2d.d index 3bd33a9..092992b 100644 --- a/ld/testsuite/ld-x86-64/pr19636-2d.d +++ b/ld/testsuite/ld-x86-64/pr19636-2d.d @@ -1,6 +1,6 @@ #source: pr19636-2.s #as: --64 -mrelax-relocations=no -#ld: -pie -m elf_x86_64 --no-dynamic-linker --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -pie -m elf_x86_64 --no-dynamic-linker --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/pr19636-2l.d b/ld/testsuite/ld-x86-64/pr19636-2l.d index 1b894b3..8c23c0b 100644 --- a/ld/testsuite/ld-x86-64/pr19636-2l.d +++ b/ld/testsuite/ld-x86-64/pr19636-2l.d @@ -1,6 +1,6 @@ #source: pr19636-2.s #as: --64 -mrelax-relocations=no -#ld: -pie -m elf_x86_64 --no-dynamic-linker --hash-style=sysv -z dynamic-undefined-weak -z max-page-size=0x200000 -z noseparate-code +#ld: -pie -m elf_x86_64 --no-dynamic-linker --hash-style=sysv -z dynamic-undefined-weak -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw #warning: -z dynamic-undefined-weak ignored diff --git a/ld/testsuite/ld-x86-64/pr20253-1d.d b/ld/testsuite/ld-x86-64/pr20253-1d.d index f9f03ba..057577b 100644 --- a/ld/testsuite/ld-x86-64/pr20253-1d.d +++ b/ld/testsuite/ld-x86-64/pr20253-1d.d @@ -1,6 +1,6 @@ #source: pr20253-1.s #as: --64 -#ld: -pie -melf_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -pie -melf_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/pr20253-1f.d b/ld/testsuite/ld-x86-64/pr20253-1f.d index 6666bca..479db82 100644 --- a/ld/testsuite/ld-x86-64/pr20253-1f.d +++ b/ld/testsuite/ld-x86-64/pr20253-1f.d @@ -1,6 +1,6 @@ #source: pr20253-1.s #as: --64 -#ld: -shared -melf_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -shared -melf_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/pr20253-1j.d b/ld/testsuite/ld-x86-64/pr20253-1j.d index 88c9715..20176a2 100644 --- a/ld/testsuite/ld-x86-64/pr20253-1j.d +++ b/ld/testsuite/ld-x86-64/pr20253-1j.d @@ -1,6 +1,6 @@ #source: pr20253-1.s #as: --x32 -#ld: -pie -melf32_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -pie -melf32_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/pr20253-1l.d b/ld/testsuite/ld-x86-64/pr20253-1l.d index 7428a72..4b17907 100644 --- a/ld/testsuite/ld-x86-64/pr20253-1l.d +++ b/ld/testsuite/ld-x86-64/pr20253-1l.d @@ -1,6 +1,6 @@ #source: pr20253-1.s #as: --x32 -#ld: -shared -melf32_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code +#ld: -shared -melf32_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code $NO_DT_RELR_LDFLAGS #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/report-reloc-1-x32.d b/ld/testsuite/ld-x86-64/report-reloc-1-x32.d index c66f956..63fe7b1 100644 --- a/ld/testsuite/ld-x86-64/report-reloc-1-x32.d +++ b/ld/testsuite/ld-x86-64/report-reloc-1-x32.d @@ -1,6 +1,6 @@ #source: report-reloc-1.s #as: --x32 -#ld: -pie -melf32_x86_64 -z report-relative-reloc +#ld: -pie -melf32_x86_64 -z report-relative-reloc $NO_DT_RELR_LDFLAGS #warning_output: report-reloc-1.l #readelf: -r --wide diff --git a/ld/testsuite/ld-x86-64/report-reloc-1.d b/ld/testsuite/ld-x86-64/report-reloc-1.d index 1b5f91f..69f164c 100644 --- a/ld/testsuite/ld-x86-64/report-reloc-1.d +++ b/ld/testsuite/ld-x86-64/report-reloc-1.d @@ -1,6 +1,6 @@ #source: report-reloc-1.s #as: --64 -#ld: -pie -melf_x86_64 -z report-relative-reloc +#ld: -pie -melf_x86_64 -z report-relative-reloc $NO_DT_RELR_LDFLAGS #warning_output: report-reloc-1.l #readelf: -r --wide diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp index c100879..b404812 100644 --- a/ld/testsuite/ld-x86-64/x86-64.exp +++ b/ld/testsuite/ld-x86-64/x86-64.exp @@ -45,28 +45,6 @@ set x86_64tests { {"basic PLT generation" "-melf_x86_64 tmpdir/libpltlib.so" "" "--64" {plt.s} {{objdump -drj.plt plt.pd}} "plt"} - {"TLS -fpic -shared transitions" - "-shared -melf_x86_64 --no-ld-generated-unwind-info \ - -z noseparate-code -z max-page-size=0x200000 --hash-style=sysv" "" - "--64" {tlspic1.s tlspic2.s} - {{readelf -WSsrl tlspic.rd} {objdump -drj.text\ -Mintel64 tlspic.dd} - {objdump -sj.got tlspic.sd} {objdump -sj.tdata tlspic.td}} - "libtlspic.so"} - {"TLS -fpic -shared transitions with r15 as GOT base" - "-shared -melf_x86_64 --no-ld-generated-unwind-info \ - -z noseparate-code -z max-page-size=0x200000 --hash-style=sysv" "" - "--64 -mrelax-relocations=yes" - {tlspic3.s tlspic2.s} - {{readelf -WSsrl tlspic2.rd} {objdump -drj.text\ -Mintel64 tlspic2.dd} - {objdump -sj.got tlspic2.sd} {objdump -sj.tdata tlspic2.td}} - "libtlspic2.so"} - {"TLS descriptor -fpic -shared transitions" - "-shared -melf_x86_64 --no-ld-generated-unwind-info \ - -z noseparate-code -z max-page-size=0x200000 --hash-style=sysv" "" - "--64" {tlsdesc.s tlspic2.s} - {{readelf -WSsrld tlsdesc.rd} {objdump -drj.text tlsdesc.dd} - {objdump "-s -j.got -j.got.plt" tlsdesc.sd} {objdump -sj.tdata tlsdesc.td} - {objdump -drj.plt tlsdesc.pd}} "libtlsdesc.so"} {"Helper shared library" "-shared -melf_x86_64" "" "--64" {tlslib.s} {} "libtlslib.so"} {"TLS -fpic and -fno-pic exec transitions" @@ -240,6 +218,49 @@ set x86_64tests { run_ld_link_tests $x86_64tests +run_ld_link_tests [list \ + [list \ + "TLS -fpic -shared transitions" \ + "-shared -melf_x86_64 --no-ld-generated-unwind-info \ + -z noseparate-code -z max-page-size=0x200000 --hash-style=sysv \ + $NO_DT_RELR_LDFLAGS" \ + "" "--64" \ + {tlspic1.s tlspic2.s} \ + {{readelf -WSsrl tlspic.rd} \ + {objdump {-drj.text -Mintel64} tlspic.dd} \ + {objdump -sj.got tlspic.sd} \ + {objdump -sj.tdata tlspic.td}} \ + "libtlspic.so" \ + ] \ + [list \ + "TLS -fpic -shared transitions with r15 as GOT base" \ + "-shared -melf_x86_64 --no-ld-generated-unwind-info \ + -z noseparate-code -z max-page-size=0x200000 --hash-style=sysv \ + $NO_DT_RELR_LDFLAGS" \ + "" "--64 -mrelax-relocations=yes" \ + {tlspic3.s tlspic2.s} \ + {{readelf -WSsrl tlspic2.rd} \ + {objdump {-drj.text -Mintel64} tlspic2.dd} \ + {objdump -sj.got tlspic2.sd} \ + {objdump -sj.tdata tlspic2.td}} \ + "libtlspic2.so" \ + ] \ + [list \ + "TLS descriptor -fpic -shared transitions" \ + "-shared -melf_x86_64 --no-ld-generated-unwind-info \ + -z noseparate-code -z max-page-size=0x200000 --hash-style=sysv \ + $NO_DT_RELR_LDFLAGS" \ + "" "--64" \ + {tlsdesc.s tlspic2.s} \ + {{readelf -WSsrld tlsdesc.rd} \ + {objdump -drj.text tlsdesc.dd} \ + {objdump {-s -j.got -j.got.plt} tlsdesc.sd} \ + {objdump -sj.tdata tlsdesc.td} \ + {objdump -drj.plt tlsdesc.pd}} \ + "libtlsdesc.so" \ + ] \ +] + set test_name "Mixed x86_64 and i386 input test 1" set test mixed1 if { ![ld_link $ld tmpdir/$test "-m$emul tmpdir/${test}a.o tmpdir/${test}b.o"] } { |