public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb/binutils-2_39-branch] ld/testsuite: Adjust for ELF_MAXPAGESIZE 0x1000
@ 2023-01-12 19:37 Hans-Peter Nilsson
  0 siblings, 0 replies; only message in thread
From: Hans-Peter Nilsson @ 2023-01-12 19:37 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=23b52b0ab4f7fdab81a197ea57c98b8c49730a26

commit 23b52b0ab4f7fdab81a197ea57c98b8c49730a26
Author: Hans-Peter Nilsson <hp@axis.com>
Date:   Wed Jan 11 16:34:04 2023 +0100

    ld/testsuite: Adjust for ELF_MAXPAGESIZE 0x1000
    
    Many tests reflect a setting of ELF_MAXPAGESIZE to 64 KiB.
    With ELF_MAXPAGESIZE changed to 4 KiB, layout is sometimes
    different and symbols end up in other places.  Avoid churn
    and regexpification of old test patterns by passing the
    max-page-size setting active at the time.
    
    ld/testsuite:
    
            * testsuite/ld-arm/arm-elf.exp,
            testsuite/ld-arm/non-contiguous-arm2.d,
            testsuite/ld-arm/non-contiguous-arm3.d,
            testsuite/ld-arm/non-contiguous-arm5.d,
            testsuite/ld-arm/non-contiguous-arm6.d,
            testsuite/ld-arm/thumb-plt-got.d, testsuite/ld-arm/thumb-plt.d:
            Pass -z max-page-size=0x10000 explicitly to test that rely on
            that value in output-matching patterns.

Diff:
---
 ld/testsuite/ld-arm/arm-elf.exp           | 47 ++++++++++++++++---------------
 ld/testsuite/ld-arm/non-contiguous-arm2.d |  2 +-
 ld/testsuite/ld-arm/non-contiguous-arm3.d |  2 +-
 ld/testsuite/ld-arm/non-contiguous-arm5.d |  2 +-
 ld/testsuite/ld-arm/non-contiguous-arm6.d |  2 +-
 ld/testsuite/ld-arm/thumb-plt-got.d       |  2 +-
 ld/testsuite/ld-arm/thumb-plt.d           |  2 +-
 7 files changed, 31 insertions(+), 28 deletions(-)

