]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ld/testsuite: Adjust for ELF_MAXPAGESIZE 0x1000
authorHans-Peter Nilsson <hp@axis.com>
Wed, 11 Jan 2023 15:34:04 +0000 (16:34 +0100)
committerHans-Peter Nilsson <hp@bitrange.com>
Thu, 12 Jan 2023 19:35:16 +0000 (20:35 +0100)
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.

ld/testsuite/ld-arm/arm-elf.exp
ld/testsuite/ld-arm/non-contiguous-arm2.d
ld/testsuite/ld-arm/non-contiguous-arm3.d
ld/testsuite/ld-arm/non-contiguous-arm5.d
ld/testsuite/ld-arm/non-contiguous-arm6.d
ld/testsuite/ld-arm/thumb-plt-got.d
ld/testsuite/ld-arm/thumb-plt.d

index 08dd0b828f1674d8426419ab320aa8fa9f452dd7..a90eeedc36247ef75eff10f7d4e65b71e9de0723 100644 (file)
@@ -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}}
index 14aca4c7b212aa8b3d6031eed236e6b70208dbd9..ab028b3e15e45312a5f070f8075c156ae13a5ea9 100644 (file)
@@ -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]
 
index c500a29e4676d5afa675b45091429273dc8605b8..4d48e7eebb9860b381d9eb9c5b86c703a49d3d70 100644 (file)
@@ -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
index 60b6f56157c3846c1839b452ce521278309e55e6..89c1ee4edec94049e8c35c2474b011d98d012d07 100644 (file)
@@ -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]
 
index da69f6b7c16af2fe43f21de2e01ed7be1baeb75f..77c1245d7f4bc58de088259afa44a1a8d0ce31e2 100644 (file)
@@ -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
index 370a4e2c6033639fb482887709b35e2075e87b0d..5cebae23d453641d43d5eeda626794d8b8b4b9a1 100644 (file)
@@ -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
 
index aa9c61f84db07871f958bc97345d36410bfabeb1..1d54fc6bc3b36089ef544a76dc05378fdfb2e2a7 100644 (file)
@@ -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