From: Nick Clifton Date: Thu, 13 Jun 2024 16:00:29 +0000 (+0100) Subject: Adjust linker tests that are sensitive to --rosegment X-Git-Tag: binutils-2_43~417 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54904469f71c06102e15707c2cb4964e496a8ed6;p=thirdparty%2Fbinutils-gdb.git Adjust linker tests that are sensitive to --rosegment --- diff --git a/ld/testsuite/ld-elf/mbind1b.d b/ld/testsuite/ld-elf/mbind1b.d index 137f8b67a03..e1f998a9f89 100644 --- a/ld/testsuite/ld-elf/mbind1b.d +++ b/ld/testsuite/ld-elf/mbind1b.d @@ -1,5 +1,5 @@ #source: mbind1.s -#ld: -shared -z common-page-size=0x1000 -z max-page-size=0x200000 +#ld: -shared -z common-page-size=0x1000 -z max-page-size=0x200000 --no-rosegment #readelf: -S -l --wide #target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: ![check_shared_lib_support] diff --git a/ld/testsuite/ld-elf/mbind1c.d b/ld/testsuite/ld-elf/mbind1c.d index 9cc333e9f79..dcae3c0f193 100644 --- a/ld/testsuite/ld-elf/mbind1c.d +++ b/ld/testsuite/ld-elf/mbind1c.d @@ -1,5 +1,5 @@ #source: mbind1.s -#ld: -pie -z common-page-size=0x1000 -z max-page-size=0x200000 +#ld: -pie -z common-page-size=0x1000 -z max-page-size=0x200000 --no-rosegment #readelf: -S -l --wide #target: *-*-linux* *-*-gnu* arm*-*-uclinuxfdpiceabi #xfail: ![check_pie_support] diff --git a/ld/testsuite/ld-elf/pr30508.d b/ld/testsuite/ld-elf/pr30508.d index aca9a83dcf6..325ff40f562 100644 --- a/ld/testsuite/ld-elf/pr30508.d +++ b/ld/testsuite/ld-elf/pr30508.d @@ -1,4 +1,4 @@ -#ld: -z separate-code +#ld: -z separate-code --no-rosegment #objcopy_linked_file: -R .foo #readelf: -lW #target: *-*-linux-gnu *-*-gnu* *-*-nacl* arm*-*-uclinuxfdpiceabi diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp index 18d1c9198ca..94019881264 100644 --- a/ld/testsuite/ld-i386/i386.exp +++ b/ld/testsuite/ld-i386/i386.exp @@ -191,7 +191,7 @@ set i386tests { {"Reloc section order" "-shared -melf_i386 -z nocombreloc -z notext" "" "--32" {reloc.s} {{objdump -hw reloc.d}} "reloc.so"} - {"Basic --emit-relocs support" "-shared -melf_i386 --emit-relocs" "" "--32" + {"Basic --emit-relocs support" "-shared -melf_i386 --emit-relocs --no-rosegment" "" "--32" {emit-relocs.s} {{readelf --relocs emit-relocs.rd}} "emit-relocs.so"} {"-z combreloc relocation sections" "-shared -melf_i386 -z combreloc" "" "--32" {combreloc.s} {{readelf -r combreloc.d}} "combreloc.so"} diff --git a/ld/testsuite/ld-x86-64/ilp32-4.d b/ld/testsuite/ld-x86-64/ilp32-4.d index ad5c9cdf858..e737aa49b65 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 $NO_DT_RELR_LDFLAGS +#ld: -m elf32_x86_64 -shared --no-ld-generated-unwind-info --hash-style=sysv $NO_DT_RELR_LDFLAGS --no-rosegment #readelf: -d -S --wide #target: x86_64-*-linux* diff --git a/ld/testsuite/ld-x86-64/mark-plt-1a-x32.d b/ld/testsuite/ld-x86-64/mark-plt-1a-x32.d index 2051356be73..4bef117dd0c 100644 --- a/ld/testsuite/ld-x86-64/mark-plt-1a-x32.d +++ b/ld/testsuite/ld-x86-64/mark-plt-1a-x32.d @@ -1,6 +1,6 @@ #source: mark-plt-1.s #as: --x32 -#ld: -melf32_x86_64 -shared -z mark-plt +#ld: -melf32_x86_64 -shared -z mark-plt --no-rosegment #readelf: -drW #... diff --git a/ld/testsuite/ld-x86-64/mark-plt-1a.d b/ld/testsuite/ld-x86-64/mark-plt-1a.d index a252e95e759..f6b246ef230 100644 --- a/ld/testsuite/ld-x86-64/mark-plt-1a.d +++ b/ld/testsuite/ld-x86-64/mark-plt-1a.d @@ -1,6 +1,6 @@ #source: mark-plt-1.s #as: --64 -#ld: -melf_x86_64 -shared -z mark-plt +#ld: -melf_x86_64 -shared -z mark-plt --no-rosegment #readelf: -drW #... diff --git a/ld/testsuite/ld-x86-64/mark-plt-1b-x32.d b/ld/testsuite/ld-x86-64/mark-plt-1b-x32.d index 848d45e1e43..d105768bed3 100644 --- a/ld/testsuite/ld-x86-64/mark-plt-1b-x32.d +++ b/ld/testsuite/ld-x86-64/mark-plt-1b-x32.d @@ -1,6 +1,6 @@ #source: mark-plt-1.s #as: --x32 -#ld: -melf32_x86_64 -shared -z mark-plt --hash-style=both +#ld: -melf32_x86_64 -shared -z mark-plt --hash-style=both --no-rosegment #objdump: -dw #... diff --git a/ld/testsuite/ld-x86-64/mark-plt-1b.d b/ld/testsuite/ld-x86-64/mark-plt-1b.d index a5c6931fd2a..9af69fdbbb2 100644 --- a/ld/testsuite/ld-x86-64/mark-plt-1b.d +++ b/ld/testsuite/ld-x86-64/mark-plt-1b.d @@ -1,6 +1,6 @@ #source: mark-plt-1.s #as: --64 -#ld: -melf_x86_64 -shared -z mark-plt --hash-style=both +#ld: -melf_x86_64 -shared -z mark-plt --hash-style=both --no-rosegment #objdump: -dw #... diff --git a/ld/testsuite/ld-x86-64/mark-plt-1c-x32.d b/ld/testsuite/ld-x86-64/mark-plt-1c-x32.d index 6354dc3bd95..6ea71a1e7f8 100644 --- a/ld/testsuite/ld-x86-64/mark-plt-1c-x32.d +++ b/ld/testsuite/ld-x86-64/mark-plt-1c-x32.d @@ -1,6 +1,6 @@ #source: mark-plt-1.s #as: --x32 -#ld: -melf32_x86_64 -shared -z mark-plt -z ibtplt +#ld: -melf32_x86_64 -shared -z mark-plt -z ibtplt --no-rosegment #readelf: -drW #... diff --git a/ld/testsuite/ld-x86-64/mark-plt-1c.d b/ld/testsuite/ld-x86-64/mark-plt-1c.d index e11e0b7a758..1713c8863f8 100644 --- a/ld/testsuite/ld-x86-64/mark-plt-1c.d +++ b/ld/testsuite/ld-x86-64/mark-plt-1c.d @@ -1,6 +1,6 @@ #source: mark-plt-1.s #as: --64 -#ld: -melf_x86_64 -shared -z mark-plt -z ibtplt +#ld: -melf_x86_64 -shared -z mark-plt -z ibtplt --no-rosegment #readelf: -drW #... diff --git a/ld/testsuite/ld-x86-64/mark-plt-1d-x32.d b/ld/testsuite/ld-x86-64/mark-plt-1d-x32.d index f08c99ea9cd..0e709d6306e 100644 --- a/ld/testsuite/ld-x86-64/mark-plt-1d-x32.d +++ b/ld/testsuite/ld-x86-64/mark-plt-1d-x32.d @@ -1,6 +1,6 @@ #source: mark-plt-1.s #as: --x32 -#ld: -melf32_x86_64 -shared -z mark-plt -z ibtplt --hash-style=both +#ld: -melf32_x86_64 -shared -z mark-plt -z ibtplt --hash-style=both --no-rosegment #objdump: -dw #... diff --git a/ld/testsuite/ld-x86-64/mark-plt-1d.d b/ld/testsuite/ld-x86-64/mark-plt-1d.d index 9ca8d654324..1ec9a9cacb4 100644 --- a/ld/testsuite/ld-x86-64/mark-plt-1d.d +++ b/ld/testsuite/ld-x86-64/mark-plt-1d.d @@ -1,6 +1,6 @@ #source: mark-plt-1.s #as: --64 -#ld: -melf_x86_64 -shared -z mark-plt -z ibtplt --hash-style=both +#ld: -melf_x86_64 -shared -z mark-plt -z ibtplt --hash-style=both --no-rosegment #objdump: -dw #... diff --git a/ld/testsuite/ld-x86-64/pe-x86-64.exp b/ld/testsuite/ld-x86-64/pe-x86-64.exp index 6244061be97..2dfbb16a219 100644 --- a/ld/testsuite/ld-x86-64/pe-x86-64.exp +++ b/ld/testsuite/ld-x86-64/pe-x86-64.exp @@ -27,7 +27,7 @@ if {![istarget "x86_64-*-linux*"] } { run_ld_link_tests [list \ [list \ "Build pe-x86-64-1" \ - "-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code" \ + "-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code --no-rosegment" \ "" \ "" \ {pe-x86-64-1a.obj.bz2 pe-x86-64-1b.obj.bz2 pe-x86-64-1c.obj.bz2} \ @@ -36,7 +36,7 @@ run_ld_link_tests [list \ ] \ [list \ "Build pe-x86-64-2" \ - "-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code" \ + "-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code --no-rosegment" \ "" \ "" \ {pe-x86-64-2a.obj.bz2 pe-x86-64-2b.obj.bz2 pe-x86-64-2c.obj.bz2} \ @@ -45,7 +45,7 @@ run_ld_link_tests [list \ ] \ [list \ "Build pe-x86-64-3" \ - "-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code" \ + "-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code --no-rosegment" \ "" \ "" \ {pe-x86-64-3a.obj.bz2 pe-x86-64-3b.obj.bz2 pe-x86-64-3c.obj.bz2 \ @@ -55,7 +55,7 @@ run_ld_link_tests [list \ ] \ [list \ "Build pe-x86-64-4" \ - "-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code" \ + "-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code --no-rosegment" \ "" \ "" \ {pe-x86-64-4a.obj.bz2 pe-x86-64-4b.obj.bz2 pe-x86-64-4c.obj.bz2 \ @@ -65,7 +65,7 @@ run_ld_link_tests [list \ ] \ [list \ "Build pe-x86-64-5" \ - "-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code" \ + "-m elf_x86_64 --entry=begin -z max-page-size=0x1000 -z separate-code --no-rosegment" \ "" \ "" \ {pe-x86-64-5.obj.bz2 } \ @@ -75,7 +75,7 @@ run_ld_link_tests [list \ ] \ [list \ "Build pe-x86-64-6" \ - "-m elf_x86_64 --entry=main -z max-page-size=0x1000 -z separate-code" \ + "-m elf_x86_64 --entry=main -z max-page-size=0x1000 -z separate-code --no-rosegment" \ "" \ "" \ {pe-x86-64-6.obj.bz2 } \ diff --git a/ld/testsuite/ld-x86-64/pr19609-4e.d b/ld/testsuite/ld-x86-64/pr19609-4e.d index ed6e6e0bcca..39be216c23b 100644 --- a/ld/testsuite/ld-x86-64/pr19609-4e.d +++ b/ld/testsuite/ld-x86-64/pr19609-4e.d @@ -1,6 +1,6 @@ #source: pr19609-4.s #as: --64 -mrelax-relocations=yes -#ld: -melf_x86_64 -Ttext=0x70000000 -Tdata=0xa0000000 --no-relax -z max-page-size=0x1000 -z separate-code +#ld: -melf_x86_64 -Ttext=0x70000000 -Tdata=0xa0000000 --no-relax -z max-page-size=0x1000 -z separate-code --no-rosegment #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/pr19609-6a.d b/ld/testsuite/ld-x86-64/pr19609-6a.d index 3bad8b55fd6..ef76dd6a0c0 100644 --- a/ld/testsuite/ld-x86-64/pr19609-6a.d +++ b/ld/testsuite/ld-x86-64/pr19609-6a.d @@ -1,6 +1,6 @@ #source: pr19609-6.s #as: --64 -mrelax-relocations=yes -#ld: -melf_x86_64 --defsym foobar=0x80000000 -z max-page-size=0x1000 -z separate-code +#ld: -melf_x86_64 --defsym foobar=0x80000000 -z max-page-size=0x1000 -z separate-code --no-rosegment #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/pr19609-6b.d b/ld/testsuite/ld-x86-64/pr19609-6b.d index 2723fb1b980..e6a266422fb 100644 --- a/ld/testsuite/ld-x86-64/pr19609-6b.d +++ b/ld/testsuite/ld-x86-64/pr19609-6b.d @@ -1,6 +1,6 @@ #source: pr19609-6.s #as: --64 -mrelax-relocations=yes -#ld: -melf_x86_64 --defsym foobar=0x80000000 --no-relax -z max-page-size=0x1000 -z separate-code +#ld: -melf_x86_64 --defsym foobar=0x80000000 --no-relax -z max-page-size=0x1000 -z separate-code --no-rosegment #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/pr19609-7b.d b/ld/testsuite/ld-x86-64/pr19609-7b.d index 48d0b01616d..875d963ce0e 100644 --- a/ld/testsuite/ld-x86-64/pr19609-7b.d +++ b/ld/testsuite/ld-x86-64/pr19609-7b.d @@ -1,6 +1,6 @@ #source: pr19609-7.s #as: --64 -mrelax-relocations=yes -#ld: -melf_x86_64 -Ttext=0x80000000 --no-relax -z max-page-size=0x1000 -z separate-code +#ld: -melf_x86_64 -Ttext=0x80000000 --no-relax -z max-page-size=0x1000 -z separate-code --no-rosegment #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/pr19609-7d.d b/ld/testsuite/ld-x86-64/pr19609-7d.d index 6e2882af3c9..294b2c96bcc 100644 --- a/ld/testsuite/ld-x86-64/pr19609-7d.d +++ b/ld/testsuite/ld-x86-64/pr19609-7d.d @@ -1,6 +1,6 @@ #source: pr19609-7.s #as: --x32 -mrelax-relocations=yes -#ld: -melf32_x86_64 -Ttext=0x80000000 --no-relax -z max-page-size=0x1000 -z separate-code +#ld: -melf32_x86_64 -Ttext=0x80000000 --no-relax -z max-page-size=0x1000 -z separate-code --no-rosegment #objdump: -dw .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/sframe-plt-1.d b/ld/testsuite/ld-x86-64/sframe-plt-1.d index 5e734610b97..ca82cf20ca9 100644 --- a/ld/testsuite/ld-x86-64/sframe-plt-1.d +++ b/ld/testsuite/ld-x86-64/sframe-plt-1.d @@ -2,7 +2,7 @@ #source: sframe-foo.s #source: sframe-bar.s #objdump: --sframe=.sframe -#ld: -shared +#ld: -shared --no-rosegment #name: SFrame for plt0 and pltN .*: +file format .* diff --git a/ld/testsuite/ld-x86-64/sframe-simple-1.d b/ld/testsuite/ld-x86-64/sframe-simple-1.d index 7f4db31fe1b..adc4b741930 100644 --- a/ld/testsuite/ld-x86-64/sframe-simple-1.d +++ b/ld/testsuite/ld-x86-64/sframe-simple-1.d @@ -2,7 +2,7 @@ #source: sframe-foo.s #source: sframe-bar.s #objdump: --sframe=.sframe -#ld: -shared +#ld: -shared --no-rosegment #name: SFrame simple link .*: +file format .*