diff --git a/ld/testsuite/ld-arm/arm-elf.exp b/ld/testsuite/ld-arm/arm-elf.exp
index 08dd0b828f1..a90eeedc362 100644
--- a/ld/testsuite/ld-arm/arm-elf.exp
+++ b/ld/testsuite/ld-arm/arm-elf.exp
@@ -635,7 +635,9 @@ set armeabitests_nonacl {
     {"Multiple farcalls" "-Ttext 0x1000 --section-start .foo=0x2002020" "" "" {farcall-mix.s}
      {{objdump -d farcall-mix.d}}
      "farcall-mix"}
-    {"Multiple farcalls from several sections" "-Ttext 0x1000 --section-start .mytext=0x2000 --section-start .foo=0x2003020" "" "" {farcall-mix2.s}
+    {"Multiple farcalls from several sections"
+     "-Ttext 0x1000 --section-start .mytext=0x2000 --section-start .foo=0x2003020 -z max-page-size=0x10000"
+     "" "" {farcall-mix2.s}
      {{objdump -d farcall-mix2.d}}
      "farcall-mix2"}
 
@@ -765,7 +767,7 @@ set armeabitests_nonacl {
      {{ld cmse-veneers-wrong-entryfct.out}}
      "cmse-veneers-wrong-entryfct"}
     {"Secure gateway veneers (ARMv8-M Baseline)"
-     "-Ttext=0x8000 --section-start .gnu.sgstubs=0x20000 --gc-sections" ""
+     "-Ttext=0x8000 --section-start .gnu.sgstubs=0x20000 --gc-sections -z max-page-size=0x10000" ""
      "-march=armv8-m.base -mthumb"
      {cmse-veneers.s}
      {{objdump {-d -j .gnu.sgstubs} cmse-veneers.d}
@@ -773,7 +775,7 @@ set armeabitests_nonacl {
       {nm {} cmse-veneers.rd}}
      "cmse-veneers-baseline"}
     {"Secure gateway veneers (ARMv8-M Mainline)"
-     "-Ttext=0x8000 --section-start .gnu.sgstubs=0x20000 --gc-sections" ""
+     "-Ttext=0x8000 --section-start .gnu.sgstubs=0x20000 --gc-sections -z max-page-size=0x10000" ""
      "-march=armv8-m.main -mthumb"
      {cmse-veneers.s}
      {{objdump {-d -j .gnu.sgstubs} cmse-veneers.d}
@@ -967,7 +969,7 @@ set armeabitests_nonacl {
      {{objdump -dr cortex-a8-fix-blx-bcond.d}}
      "cortex-a8-fix-blx-bcond"}
     {"Cortex-A8 erratum fix, b.w to PLT"
-     "-EL -Tcortex-a8-fix-plt.ld --fix-cortex-a8 -shared" "" "-EL"
+     "-EL -Tcortex-a8-fix-plt.ld --fix-cortex-a8 -shared -z max-page-size=0x10000" "" "-EL"
      {cortex-a8-fix-b-plt.s}
      {{objdump -dr cortex-a8-fix-b-plt.d}}
      "cortex-a8-fix-b-plt"}
@@ -987,93 +989,94 @@ set armeabitests_nonacl {
      {{objdump -dr cortex-a8-fix-blx-plt.d}}
      "cortex-a8-fix-blx-plt"}
     {"Cortex-A8 erratum fix, relocate bl.w to PLT"
-     "-EL --section-start=.plt=0x8e00 -Ttext=0x8f00 --fix-cortex-a8 -shared --hash-style=sysv" ""
+     "-EL --section-start=.plt=0x8e00 -Ttext=0x8f00 --fix-cortex-a8 -shared --hash-style=sysv -z max-page-size=0x10000"
+     ""
      "-EL" {cortex-a8-thumb-target.s cortex-a8-fix-bl-rel.s}
      {{objdump -dr cortex-a8-fix-bl-rel-plt.d}}
      "cortex-a8-fix-bl-rel-thumb"}
-    {"IFUNC test 1" "-T ifunc-static.ld" "" "" {ifunc-1.s}
+    {"IFUNC test 1" "-T ifunc-static.ld -z max-page-size=0x10000" "" "" {ifunc-1.s}
      {{objdump -d ifunc-1.dd}
       {objdump {-s -j.data -j.got} ifunc-1.gd}
       {readelf -dr ifunc-1.rd}}
      "ifunc-1"}
-    {"IFUNC test 2" "-T ifunc-static.ld" "" "" {ifunc-2.s}
+    {"IFUNC test 2" "-T ifunc-static.ld -z max-page-size=0x10000" "" "" {ifunc-2.s}
      {{objdump -d ifunc-2.dd}
       {objdump {-s -j.data -j.got} ifunc-2.gd}
       {readelf -dr ifunc-2.rd}}
      "ifunc-2"}
-    {"IFUNC test 3" "-T ifunc-dynamic.ld -shared" "" "" {ifunc-3.s}
+    {"IFUNC test 3" "-T ifunc-dynamic.ld -shared -z max-page-size=0x10000" "" "" {ifunc-3.s}
      {{objdump -d ifunc-3.dd}
       {objdump {-s -j.data -j.got} ifunc-3.gd}
       {readelf -r ifunc-3.rd}}
      "ifunc-3.so"}
-    {"IFUNC test 4" "-T ifunc-dynamic.ld -shared" "" "" {ifunc-4.s}
+    {"IFUNC test 4" "-T ifunc-dynamic.ld -shared -z max-page-size=0x10000" "" "" {ifunc-4.s}
      {{objdump -d ifunc-4.dd}
       {objdump {-s -j.data -j.got} ifunc-4.gd}
       {readelf -r ifunc-4.rd}}
      "ifunc-4.so"}
-    {"IFUNC test 5" "-T ifunc-static.ld" "" "" {ifunc-5.s}
+    {"IFUNC test 5" "-T ifunc-static.ld -z max-page-size=0x10000" "" "" {ifunc-5.s}
      {{objdump -d ifunc-5.dd}
       {objdump {-s -j.data -j.got} ifunc-5.gd}
       {readelf -dr ifunc-5.rd}}
      "ifunc-5"}
-    {"IFUNC test 6" "-T ifunc-static.ld" "" "" {ifunc-6.s}
+    {"IFUNC test 6" "-T ifunc-static.ld -z max-page-size=0x10000" "" "" {ifunc-6.s}
      {{objdump -d ifunc-6.dd}
       {objdump {-s -j.data -j.got} ifunc-6.gd}
       {readelf -dr ifunc-6.rd}}
      "ifunc-6"}
-    {"IFUNC test 7" "-T ifunc-dynamic.ld tmpdir/ifunc-3.so -shared" ""
+    {"IFUNC test 7" "-T ifunc-dynamic.ld tmpdir/ifunc-3.so -shared -z max-page-size=0x10000" ""
      "" {ifunc-7.s}
      {{objdump -d ifunc-7.dd}
       {objdump {-s -j.data -j.got} ifunc-7.gd}
       {readelf -r ifunc-7.rd}}
      "ifunc-7.so"}
-    {"IFUNC test 8" "-T ifunc-dynamic.ld tmpdir/ifunc-4.so -shared" ""
+    {"IFUNC test 8" "-T ifunc-dynamic.ld tmpdir/ifunc-4.so -shared -z max-page-size=0x10000" ""
      "" {ifunc-8.s}
      {{objdump -d ifunc-8.dd}
       {objdump {-s -j.data -j.got} ifunc-8.gd}
       {readelf -r ifunc-8.rd}}
      "ifunc-8.so"}
-    {"IFUNC test 9" "-T ifunc-dynamic.ld tmpdir/ifunc-3.so" "" "" {ifunc-9.s}
+    {"IFUNC test 9" "-T ifunc-dynamic.ld tmpdir/ifunc-3.so -z max-page-size=0x10000" "" "" {ifunc-9.s}
      {{objdump -d ifunc-9.dd}
       {objdump {-s -j.data -j.got} ifunc-9.gd}
       {readelf -r ifunc-9.rd}}
      "ifunc-9"}
-    {"IFUNC test 10" "-T ifunc-dynamic.ld tmpdir/ifunc-4.so" "" "" {ifunc-10.s}
+    {"IFUNC test 10" "-T ifunc-dynamic.ld tmpdir/ifunc-4.so -z max-page-size=0x10000" "" "" {ifunc-10.s}
      {{objdump -d ifunc-10.dd}
       {objdump {-s -j.data -j.got} ifunc-10.gd}
       {readelf -r ifunc-10.rd}}
      "ifunc-10"}
-    {"IFUNC test 11" "-T ifunc-static.ld" "" "" {ifunc-11.s}
+    {"IFUNC test 11" "-T ifunc-static.ld -z max-page-size=0x10000" "" "" {ifunc-11.s}
      {{objdump -d ifunc-11.dd}
       {objdump {-s -j.data -j.got} ifunc-11.gd}
       {readelf -dr ifunc-11.rd}}
      "ifunc-11"}
-    {"IFUNC test 12" "-T ifunc-dynamic.ld -shared" "" "" {ifunc-12.s}
+    {"IFUNC test 12" "-T ifunc-dynamic.ld -shared -z max-page-size=0x10000" "" "" {ifunc-12.s}
      {{objdump -d ifunc-12.dd}
       {objdump {-s -j.data -j.got} ifunc-12.gd}
       {readelf -r ifunc-12.rd}}
      "ifunc-12.so"}
-    {"IFUNC test 13" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-13.s}
+    {"IFUNC test 13" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so -z max-page-size=0x10000" "" "" {ifunc-13.s}
      {{objdump -d ifunc-13.dd}
       {objdump {-s -j.data -j.got} ifunc-13.gd}
       {readelf -r ifunc-13.rd}}
      "ifunc-13"}
-    {"IFUNC test 14" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-14.s}
+    {"IFUNC test 14" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so -z max-page-size=0x10000" "" "" {ifunc-14.s}
      {{objdump -d ifunc-14.dd}
       {objdump {-s -j.data -j.got} ifunc-14.gd}
       {readelf -r ifunc-14.rd}}
      "ifunc-14"}
-    {"IFUNC test 15" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-15.s}
+    {"IFUNC test 15" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so -z max-page-size=0x10000" "" "" {ifunc-15.s}
      {{objdump -d ifunc-15.dd}
       {objdump {-s -j.data -j.got} ifunc-15.gd}
       {readelf -r ifunc-15.rd}}
      "ifunc-15"}
-    {"IFUNC test 16" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" "" {ifunc-16.s}
+    {"IFUNC test 16" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so -z max-page-size=0x10000" "" "" {ifunc-16.s}
      {{objdump -d ifunc-16.dd}
       {objdump {-s -j.data -j.got} ifunc-16.gd}
       {readelf -r ifunc-16.rd}}
      "ifunc-16"}
-    {"IFUNC test 17" "-T ifunc-static.ld" "" "" {ifunc-17.s}
+    {"IFUNC test 17" "-T ifunc-static.ld -z max-page-size=0x10000" "" "" {ifunc-17.s}
      {{objdump -d ifunc-17.dd}
       {objdump {-s -j.data -j.got} ifunc-17.gd}
       {readelf -r ifunc-17.rd}}
diff --git a/ld/testsuite/ld-arm/non-contiguous-arm2.d b/ld/testsuite/ld-arm/non-contiguous-arm2.d
index 14aca4c7b21..ab028b3e15e 100644
--- a/ld/testsuite/ld-arm/non-contiguous-arm2.d
+++ b/ld/testsuite/ld-arm/non-contiguous-arm2.d
@@ -1,6 +1,6 @@
 #name: non-contiguous-arm2
 #source: non-contiguous-arm.s
-#ld: --enable-non-contiguous-regions -T non-contiguous-arm2.ld
+#ld: --enable-non-contiguous-regions -T non-contiguous-arm2.ld -z max-page-size=0x10000
 #objdump: -rdth
 #xfail: [is_generic]
 
diff --git a/ld/testsuite/ld-arm/non-contiguous-arm3.d b/ld/testsuite/ld-arm/non-contiguous-arm3.d
index c500a29e467..4d48e7eebb9 100644
--- a/ld/testsuite/ld-arm/non-contiguous-arm3.d
+++ b/ld/testsuite/ld-arm/non-contiguous-arm3.d
@@ -1,6 +1,6 @@
 #name: non-contiguous-arm3
 #source: non-contiguous-arm.s
-#ld: --enable-non-contiguous-regions -T non-contiguous-arm3.ld
+#ld: --enable-non-contiguous-regions -T non-contiguous-arm3.ld -z max-page-size=0x10000
 #objdump: -rdth
 #xfail: [is_generic]
 #skip: arm*nacl
diff --git a/ld/testsuite/ld-arm/non-contiguous-arm5.d b/ld/testsuite/ld-arm/non-contiguous-arm5.d
index 60b6f56157c..89c1ee4edec 100644
--- a/ld/testsuite/ld-arm/non-contiguous-arm5.d
+++ b/ld/testsuite/ld-arm/non-contiguous-arm5.d
@@ -1,6 +1,6 @@
 #name: non-contiguous-arm5
 #source: non-contiguous-arm.s
-#ld: --enable-non-contiguous-regions -T non-contiguous-arm5.ld
+#ld: --enable-non-contiguous-regions -T non-contiguous-arm5.ld -z max-page-size=0x10000
 #objdump: -rdth
 #xfail: [is_generic]
 
diff --git a/ld/testsuite/ld-arm/non-contiguous-arm6.d b/ld/testsuite/ld-arm/non-contiguous-arm6.d
index da69f6b7c16..77c1245d7f4 100644
--- a/ld/testsuite/ld-arm/non-contiguous-arm6.d
+++ b/ld/testsuite/ld-arm/non-contiguous-arm6.d
@@ -1,6 +1,6 @@
 #name: non-contiguous-arm6
 #source: non-contiguous-arm.s
-#ld: --enable-non-contiguous-regions -T non-contiguous-arm6.ld
+#ld: --enable-non-contiguous-regions -T non-contiguous-arm6.ld -z max-page-size=0x10000
 #objdump: -rdth
 #xfail: [is_generic]
 #skip: arm*nacl
diff --git a/ld/testsuite/ld-arm/thumb-plt-got.d b/ld/testsuite/ld-arm/thumb-plt-got.d
index 370a4e2c603..5cebae23d45 100644
--- a/ld/testsuite/ld-arm/thumb-plt-got.d
+++ b/ld/testsuite/ld-arm/thumb-plt-got.d
@@ -1,6 +1,6 @@
 #source: thumb-plt.s
 #name: Thumb only PLT and GOT LSB Symbol
-#ld: -shared -e0
+#ld: -shared -e0 -z max-page-size=0x10000
 #readelf: -rx .got
 #skip: *-*-pe *-*-wince *-*-vxworks armeb-*-* *-*-gnueabihf
 
diff --git a/ld/testsuite/ld-arm/thumb-plt.d b/ld/testsuite/ld-arm/thumb-plt.d
index aa9c61f84db..1d54fc6bc3b 100644
--- a/ld/testsuite/ld-arm/thumb-plt.d
+++ b/ld/testsuite/ld-arm/thumb-plt.d
@@ -1,6 +1,6 @@
 #source: thumb-plt.s
 #name: Thumb only PLT and GOT
-#ld: -shared -e0
+#ld: -shared -e0 -z max-page-size=0x10000
 #objdump: -dr
 #skip: *-*-pe *-*-wince *-*-vxworks armeb-*-* *-*-gnueabihf

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-12 19:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-12 19:37 [binutils-gdb/binutils-2_39-branch] ld/testsuite: Adjust for ELF_MAXPAGESIZE 0x1000 Hans-Peter Nilsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).