aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/NEWS13
-rw-r--r--ld/config.in3
-rwxr-xr-xld/configure291
-rw-r--r--ld/configure.ac6
-rw-r--r--ld/emultempl/emulation.em3
-rw-r--r--ld/emultempl/kvxelf.em14
-rw-r--r--ld/emultempl/pe.em50
-rw-r--r--ld/ld.texi8
-rw-r--r--ld/ldemul.c8
-rw-r--r--ld/ldemul.h8
-rw-r--r--ld/ldlang.c41
-rw-r--r--ld/ldmisc.c10
-rw-r--r--ld/pe-dll.c9
-rw-r--r--ld/scripttempl/avr.sc20
-rw-r--r--ld/scripttempl/pe.sc29
-rw-r--r--ld/scripttempl/pep.sc31
-rw-r--r--ld/testsuite/config/default.exp13
-rw-r--r--ld/testsuite/ld-aarch64/aarch64.ld20
-rw-r--r--ld/testsuite/ld-aarch64/gc-got-relocs.d15
-rw-r--r--ld/testsuite/ld-aarch64/gc-plt-relocs.d60
-rw-r--r--ld/testsuite/ld-aarch64/gc-relocs-257-dyn.d4
-rw-r--r--ld/testsuite/ld-aarch64/gc-relocs-257.d4
-rw-r--r--ld/testsuite/ld-aarch64/gc-tls-relocs.d14
-rw-r--r--ld/testsuite/ld-aarch64/protections/bti-and-memory-seal-plt-1-a.d10
-rw-r--r--ld/testsuite/ld-aarch64/protections/bti-far-1.d4
-rw-r--r--ld/testsuite/ld-aarch64/protections/bti-far-opt.d4
-rw-r--r--ld/testsuite/ld-aarch64/protections/bti-far.ld26
-rw-r--r--ld/testsuite/ld-aarch64/protections/bti-pac-plt-1-a.d6
-rw-r--r--ld/testsuite/ld-aarch64/protections/bti-pac-plt-1-b.d6
-rw-r--r--ld/testsuite/ld-aarch64/protections/bti-pac-plt-2-a.d6
-rw-r--r--ld/testsuite/ld-aarch64/protections/bti-pac-plt-2-b.d6
-rw-r--r--ld/testsuite/ld-aarch64/protections/bti-pac-plt-3-a.d6
-rw-r--r--ld/testsuite/ld-aarch64/protections/bti-pac-plt-3-b.d6
-rw-r--r--ld/testsuite/ld-aarch64/protections/bti-plt-1-a.d6
-rw-r--r--ld/testsuite/ld-aarch64/protections/bti-plt-1-b.d6
-rw-r--r--ld/testsuite/ld-aarch64/protections/bti-plt-1-c.d6
-rw-r--r--ld/testsuite/ld-aarch64/protections/bti-plt-3.d6
-rw-r--r--ld/testsuite/ld-aarch64/protections/bti-plt.ld25
-rw-r--r--ld/testsuite/ld-aarch64/protections/pac-plt-1-a.d6
-rw-r--r--ld/testsuite/ld-aarch64/protections/pac-plt-1-b.d6
-rw-r--r--ld/testsuite/ld-aarch64/protections/pac-plt-2.d4
-rw-r--r--ld/testsuite/ld-aarch64/relocs-ilp32.ld2
-rw-r--r--ld/testsuite/ld-aarch64/relocs.ld2
-rw-r--r--ld/testsuite/ld-aarch64/sframe-simple-1.d3
-rw-r--r--ld/testsuite/ld-aarch64/variant_pcs-now.d98
-rw-r--r--ld/testsuite/ld-aarch64/variant_pcs-r.d10
-rw-r--r--ld/testsuite/ld-aarch64/variant_pcs-shared.d98
-rw-r--r--ld/testsuite/ld-aarch64/variant_pcs.ld32
-rw-r--r--ld/testsuite/ld-arm/arm.ld2
-rw-r--r--ld/testsuite/ld-arm/arm_purecode.ld2
-rw-r--r--ld/testsuite/ld-arm/discard-unwind.ld2
-rw-r--r--ld/testsuite/ld-arm/script-type.ld4
-rw-r--r--ld/testsuite/ld-arm/unwind-1.d9
-rw-r--r--ld/testsuite/ld-arm/unwind-2.d9
-rw-r--r--ld/testsuite/ld-arm/unwind-3.d11
-rw-r--r--ld/testsuite/ld-arm/unwind-4.d14
-rw-r--r--ld/testsuite/ld-cris/asneed1.d2
-rw-r--r--ld/testsuite/ld-cris/badgotr1.d2
-rw-r--r--ld/testsuite/ld-cris/def2.d2
-rw-r--r--ld/testsuite/ld-cris/def3.d2
-rw-r--r--ld/testsuite/ld-cris/dso-pltdis1.d2
-rw-r--r--ld/testsuite/ld-cris/dso-pltdis2.d2
-rw-r--r--ld/testsuite/ld-cris/dso12-pltdis.d2
-rw-r--r--ld/testsuite/ld-cris/expdyn1.d2
-rw-r--r--ld/testsuite/ld-cris/expdyn2.d2
-rw-r--r--ld/testsuite/ld-cris/expdyn3.d2
-rw-r--r--ld/testsuite/ld-cris/expdyn4.d2
-rw-r--r--ld/testsuite/ld-cris/expdyn5.d2
-rw-r--r--ld/testsuite/ld-cris/expdyn6.d2
-rw-r--r--ld/testsuite/ld-cris/expdyn7.d2
-rw-r--r--ld/testsuite/ld-cris/gotplt1.d2
-rw-r--r--ld/testsuite/ld-cris/gotplt2.d2
-rw-r--r--ld/testsuite/ld-cris/gotplt3.d2
-rw-r--r--ld/testsuite/ld-cris/hiddef1.d2
-rw-r--r--ld/testsuite/ld-cris/ldsym1.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-1.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-10.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-11.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-12.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-12b.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-12c.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-13.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-13b.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-14.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-15.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-15b.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-15c.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-1b.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-1c.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-1d.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-2.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-3.d2
-rw-r--r--ld/testsuite/ld-cris/libdso-4.d2
-rw-r--r--ld/testsuite/ld-cris/locref1.d2
-rw-r--r--ld/testsuite/ld-cris/locref2.d2
-rw-r--r--ld/testsuite/ld-cris/nodyn4.d2
-rw-r--r--ld/testsuite/ld-cris/nodyn5.d2
-rw-r--r--ld/testsuite/ld-cris/pcrelcp-1.d2
-rw-r--r--ld/testsuite/ld-cris/pic-gc-72.d2
-rw-r--r--ld/testsuite/ld-cris/pic-gc-73.d2
-rw-r--r--ld/testsuite/ld-cris/pr16044.d2
-rw-r--r--ld/testsuite/ld-cris/pr26589.d2
-rw-r--r--ld/testsuite/ld-cris/pv32-1.d2
-rw-r--r--ld/testsuite/ld-cris/tls-dso-dtpoffd2.d2
-rw-r--r--ld/testsuite/ld-cris/tls-dso-dtpoffd4.d2
-rw-r--r--ld/testsuite/ld-cris/tls-dso-tpoffgotcomm1.d2
-rw-r--r--ld/testsuite/ld-cris/tls-dso-x1x2-1.d2
-rw-r--r--ld/testsuite/ld-cris/tls-dso-xz-1.d2
-rw-r--r--ld/testsuite/ld-cris/tls-e-20.d2
-rw-r--r--ld/testsuite/ld-cris/tls-e-20a.d2
-rw-r--r--ld/testsuite/ld-cris/tls-e-21.d2
-rw-r--r--ld/testsuite/ld-cris/tls-e-22.d2
-rw-r--r--ld/testsuite/ld-cris/tls-e-23.d2
-rw-r--r--ld/testsuite/ld-cris/tls-e-66.d2
-rw-r--r--ld/testsuite/ld-cris/tls-e-80.d2
-rw-r--r--ld/testsuite/ld-cris/tls-e-dtpoffd1.d2
-rw-r--r--ld/testsuite/ld-cris/tls-e-dtpoffd3.d2
-rw-r--r--ld/testsuite/ld-cris/tls-e-tpiecomm1.d2
-rw-r--r--ld/testsuite/ld-cris/tls-e-tpoffcomm1.d2
-rw-r--r--ld/testsuite/ld-cris/tls-e-tpoffgotcomm1.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-20x.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-24.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-25.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-26.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-27.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-28.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-29.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-31.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-33.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-35.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-37.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-39.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-40.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-41.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-43.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-44.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-45.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-47.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-48.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-49.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-51.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-52.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-53.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-55.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-56.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-62.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-65.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-67.d2
-rw-r--r--ld/testsuite/ld-cris/tls-err-77.d2
-rw-r--r--ld/testsuite/ld-cris/tls-gc-68.d2
-rw-r--r--ld/testsuite/ld-cris/tls-gc-69.d2
-rw-r--r--ld/testsuite/ld-cris/tls-gc-70.d2
-rw-r--r--ld/testsuite/ld-cris/tls-gc-71.d2
-rw-r--r--ld/testsuite/ld-cris/tls-gc-75.d2
-rw-r--r--ld/testsuite/ld-cris/tls-gc-76.d2
-rw-r--r--ld/testsuite/ld-cris/tls-gc-79.d2
-rw-r--r--ld/testsuite/ld-cris/tls-gd-1.d2
-rw-r--r--ld/testsuite/ld-cris/tls-gd-1h.d2
-rw-r--r--ld/testsuite/ld-cris/tls-gd-2.d2
-rw-r--r--ld/testsuite/ld-cris/tls-gd-2h.d2
-rw-r--r--ld/testsuite/ld-cris/tls-gd-3.d2
-rw-r--r--ld/testsuite/ld-cris/tls-gd-3h.d2
-rw-r--r--ld/testsuite/ld-cris/tls-global-74.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ie-10.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ie-11.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ie-78.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ie-8.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ie-8e1.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ie-9.d2
-rw-r--r--ld/testsuite/ld-cris/tls-js1.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ld-4.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ld-5.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ld-6.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ld-7.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ldgd-14.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ldgd-15.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ldgde-14.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ldgde-15.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ldgdex-14.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ldgdex-15.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ldgdx-14.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ldgdx-15.d2
-rw-r--r--ld/testsuite/ld-cris/tls-le-12.d2
-rw-r--r--ld/testsuite/ld-cris/tls-le-12s.d2
-rw-r--r--ld/testsuite/ld-cris/tls-le-13.d2
-rw-r--r--ld/testsuite/ld-cris/tls-le-13s.d2
-rw-r--r--ld/testsuite/ld-cris/tls-legd-16.d2
-rw-r--r--ld/testsuite/ld-cris/tls-legd-17.d2
-rw-r--r--ld/testsuite/ld-cris/tls-legdx-16.d2
-rw-r--r--ld/testsuite/ld-cris/tls-legdx-17.d2
-rw-r--r--ld/testsuite/ld-cris/tls-leie-18.d2
-rw-r--r--ld/testsuite/ld-cris/tls-leie-19.d2
-rw-r--r--ld/testsuite/ld-cris/tls-local-54.d2
-rw-r--r--ld/testsuite/ld-cris/tls-local-57.d2
-rw-r--r--ld/testsuite/ld-cris/tls-local-58.d2
-rw-r--r--ld/testsuite/ld-cris/tls-local-59.d2
-rw-r--r--ld/testsuite/ld-cris/tls-local-60.d2
-rw-r--r--ld/testsuite/ld-cris/tls-local-61.d2
-rw-r--r--ld/testsuite/ld-cris/tls-local-63.d2
-rw-r--r--ld/testsuite/ld-cris/tls-local-64.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ok-30.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ok-32.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ok-34.d2
-rw-r--r--ld/testsuite/ld-cris/tls-ok-36.d2
-rw-r--r--ld/testsuite/ld-cris/tls-und-38.d2
-rw-r--r--ld/testsuite/ld-cris/tls-und-42.d2
-rw-r--r--ld/testsuite/ld-cris/tls-und-46.d2
-rw-r--r--ld/testsuite/ld-cris/tls-und-50.d2
-rw-r--r--ld/testsuite/ld-cris/undef1.d2
-rw-r--r--ld/testsuite/ld-cris/undef2.d2
-rw-r--r--ld/testsuite/ld-cris/undef3.d2
-rw-r--r--ld/testsuite/ld-cris/v10-v32.d2
-rw-r--r--ld/testsuite/ld-cris/v10-va.d2
-rw-r--r--ld/testsuite/ld-cris/v32-ba-1.d2
-rw-r--r--ld/testsuite/ld-cris/v32-bin-1.d2
-rw-r--r--ld/testsuite/ld-cris/v32-v10.d2
-rw-r--r--ld/testsuite/ld-cris/v32-va.d2
-rw-r--r--ld/testsuite/ld-cris/va-v10.d2
-rw-r--r--ld/testsuite/ld-cris/va-v32.d2
-rw-r--r--ld/testsuite/ld-cris/warn1.d2
-rw-r--r--ld/testsuite/ld-cris/warn2.d2
-rw-r--r--ld/testsuite/ld-cris/warn3.d2
-rw-r--r--ld/testsuite/ld-cris/warn4.d2
-rw-r--r--ld/testsuite/ld-cris/weakhiddso.d2
-rw-r--r--ld/testsuite/ld-cris/weakref1.d2
-rw-r--r--ld/testsuite/ld-cris/weakref2.d2
-rw-r--r--ld/testsuite/ld-cris/weakref3.d2
-rw-r--r--ld/testsuite/ld-cris/weakref4.d2
-rw-r--r--ld/testsuite/ld-elf/tbss4.d13
-rw-r--r--ld/testsuite/ld-elf/tbss4.s25
-rw-r--r--ld/testsuite/ld-elfvers/vers7.c4
-rw-r--r--ld/testsuite/ld-loongarch-elf/32_pcrel.s6
-rw-r--r--ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp2
-rw-r--r--ld/testsuite/ld-loongarch-elf/overflow_32_pcrel.d4
-rw-r--r--ld/testsuite/ld-loongarch-elf/underflow_32_pcrel.d4
-rw-r--r--ld/testsuite/ld-mips-elf/micromips-hilo-n32.d8
-rw-r--r--ld/testsuite/ld-mips-elf/micromips-hilo-n64.d662
-rw-r--r--ld/testsuite/ld-mips-elf/micromips-hilo-srec-n32.d8
-rw-r--r--ld/testsuite/ld-mips-elf/micromips-hilo-srec-n64.d8
-rw-r--r--ld/testsuite/ld-mips-elf/micromips-hilo-srec.d8
-rw-r--r--ld/testsuite/ld-mips-elf/micromips-hilo.d230
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp39
-rw-r--r--ld/testsuite/ld-mips-elf/mips-hilo-n32.d6
-rw-r--r--ld/testsuite/ld-mips-elf/mips-hilo-n64.d660
-rw-r--r--ld/testsuite/ld-mips-elf/mips-hilo-srec-n32.d6
-rw-r--r--ld/testsuite/ld-mips-elf/mips-hilo-srec-n64.d6
-rw-r--r--ld/testsuite/ld-mips-elf/mips-hilo-srec.d6
-rw-r--r--ld/testsuite/ld-mips-elf/mips-hilo.d228
-rw-r--r--ld/testsuite/ld-mips-elf/mips-hilo.ld (renamed from ld/testsuite/ld-mips-elf/mips16-hilo.ld)3
-rw-r--r--ld/testsuite/ld-mips-elf/mips-hilo.s14
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-hilo-n32.d340
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-hilo-srec-n32.d7
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-hilo-srec.d7
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-hilo.d663
-rw-r--r--ld/testsuite/ld-mips-elf/mips16-hilo.s13
-rw-r--r--ld/testsuite/ld-mips-elf/mips16e2-hilo-n32.d8
-rw-r--r--ld/testsuite/ld-mips-elf/mips16e2-hilo-srec-n32.d8
-rw-r--r--ld/testsuite/ld-mips-elf/mips16e2-hilo-srec.d8
-rw-r--r--ld/testsuite/ld-mips-elf/mips16e2-hilo.d230
-rw-r--r--ld/testsuite/ld-mips-elf/pic-and-nonpic-1-r6.s0
-rw-r--r--ld/testsuite/ld-plugin/lto-binutils.exp358
-rw-r--r--ld/testsuite/ld-plugin/lto.exp5
-rw-r--r--ld/testsuite/ld-plugin/pr25618a.h1
-rw-r--r--ld/testsuite/ld-plugin/pr25618b.h1
-rw-r--r--ld/testsuite/ld-plugin/strip-1a-fat.c1
-rw-r--r--ld/testsuite/ld-plugin/strip-1a-fat.rd6
-rw-r--r--ld/testsuite/ld-plugin/strip-1a-s-all.nd3
-rw-r--r--ld/testsuite/ld-plugin/strip-1a.c4
-rw-r--r--ld/testsuite/ld-plugin/strip-1b-fat.c1
-rw-r--r--ld/testsuite/ld-plugin/strip-1b-fat.rd5
-rw-r--r--ld/testsuite/ld-plugin/strip-1b.c3
-rw-r--r--ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp8
-rw-r--r--ld/testsuite/ld-riscv-elf/property-combine-and-1.d6
-rw-r--r--ld/testsuite/ld-riscv-elf/property-combine-and-2.d11
-rw-r--r--ld/testsuite/ld-riscv-elf/property-combine-and-3.d11
-rw-r--r--ld/testsuite/ld-riscv-elf/property-zicfilp-unlabeled.d10
-rw-r--r--ld/testsuite/ld-riscv-elf/property-zicfilp-unlabeled.s21
-rw-r--r--ld/testsuite/ld-riscv-elf/property-zicfiss.d10
-rw-r--r--ld/testsuite/ld-riscv-elf/property-zicfiss.s21
-rw-r--r--ld/testsuite/ld-riscv-elf/property1.s21
-rw-r--r--ld/testsuite/ld-riscv-elf/property2.s5
-rw-r--r--ld/testsuite/ld-riscv-elf/property3.s21
-rw-r--r--ld/testsuite/ld-riscv-elf/property4.s21
-rw-r--r--ld/testsuite/ld-riscv-elf/zicfilp-unlabeled-plt.d35
-rw-r--r--ld/testsuite/ld-riscv-elf/zicfilp-unlabeled-plt.s21
-rw-r--r--ld/testsuite/ld-s390/pr32969_64-1.dd15
-rw-r--r--ld/testsuite/ld-s390/pr32969_64-2.dd15
-rw-r--r--ld/testsuite/ld-s390/pr32969a.s14
-rw-r--r--ld/testsuite/ld-s390/pr32969b.s10
-rw-r--r--ld/testsuite/ld-s390/pr32969c.s10
-rw-r--r--ld/testsuite/ld-s390/s390.exp8
-rw-r--r--ld/testsuite/ld-tic6x/discard-unwind.ld2
-rw-r--r--ld/testsuite/ld-tic6x/unwind.ld2
-rw-r--r--ld/testsuite/ld-x86-64/dwarf4.s346
-rw-r--r--ld/testsuite/ld-x86-64/dwarf5a.s400
-rw-r--r--ld/testsuite/ld-x86-64/dwarf5b.s345
-rw-r--r--ld/testsuite/ld-x86-64/pr32809.d71
-rw-r--r--ld/testsuite/ld-x86-64/sframe-ibt-plt-1.d3
-rw-r--r--ld/testsuite/ld-x86-64/sframe-plt-1.d3
-rw-r--r--ld/testsuite/ld-x86-64/sframe-pltgot-1.d3
-rw-r--r--ld/testsuite/ld-x86-64/sframe-pltgot-2.d3
-rw-r--r--ld/testsuite/ld-x86-64/sframe-reloc-1.d35
-rw-r--r--ld/testsuite/ld-x86-64/sframe-simple-1.d3
-rw-r--r--ld/testsuite/ld-x86-64/x86-64.exp2
-rw-r--r--ld/testsuite/lib/ld-lib.exp9
305 files changed, 5142 insertions, 1462 deletions
diff --git a/ld/NEWS b/ld/NEWS
index 7b5e2e4..74abb54 100644
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -1,5 +1,13 @@
-*- text -*-
+* All SFrame sections generated by the linker have the header flag
+ SFRAME_F_FDE_FUNC_START_PCREL set to indicate the new encoding for
+ sfde_func_start_address field in the SFrame section. Relocatable SFrame
+ links are now fixed.
+
+* On RISC-V, add new PLT formats, and GNU property merge rules for zicfiss and
+ zicfilp extensions.
+
* The linker's --stats option can take an optional argument which if used is
interpreted as a filename into which resource usage information should be
stored. As an alternative mechanism the LD_STATS environment variable can
@@ -12,6 +20,11 @@
* Remove the linker -taso option for Alpha target, as Linux/Alpha kernel
support for 32-bit pointers has been removed.
+* On avr, the default linker scripts now assert that the .progmem sections
+ don't extend past 0xffff since they are accessed by means of LPM.
+ For data in program memory that may be located past 0xffff, a .progmemx
+ section should be used.
+
* On s390, generate ".eh_frame" unwind information for the linker generated
.plt section. Enabled by default. Can be disabled using linker option
--no-ld-generated-unwind-info.
diff --git a/ld/config.in b/ld/config.in
index e10c9e7..3781224 100644
--- a/ld/config.in
+++ b/ld/config.in
@@ -234,9 +234,6 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* The size of `void *', as computed by sizeof. */
-#undef SIZEOF_VOID_P
-
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
diff --git a/ld/configure b/ld/configure
index 3f745ac..64b42f1 100755
--- a/ld/configure
+++ b/ld/configure
@@ -696,8 +696,6 @@ install_as_default
TARGET_SYSTEM_ROOT_DEFINE
TARGET_SYSTEM_ROOT
use_sysroot
-ENABLE_BFD_64_BIT_FALSE
-ENABLE_BFD_64_BIT_TRUE
LARGEFILE_CPPFLAGS
CXXCPP
OTOOL64
@@ -842,7 +840,6 @@ enable_largefile
enable_checking
with_lib_path
enable_targets
-enable_64_bit_bfd
with_sysroot
enable_gold
enable_got
@@ -1536,7 +1533,6 @@ Optional Features:
--disable-largefile omit support for large files
--enable-checking enable run-time checks
--enable-targets alternative target configurations
- --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative,
multigot)
@@ -2177,189 +2173,6 @@ fi
} # ac_fn_cxx_try_link
-# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
-# --------------------------------------------
-# Tries to find the compile-time value of EXPR in a program that includes
-# INCLUDES, setting VAR accordingly. Returns whether the value could be
-# computed
-ac_fn_c_compute_int ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0;
-return test_array [0];
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_lo=0 ac_mid=0
- while :; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_hi=$ac_mid; break
-else
- as_fn_arith $ac_mid + 1 && ac_lo=$as_val
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0;
-return test_array [0];
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_hi=-1 ac_mid=-1
- while :; do
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_lo=$ac_mid; break
-else
- as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- ac_lo= ac_hi=
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
- as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_hi=$ac_mid
-else
- as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in #((
-?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
-'') ac_retval=1 ;;
-esac
- else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- return 1;
- if (($2) < 0)
- {
- long int i = longval ();
- if (i != ($2))
- return 1;
- fprintf (f, "%ld", i);
- }
- else
- {
- unsigned long int i = ulongval ();
- if (i != ($2))
- return 1;
- fprintf (f, "%lu", i);
- }
- /* Do not output a trailing newline, as this causes \r\n confusion
- on some platforms. */
- return ferror (f) || fclose (f) != 0;
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else
- ac_retval=1
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-rm -f conftest.val
-
- fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_compute_int
-
# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
# ---------------------------------------------
# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
@@ -11688,7 +11501,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11691 "configure"
+#line 11504 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11794,7 +11607,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11797 "configure"
+#line 11610 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -15462,70 +15275,40 @@ if test "${enable_targets+set}" = set; then :
esac
fi
-# Check whether --enable-64-bit-bfd was given.
-if test "${enable_64_bit_bfd+set}" = set; then :
- enableval=$enable_64_bit_bfd; case $enableval in #(
- yes|no) :
- ;; #(
- *) :
- as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; #(
- *) :
- ;;
-esac
-else
- enable_64_bit_bfd=no
-fi
-
-
-if test "x$enable_64_bit_bfd" = "xno"; then :
- # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
-$as_echo_n "checking size of void *... " >&6; }
-if ${ac_cv_sizeof_void_p+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then :
-
-else
- if test "$ac_cv_type_void_p" = yes; then
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (void *)
-See \`config.log' for more details" "$LINENO" 5; }
- else
- ac_cv_sizeof_void_p=0
- fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
-$as_echo "$ac_cv_sizeof_void_p" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+# See whether 64-bit bfd lib has been enabled.
+OLD_CPPFLAGS=$CPPFLAGS
+# Put the old CPPFLAGS last, in case the user's CPPFLAGS point somewhere
+# with bfd, with -I/foo/include. We always want our bfd.
+CPPFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CPPFLAGS"
+# Note we cannot cache the result of this check because BFD64 may change
+# when a secondary target has been added or removed and we have no access
+# to this information here.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether BFD is 64-bit" >&5
+$as_echo_n "checking whether BFD is 64-bit... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include "bfd.h"
+int
+main ()
+{
+#ifdef BFD64
+HAVE_BFD64
+#endif
+ ;
+ return 0;
+}
_ACEOF
-
-
- if test "x$ac_cv_sizeof_void_p" = "x8"; then :
- enable_64_bit_bfd=yes
-fi
-
-fi
-
- if test "x$enable_64_bit_bfd" = "xyes"; then
- ENABLE_BFD_64_BIT_TRUE=
- ENABLE_BFD_64_BIT_FALSE='#'
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "HAVE_BFD64" >/dev/null 2>&1; then :
+ have_64_bit_bfd=yes
else
- ENABLE_BFD_64_BIT_TRUE='#'
- ENABLE_BFD_64_BIT_FALSE=
+ have_64_bit_bfd=no
fi
+rm -f conftest*
-
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_64_bit_bfd" >&5
+$as_echo "$have_64_bit_bfd" >&6; }
+CPPFLAGS=$OLD_CPPFLAGS
# Check whether --with-sysroot was given.
@@ -19306,11 +19089,11 @@ do
EMUL=$targ_emul
fi
- if test x${enable_64_bit_bfd} = xno; then
+ if test x${have_64_bit_bfd} = xno; then
. ${srcdir}/../bfd/config.bfd
fi
- if test x${enable_64_bit_bfd} = xyes; then
+ if test x${have_64_bit_bfd} = xyes; then
targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls"
targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath"
fi
@@ -19534,7 +19317,7 @@ _ACEOF
if test x${all_targets} = xtrue; then
- if test x${enable_64_bit_bfd} = xyes; then
+ if test x${have_64_bit_bfd} = xyes; then
EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES) $(ALL_64_EMUL_EXTRA_OFILES)'
else
@@ -19737,10 +19520,6 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-if test -z "${ENABLE_BFD_64_BIT_TRUE}" && test -z "${ENABLE_BFD_64_BIT_FALSE}"; then
- as_fn_error $? "conditional \"ENABLE_BFD_64_BIT\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
if test -z "${ENABLE_LIBCTF_TRUE}" && test -z "${ENABLE_LIBCTF_FALSE}"; then
as_fn_error $? "conditional \"ENABLE_LIBCTF\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/ld/configure.ac b/ld/configure.ac
index 1ee0c0c..e5f56dd 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -495,11 +495,11 @@ do
EMUL=$targ_emul
fi
- if test x${enable_64_bit_bfd} = xno; then
+ if test x${have_64_bit_bfd} = xno; then
. ${srcdir}/../bfd/config.bfd
fi
- if test x${enable_64_bit_bfd} = xyes; then
+ if test x${have_64_bit_bfd} = xyes; then
targ_extra_emuls="$targ_extra_emuls $targ64_extra_emuls"
targ_extra_libpath="$targ_extra_libpath $targ64_extra_libpath"
fi
@@ -686,7 +686,7 @@ AC_SUBST(TDIRS)
AM_SUBST_NOTMAKE(TDIRS)
if test x${all_targets} = xtrue; then
- if test x${enable_64_bit_bfd} = xyes; then
+ if test x${have_64_bit_bfd} = xyes; then
EMULATION_OFILES='$(ALL_EMULATIONS) $(ALL_64_EMULATIONS)'
EMUL_EXTRA_OFILES='$(ALL_EMUL_EXTRA_OFILES) $(ALL_64_EMUL_EXTRA_OFILES)'
else
diff --git a/ld/emultempl/emulation.em b/ld/emultempl/emulation.em
index 7fe821a..8ff71d6 100644
--- a/ld/emultempl/emulation.em
+++ b/ld/emultempl/emulation.em
@@ -36,6 +36,7 @@ struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
${LDEMUL_EMIT_CTF_EARLY-NULL},
${LDEMUL_ACQUIRE_STRINGS_FOR_CTF-NULL},
${LDEMUL_NEW_DYNSYM_FOR_CTF-NULL},
- ${LDEMUL_PRINT_SYMBOL-NULL}
+ ${LDEMUL_PRINT_SYMBOL-NULL},
+ ${LDEMUL_FIND_START_SYMBOL-NULL}
};
EOF
diff --git a/ld/emultempl/kvxelf.em b/ld/emultempl/kvxelf.em
index 186f148..c9a83f7 100644
--- a/ld/emultempl/kvxelf.em
+++ b/ld/emultempl/kvxelf.em
@@ -173,7 +173,7 @@ elf${ELFSIZE}_kvx_add_stub_section (const char *stub_sec_name,
return stub_sec;
err_ret:
- einfo ("%X%P: can not make stub section: %E\n");
+ einfo (_("%X%P: can not make stub section: %E\n"));
return NULL;
}
@@ -216,7 +216,7 @@ gld${EMULATION_NAME}_after_allocation (void)
ret = bfd_elf_discard_info (link_info.output_bfd, & link_info);
if (ret < 0)
{
- einfo ("%X%P: .eh_frame/.stab edit: %E\n");
+ einfo (_("%X%P: .eh_frame/.stab edit: %E\n"));
return;
}
else if (ret > 0)
@@ -232,7 +232,7 @@ gld${EMULATION_NAME}_after_allocation (void)
{
if (ret < 0)
{
- einfo ("%X%P: could not compute sections lists for stub generation: %E\n");
+ einfo (_("%X%P: could not compute sections lists for stub generation: %E\n"));
return;
}
@@ -246,7 +246,7 @@ gld${EMULATION_NAME}_after_allocation (void)
& elf${ELFSIZE}_kvx_add_stub_section,
& gldkvx_layout_sections_again))
{
- einfo ("%X%P: cannot size stub section: %E\n");
+ einfo (_("%X%P: cannot size stub section: %E\n"));
return;
}
}
@@ -266,7 +266,7 @@ gld${EMULATION_NAME}_finish (void)
&& stub_file->the_bfd->sections != NULL)
{
if (! elf${ELFSIZE}_kvx_build_stubs (& link_info))
- einfo ("%X%P: can not build stubs: %E\n");
+ einfo (_("%X%P: can not build stubs: %E\n"));
}
}
@@ -291,7 +291,7 @@ kvx_elf_create_output_section_statements (void)
bfd_get_arch (link_info.output_bfd),
bfd_get_mach (link_info.output_bfd)))
{
- einfo ("%X%P: can not create BFD %E\n");
+ fatal (_("%P: can not create BFD %E\n"));
return;
}
@@ -299,7 +299,7 @@ kvx_elf_create_output_section_statements (void)
ldlang_add_file (stub_file);
if (!kvx_elf${ELFSIZE}_init_stub_bfd (&link_info, stub_file->the_bfd))
- einfo ("%P: can not init BFD: %E\n");
+ fatal (_("%P: can not init BFD: %E\n"));
}
diff --git a/ld/emultempl/pe.em b/ld/emultempl/pe.em
index 50bb082..b522687 100644
--- a/ld/emultempl/pe.em
+++ b/ld/emultempl/pe.em
@@ -2448,6 +2448,55 @@ gld${EMULATION_NAME}_find_potential_libraries
{
return ldfile_open_file_search (name, entry, "", ".lib");
}
+
+static struct bfd_link_hash_entry *
+gld${EMULATION_NAME}_find_alt_start_symbol
+ (struct bfd_sym_chain *entry)
+{
+#if defined (TARGET_IS_i386pe)
+ bool entry_has_stdcall_suffix;
+#endif
+ struct bfd_link_hash_entry *h;
+ size_t entry_name_len;
+ char *symbol_name;
+ const char *prefix;
+ const char *suffix;
+
+ entry_name_len = strlen (entry->name);
+
+ if (is_underscoring ())
+ prefix = "_";
+ else
+ prefix = "";
+
+#if defined (TARGET_IS_i386pe)
+ if ((entry_name_len > 2 && entry->name[entry_name_len-2] == '@' && ISDIGIT (entry->name[entry_name_len-1]))
+ || (entry_name_len > 3 && entry->name[entry_name_len-3] == '@' && ISDIGIT (entry->name[entry_name_len-2]) && ISDIGIT (entry->name[entry_name_len-1]))
+ || (entry_name_len > 4 && entry->name[entry_name_len-4] == '@' && ISDIGIT (entry->name[entry_name_len-3]) && ISDIGIT (entry->name[entry_name_len-2]) && ISDIGIT (entry->name[entry_name_len-1])))
+ entry_has_stdcall_suffix = true;
+ else
+ entry_has_stdcall_suffix = false;
+
+ if (!entry_has_stdcall_suffix && (bfd_link_dll (&link_info) || dll))
+ suffix = "@12";
+ else if (!entry_has_stdcall_suffix && pe_subsystem == 1 /* NT kernel driver */)
+ suffix = "@8";
+ else
+#endif
+ suffix = "";
+
+ if (*prefix == '\0' && *suffix == '\0')
+ return NULL;
+
+ symbol_name = xmalloc (entry_name_len + 5);
+ strcpy (symbol_name, prefix);
+ strcat (symbol_name, entry->name);
+ strcat (symbol_name, suffix);
+
+ h = bfd_link_hash_lookup (link_info.hash, symbol_name, false, false, true);
+ free (symbol_name);
+ return h;
+}
static char *
gld${EMULATION_NAME}_get_script (int *isfile)
@@ -2526,5 +2575,6 @@ LDEMUL_UNRECOGNIZED_FILE=gld${EMULATION_NAME}_unrecognized_file
LDEMUL_LIST_OPTIONS=gld${EMULATION_NAME}_list_options
LDEMUL_RECOGNIZED_FILE=gld${EMULATION_NAME}_recognized_file
LDEMUL_FIND_POTENTIAL_LIBRARIES=gld${EMULATION_NAME}_find_potential_libraries
+LDEMUL_FIND_START_SYMBOL=gld${EMULATION_NAME}_find_alt_start_symbol
source_em ${srcdir}/emultempl/emulation.em
diff --git a/ld/ld.texi b/ld/ld.texi
index e8e09f8..afcc3fe 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -531,7 +531,9 @@ named @var{entry}, the linker will try to parse @var{entry} as a number,
and use that as the entry address (the number will be interpreted in
base 10; you may use a leading @samp{0x} for base 16, or a leading
@samp{0} for base 8). @xref{Entry Point}, for a discussion of defaults
-and other ways of specifying the entry point.
+and other ways of specifying the entry point. For i386 PE, @var{entry}
+can be also the original function name (without the leading underscore
+and/or the trailing stdcall @samp{@@number} when applicable).
@kindex --exclude-libs
@item --exclude-libs @var{lib},@var{lib},...
@@ -1022,7 +1024,7 @@ Write a @dfn{dependency file} to @var{depfile}. This file contains a rule
suitable for @code{make} describing the output file and all the input files
that were read to produce it. The output is similar to the compiler's
output with @samp{-M -MP} (@pxref{Preprocessor Options,, Options
-Controlling the Preprocessor, gcc.info, Using the GNU Compiler
+Controlling the Preprocessor, gcc, Using the GNU Compiler
Collection}). Note that there is no option like the compiler's @samp{-MM},
to exclude ``system files'' (which is not a well-specified concept in the
linker, unlike ``system headers'' in the compiler). So the output from
@@ -9684,7 +9686,7 @@ format can be supported simply by creating a new BFD back end and adding
it to the library. To conserve runtime memory, however, the linker and
associated tools are usually configured to support only a subset of the
object file formats available. You can use @code{objdump -i}
-(@pxref{objdump,,objdump,binutils.info,The GNU Binary Utilities}) to
+(@pxref{objdump,,objdump,binutils,The GNU Binary Utilities}) to
list all the formats available for your configuration.
@cindex BFD requirements
diff --git a/ld/ldemul.c b/ld/ldemul.c
index dce0d38..35f91a2 100644
--- a/ld/ldemul.c
+++ b/ld/ldemul.c
@@ -35,6 +35,14 @@
static ld_emulation_xfer_type *ld_emulation;
+struct bfd_link_hash_entry *
+ldemul_find_alt_start_symbol (struct bfd_sym_chain *entry)
+{
+ if (ld_emulation->find_alt_start_symbol)
+ return ld_emulation->find_alt_start_symbol (entry);
+ return NULL;
+}
+
void
ldemul_hll (char *name)
{
diff --git a/ld/ldemul.h b/ld/ldemul.h
index aa014ae..c58d4c2 100644
--- a/ld/ldemul.h
+++ b/ld/ldemul.h
@@ -115,9 +115,10 @@ extern void ldemul_acquire_strings_for_ctf
(struct ctf_dict *, struct elf_strtab_hash *);
extern void ldemul_new_dynsym_for_ctf
(struct ctf_dict *, int symidx, struct elf_internal_sym *);
-
extern bool ldemul_print_symbol
(struct bfd_link_hash_entry *hash_entry, void *ptr);
+extern struct bfd_link_hash_entry * ldemul_find_alt_start_symbol
+ (struct bfd_sym_chain *);
typedef struct ld_emulation_xfer_struct {
/* Run before parsing the command line and script file.
@@ -259,6 +260,11 @@ typedef struct ld_emulation_xfer_struct {
bool (*print_symbol)
(struct bfd_link_hash_entry *hash_entry, void *ptr);
+ /* Called when ENTRY->name cannot be found by a direct lookup in INFO->hash.
+ Allows emulations to try variations of the name. */
+ struct bfd_link_hash_entry * (*find_alt_start_symbol)
+ (struct bfd_sym_chain *entry);
+
} ld_emulation_xfer_type;
typedef enum {
diff --git a/ld/ldlang.c b/ld/ldlang.c
index 0bb9e17..32e6e7a 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -322,7 +322,7 @@ spec_match (const struct wildcard_spec *spec, const char *name)
}
static char *
-ldirname (const char *name)
+stat_ldirname (const char *name)
{
const char *base = lbasename (name);
@@ -1266,7 +1266,7 @@ new_afile (const char *name,
/* If name is a relative path, search the directory of the current linker
script first. */
if (from_filename && !IS_ABSOLUTE_PATH (name))
- p->extra_search_path = ldirname (from_filename);
+ p->extra_search_path = stat_ldirname (from_filename);
p->flags.real = true;
p->flags.search_dirs = true;
break;
@@ -2486,11 +2486,18 @@ lang_map (void)
}
static bool
+is_defined (struct bfd_link_hash_entry *h)
+{
+ return h != NULL
+ && (h->type == bfd_link_hash_defined
+ || h->type == bfd_link_hash_defweak);
+}
+
+static bool
sort_def_symbol (struct bfd_link_hash_entry *hash_entry,
void *info ATTRIBUTE_UNUSED)
{
- if ((hash_entry->type == bfd_link_hash_defined
- || hash_entry->type == bfd_link_hash_defweak)
+ if (is_defined (hash_entry)
&& hash_entry->u.def.section->owner != link_info.output_bfd
&& hash_entry->u.def.section->owner != NULL)
{
@@ -4184,9 +4191,7 @@ ldlang_check_require_defined_symbols (void)
h = bfd_link_hash_lookup (link_info.hash, ptr->name,
false, false, true);
- if (h == NULL
- || (h->type != bfd_link_hash_defined
- && h->type != bfd_link_hash_defweak))
+ if (! is_defined (h))
einfo(_("%X%P: required symbol `%s' not defined\n"), ptr->name);
}
}
@@ -4892,9 +4897,7 @@ print_assignment (lang_assignment_statement_type *assignment,
h = bfd_link_hash_lookup (link_info.hash, assignment->exp->assign.dst,
false, false, true);
- if (h != NULL
- && (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_defweak))
+ if (is_defined (h))
{
value = h->u.def.value;
value += h->u.def.section->output_section->vma;
@@ -4939,8 +4942,7 @@ print_one_symbol (struct bfd_link_hash_entry *hash_entry, void *ptr)
{
asection *sec = (asection *) ptr;
- if ((hash_entry->type == bfd_link_hash_defined
- || hash_entry->type == bfd_link_hash_defweak)
+ if (is_defined (hash_entry)
&& sec == hash_entry->u.def.section)
{
print_spaces (SECTION_NAME_MAP_LENGTH);
@@ -5062,7 +5064,8 @@ print_input_section (asection *i, bool is_discarded)
}
print_spaces (SECTION_NAME_MAP_LENGTH - len);
- if (i->output_section != NULL
+ if ((i->flags & SEC_EXCLUDE) == 0
+ && i->output_section != NULL
&& i->output_section->owner == link_info.output_bfd)
addr = i->output_section->vma + i->output_offset;
else
@@ -7233,9 +7236,7 @@ lang_end (void)
{
h = bfd_link_hash_lookup (link_info.hash, sym->name,
false, false, false);
- if (h != NULL
- && (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_defweak)
+ if (is_defined (h)
&& !bfd_is_const_section (h->u.def.section))
break;
}
@@ -7254,9 +7255,11 @@ lang_end (void)
h = bfd_link_hash_lookup (link_info.hash, entry_symbol.name,
false, false, true);
- if (h != NULL
- && (h->type == bfd_link_hash_defined
- || h->type == bfd_link_hash_defweak)
+
+ if (! is_defined (h) || h->u.def.section->output_section == NULL)
+ h = ldemul_find_alt_start_symbol (&entry_symbol);
+
+ if (is_defined (h)
&& h->u.def.section->output_section != NULL)
{
bfd_vma val;
diff --git a/ld/ldmisc.c b/ld/ldmisc.c
index 9ee0781..3f305fa 100644
--- a/ld/ldmisc.c
+++ b/ld/ldmisc.c
@@ -42,7 +42,6 @@
%C clever filename:linenumber with function
%D like %C, but no function name
%E current bfd error or errno
- %F error is fatal
%G like %D, but only function name
%H like %C but in addition emit section+offset
%P print program name
@@ -70,7 +69,6 @@
void
vfinfo (FILE *fp, const char *fmt, va_list ap, bool is_warning)
{
- bool isfatal = false;
const char *scan;
int arg_type;
unsigned int arg_count = 0;
@@ -280,11 +278,6 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bool is_warning)
}
break;
- case 'F':
- /* Error is fatal. */
- isfatal = true;
- break;
-
case 'P':
/* Print program name. */
fprintf (fp, "%s", program_name);
@@ -586,9 +579,6 @@ vfinfo (FILE *fp, const char *fmt, va_list ap, bool is_warning)
if (is_warning && config.fatal_warnings)
config.make_executable = false;
-
- if (isfatal)
- xexit (1);
}
/* Format info message and print on stdout. */
diff --git a/ld/pe-dll.c b/ld/pe-dll.c
index 4a2ea03..210b77e 100644
--- a/ld/pe-dll.c
+++ b/ld/pe-dll.c
@@ -1620,10 +1620,11 @@ generate_reloc (bfd *abfd, struct bfd_link_info *info)
printf ("rel: %s\n", sym->name);
}
if (!relocs[i]->howto->pc_relative
- && relocs[i]->howto->type != pe_details->imagebase_reloc
- && (relocs[i]->howto->type < pe_details->secrel_reloc_lo
- || relocs[i]->howto->type > pe_details->secrel_reloc_hi)
- && relocs[i]->howto->type != pe_details->section_reloc)
+ && (bfd_get_flavour (b) != bfd_target_coff_flavour
+ || (relocs[i]->howto->type != pe_details->imagebase_reloc
+ && (relocs[i]->howto->type < pe_details->secrel_reloc_lo
+ || relocs[i]->howto->type > pe_details->secrel_reloc_hi)
+ && relocs[i]->howto->type != pe_details->section_reloc)))
{
struct bfd_symbol *sym = *relocs[i]->sym_ptr_ptr;
const struct bfd_link_hash_entry *blhe
diff --git a/ld/scripttempl/avr.sc b/ld/scripttempl/avr.sc
index 8479ec3..4d9af7f 100644
--- a/ld/scripttempl/avr.sc
+++ b/ld/scripttempl/avr.sc
@@ -189,11 +189,16 @@ SECTIONS
${RELOCATING+*(.vectors)
KEEP(*(.vectors))
- /* For data that needs to reside in the lower 64k of progmem. */
- *(.progmem.gcc*)
+ /* For data that needs to reside in the lower 64k of progmem.
+ For data accessed with ELPM use .progmemx.* instead
+ so that no lower 64k .progmem addresses are wasted. */
+ __progmem_start = . ;
+ *(.progmem)
+ *(.progmem.*)
+ __progmem_end = . ;
+ ASSERT (__progmem_start == __progmem_end || __progmem_end <= 0x10000,
+ \".progmem section exceeds 0x10000\");
- /* PR 13812: Placing the trampolines here gives a better chance
- that they will be in range of the code that uses them. */
. = ALIGN(2);
__trampolines_start = . ;
/* The jump trampolines for the 16-bit limited relocs will reside here. */
@@ -201,12 +206,6 @@ SECTIONS
*(.trampolines*)
__trampolines_end = . ;
- /* avr-libc expects these data to reside in lower 64K. */
- *libprintf_flt.a:*(.progmem.data)
- *libc.a:*(.progmem.data)
-
- *(.progmem.*)
-
. = ALIGN(2);
/* For code that needs to reside in the lower 128k progmem. */
@@ -273,6 +272,7 @@ SECTIONS
*(.hightext)
*(.hightext*)
+ *(.progmemx)
*(.progmemx.*)
. = ALIGN(2);
diff --git a/ld/scripttempl/pe.sc b/ld/scripttempl/pe.sc
index 96a4751..8fb98b2 100644
--- a/ld/scripttempl/pe.sc
+++ b/ld/scripttempl/pe.sc
@@ -14,7 +14,7 @@ fi
# substitution, so we do this instead.
# Sorting of the .foo$* sections is required by the definition of
# grouped sections in PE.
-# Sorting of the file names in R_IDATA is required by the
+# Sorting of the file names in R_IDATA and R_DIDAT is required by the
# current implementation of dlltool (this could probably be changed to
# use grouped sections instead).
if test "${RELOCATING}"; then
@@ -39,6 +39,18 @@ if test "${RELOCATING}"; then
R_IDATA67='
KEEP (SORT(*)(.idata$6))
KEEP (SORT(*)(.idata$7))'
+ R_DIDAT234='
+ __DELAY_IMPORT_DIRECTORY_start__ = .;
+ KEEP (SORT(*)(.didat$2))
+ KEEP (SORT(*)(.didat$3))
+ __DELAY_IMPORT_DIRECTORY_end__ = .;
+ /* These zeroes mark the end of the import list. */
+ . += (__DELAY_IMPORT_DIRECTORY_end__ - __DELAY_IMPORT_DIRECTORY_start__) ? 8*4 : 0;
+ KEEP (SORT(*)(.didat$4))'
+ R_DIDAT5='KEEP (SORT(*)(.didat$5))'
+ R_DIDAT67='
+ KEEP (SORT(*)(.didat$6))
+ KEEP (SORT(*)(.didat$7))'
R_CRT_XC='KEEP (*(SORT(.CRT$XC*))) /* C initialization */'
R_CRT_XI='KEEP (*(SORT(.CRT$XI*))) /* C++ initialization */'
R_CRT_XL='KEEP (*(SORT(.CRT$XL*))) /* TLS callbacks */'
@@ -61,6 +73,9 @@ else
R_IDATA234=
R_IDATA5=
R_IDATA67=
+ R_DIDAT234=
+ R_DIDAT5=
+ R_DIDAT67=
R_CRT_XC=
R_CRT_XI=
R_CRT_XL=
@@ -131,6 +146,11 @@ SECTIONS
${RELOCATING+__rt_psrelocs_start = .;}
${RELOCATING+KEEP(*(.rdata_runtime_pseudo_reloc))}
${RELOCATING+__rt_psrelocs_end = .;}
+ /* read-only parts of .didat */
+ /* This cannot currently be handled with grouped sections.
+ See pe.em:sort_sections. */
+ ${R_DIDAT234}
+ ${R_DIDAT67}
/* .ctors & .dtors */
${CONSTRUCTING+
@@ -244,6 +264,13 @@ SECTIONS
${R_IDATA67}
}
+ .didat ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ /* This cannot currently be handled with grouped sections.
+ See pe.em:sort_sections. */
+ ${R_DIDAT5}
+ }
+
/* Windows TLS expects .tls\$AAA to be at the start and .tls\$ZZZ to be
at the end of section. This is important because _tls_start MUST
be at the beginning of the section to enable SECREL32 relocations with TLS
diff --git a/ld/scripttempl/pep.sc b/ld/scripttempl/pep.sc
index e2c6c2c..841ee35 100644
--- a/ld/scripttempl/pep.sc
+++ b/ld/scripttempl/pep.sc
@@ -14,7 +14,7 @@ fi
# substitution, so we do this instead.
# Sorting of the .foo$* sections is required by the definition of
# grouped sections in PE.
-# Sorting of the file names in R_IDATA is required by the
+# Sorting of the file names in R_IDATA and R_DIDAT is required by the
# current implementation of dlltool (this could probably be changed to
# use grouped sections instead).
if test "${RELOCATING}"; then
@@ -40,6 +40,19 @@ if test "${RELOCATING}"; then
R_IDATA67='
KEEP (SORT(*)(.idata$6))
KEEP (SORT(*)(.idata$7))'
+ R_DIDAT234='
+ __DELAY_IMPORT_DIRECTORY_start__ = .;
+ KEEP (SORT(*)(.didat$2))
+ KEEP (SORT(*)(.didat$3))
+ __DELAY_IMPORT_DIRECTORY_end__ = .;
+ /* These zeroes mark the end of the import list. */
+ . += (__DELAY_IMPORT_DIRECTORY_end__ - __DELAY_IMPORT_DIRECTORY_start__) ? 8*4 : 0;
+ . = ALIGN(8);
+ KEEP (SORT(*)(.didat$4))'
+ R_DIDAT5='SORT(*)(.didat$5)'
+ R_DIDAT67='
+ KEEP (SORT(*)(.didat$6))
+ KEEP (SORT(*)(.didat$7))'
R_CRT_XC='KEEP (*(SORT(.CRT$XC*))) /* C initialization */'
R_CRT_XI='KEEP (*(SORT(.CRT$XI*))) /* C++ initialization */'
R_CRT_XL='KEEP (*(SORT(.CRT$XL*))) /* TLS callbacks */'
@@ -62,6 +75,9 @@ else
R_IDATA234=
R_IDATA5=
R_IDATA67=
+ R_DIDAT234=
+ R_DIDAT5=
+ R_DIDAT67=
R_CRT_XC=
R_CRT_XI=
R_CRT_XL=
@@ -132,6 +148,12 @@ SECTIONS
${RELOCATING+__rt_psrelocs_start = .;}
${RELOCATING+KEEP(*(.rdata_runtime_pseudo_reloc))}
${RELOCATING+__rt_psrelocs_end = .;}
+ /* read-only parts of .didat */
+ /* This cannot currently be handled with grouped sections.
+ See pe.em:sort_sections. */
+ ${RELOCATING+. = ALIGN(8);}
+ ${R_DIDAT234}
+ ${R_DIDAT67}
/* .ctors & .dtors */
${CONSTRUCTING+. = ALIGN(8);}
@@ -251,6 +273,13 @@ SECTIONS
${R_IDATA67}
}
+ .didat ${RELOCATING+BLOCK(__section_alignment__)} :
+ {
+ /* This cannot currently be handled with grouped sections.
+ See pep.em:sort_sections. */
+ ${R_DIDAT5}
+ }
+
/* Windows TLS expects .tls\$AAA to be at the start and .tls\$ZZZ to be
at the end of the .tls section. This is important because _tls_start MUST
be at the beginning of the section to enable SECREL32 relocations with TLS
diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp
index 66721ff..1d69681 100644
--- a/ld/testsuite/config/default.exp
+++ b/ld/testsuite/config/default.exp
@@ -538,10 +538,11 @@ if { [check_compiler_available] } {
}
}
-if {[file exists .libs/libdep.so]} {
- set dep_plug_opt "--plugin .libs/libdep.so"
-} elseif {[file exists .libs/libdep.dll]} {
- set dep_plug_opt "--plugin .libs/libdep.dll"
-} else {
- set dep_plug_opt ""
+set dep_plug_opt ""
+if [check_plugin_api_available] {
+ if {[file exists .libs/libdep.so]} {
+ set dep_plug_opt "--plugin .libs/libdep.so"
+ } elseif {[file exists .libs/libdep.dll]} {
+ set dep_plug_opt "--plugin .libs/libdep.dll"
+ }
}
diff --git a/ld/testsuite/ld-aarch64/aarch64.ld b/ld/testsuite/ld-aarch64/aarch64.ld
index 75ee3b5..765ddf5 100644
--- a/ld/testsuite/ld-aarch64/aarch64.ld
+++ b/ld/testsuite/ld-aarch64/aarch64.ld
@@ -3,17 +3,23 @@ OUTPUT_ARCH(aarch64)
ENTRY(_start)
SECTIONS
{
- /* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0x8000); . = 0x8000;
- .text :
+ PROVIDE (__executable_start = 0x8000);
+ . = SEGMENT_START("text-segment", 0x8000) + SIZEOF_HEADERS;
+ /* Start of the executable code region. */
+ . = 0x9000;
+ .plt : ALIGN(16) { *(.plt) *(.iplt) }
+ . = 0x10000;
+ .text :
{
*(.before)
*(.text)
*(.after)
} =0
- . = 0x9000;
- .got : { *(.got) *(.got.plt)}
. = 0x12340000;
- .far : { *(.far) }
- .ARM.attributes 0 : { *(.ARM.atttributes) }
+ .far : { *(.far) }
+ /* Start of the Read Write Data region. */
+ . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1));
+ .got : { *(.got) *(.got.plt)}
+ /* Start of the metadata region. */
+ .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
}
diff --git a/ld/testsuite/ld-aarch64/gc-got-relocs.d b/ld/testsuite/ld-aarch64/gc-got-relocs.d
index 6525d10..a1821c3 100644
--- a/ld/testsuite/ld-aarch64/gc-got-relocs.d
+++ b/ld/testsuite/ld-aarch64/gc-got-relocs.d
@@ -12,15 +12,14 @@
.*: file format elf64-(little|big)aarch64
SYMBOL TABLE:
-0+8000 l d \.text 0+ \.text
-0+0000 l df \*ABS\* 0+ .*
-0+8000 g \.text 0+ _start
+0+10000 l d \.text 0+ \.text
+0+00000 l df \*ABS\* 0+ .*
+0+10000 g \.text 0+ _start
Contents of section .text:
- 8000 1f2003d5 .*
+ 10000 1f2003d5 .*
-Disassembly of section .text:
-
-0+8000 \<_start>:
- 8000: d503201f nop
+Disassembly of section \.text:
+0+10000 \<_start>:
+ 10000: d503201f nop
diff --git a/ld/testsuite/ld-aarch64/gc-plt-relocs.d b/ld/testsuite/ld-aarch64/gc-plt-relocs.d
index 5c9b5fe..ac455f8 100644
--- a/ld/testsuite/ld-aarch64/gc-plt-relocs.d
+++ b/ld/testsuite/ld-aarch64/gc-plt-relocs.d
@@ -13,36 +13,36 @@
.*: file format elf64-(little|big)aarch64
DYNAMIC SYMBOL TABLE:
-0+8000 g DF \.text 0+4 _start
-0+0000 D \*UND\* 0+ foo
-0+8008 g DF \.text 0+ bar
+0+10000 g DF \.text 0+4 _start
+0+00000 D \*UND\* 0+ foo
+0+10008 g DF \.text 0+ bar
+
+Disassembly of section \.plt:
+
+0+9000 \<\.plt\>:
+ 9000: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
+ 9004: f00919b0 adrp x16, 12340000 \<_GLOBAL_OFFSET_TABLE_\>
+ 9008: f9400e11 ldr x17, \[x16, #24\]
+ 900c: 91006210 add x16, x16, #0x18
+ 9010: d61f0220 br x17
+ 9014: d503201f nop
+ 9018: d503201f nop
+ 901c: d503201f nop
+ 9020: f00919b0 adrp x16, 12340000 \<_GLOBAL_OFFSET_TABLE_\>
+ 9024: f9401211 ldr x17, \[x16, #32\]
+ 9028: 91008210 add x16, x16, #0x20
+ 902c: d61f0220 br x17
Disassembly of section .text:
-0+8000 \<_start\>:
- 8000: 9400000c bl 8030 \<.*>
-
-0+8004 \<hidfn\>:
- 8004: 8a000000 and x0, x0, x0
-
-0+8008 \<bar\>:
- 8008: 14000001 b 800c \<foo\>
-
-0+800c \<foo\>:
- 800c: 97fffffe bl 8004 \<hidfn\>
-
-Disassembly of section .plt:
-
-0+8010 \<\.plt\>:
- 8010: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
- 8014: b0000010 adrp x16, 9000 .*
- 8018: f9400e11 ldr x17, \[x16, #24\]
- 801c: 91006210 add x16, x16, #0x18
- 8020: d61f0220 br x17
- 8024: d503201f nop
- 8028: d503201f nop
- 802c: d503201f nop
- 8030: b0000010 adrp x16, 9000 .*
- 8034: f9401211 ldr x17, \[x16, #32\]
- 8038: 91008210 add x16, x16, #0x20
- 803c: d61f0220 br x17
+0+10000 \<_start\>:
+ 10000: 97ffe408 bl 9020 \<\.plt\+0x20>
+
+0+10004 \<hidfn\>:
+ 10004: 8a000000 and x0, x0, x0
+
+0+10008 \<bar\>:
+ 10008: 14000001 b 1000c \<foo\>
+
+0+1000c \<foo\>:
+ 1000c: 97fffffe bl 10004 \<hidfn\>
diff --git a/ld/testsuite/ld-aarch64/gc-relocs-257-dyn.d b/ld/testsuite/ld-aarch64/gc-relocs-257-dyn.d
index 56fcfa4..2e5e4c6 100644
--- a/ld/testsuite/ld-aarch64/gc-relocs-257-dyn.d
+++ b/ld/testsuite/ld-aarch64/gc-relocs-257-dyn.d
@@ -13,5 +13,5 @@
Disassembly of section .text:
-0+8000 \<_start\>:
- 8000: d503201f nop
+0+10000 \<_start\>:
+ 10000: d503201f nop
diff --git a/ld/testsuite/ld-aarch64/gc-relocs-257.d b/ld/testsuite/ld-aarch64/gc-relocs-257.d
index ffa7571..022b407 100644
--- a/ld/testsuite/ld-aarch64/gc-relocs-257.d
+++ b/ld/testsuite/ld-aarch64/gc-relocs-257.d
@@ -12,5 +12,5 @@
Disassembly of section .text:
-0+8000 \<_start\>:
- 8000: d503201f nop
+0+10000 \<_start\>:
+ 10000: d503201f nop
diff --git a/ld/testsuite/ld-aarch64/gc-tls-relocs.d b/ld/testsuite/ld-aarch64/gc-tls-relocs.d
index 38637dc..2f2210c 100644
--- a/ld/testsuite/ld-aarch64/gc-tls-relocs.d
+++ b/ld/testsuite/ld-aarch64/gc-tls-relocs.d
@@ -13,15 +13,15 @@
.*: file format elf64-(little|big)aarch64
SYMBOL TABLE:
-0+8000 l d \.text 0+ \.text
-0+0000 l df \*ABS\* 0+ .*
-0+8000 g \.text 0+ _start
+0+10000 l d \.text 0+ \.text
+0+00000 l df \*ABS\* 0+ .*
+0+10000 g \.text 0+ _start
Contents of section .text:
- 8000 1f2003d5 .*
+ 10000 1f2003d5 .*
-Disassembly of section .text:
+Disassembly of section \.text:
-0+8000 \<_start>:
- 8000: d503201f nop
+0+10000 \<_start>:
+ 10000: d503201f nop
diff --git a/ld/testsuite/ld-aarch64/protections/bti-and-memory-seal-plt-1-a.d b/ld/testsuite/ld-aarch64/protections/bti-and-memory-seal-plt-1-a.d
index f8b1c21..7409525 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-and-memory-seal-plt-1-a.d
+++ b/ld/testsuite/ld-aarch64/protections/bti-and-memory-seal-plt-1-a.d
@@ -13,7 +13,7 @@ Disassembly of section \.plt:
[0-9]+ <\.plt>:
.*: d503245f bti c
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9400e11 ldr x17, \[x16, #24\]
.*: 91006210 add x16, x16, #0x18
.*: d61f0220 br x17
@@ -21,25 +21,25 @@ Disassembly of section \.plt:
.*: d503201f nop
[0-9]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401211 ldr x17, \[x16, #32\]
.*: 91008210 add x16, x16, #0x20
.*: d61f0220 br x17
[0-9]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401611 ldr x17, \[x16, #40\]
.*: 9100a210 add x16, x16, #0x28
.*: d61f0220 br x17
[0-9]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401a11 ldr x17, \[x16, #48\]
.*: 9100c210 add x16, x16, #0x30
.*: d61f0220 br x17
[0-9]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401e11 ldr x17, \[x16, #56\]
.*: 9100e210 add x16, x16, #0x38
.*: d61f0220 br x17
diff --git a/ld/testsuite/ld-aarch64/protections/bti-far-1.d b/ld/testsuite/ld-aarch64/protections/bti-far-1.d
index 63fbb43..eb295cf 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-far-1.d
+++ b/ld/testsuite/ld-aarch64/protections/bti-far-1.d
@@ -13,7 +13,7 @@ Disassembly of section \.plt:
0000000000018000 <\.plt>:
18000: d503245f bti c
18004: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
- 18008: 900000d0 adrp x16, 30000 <_GLOBAL_OFFSET_TABLE_>
+ 18008: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
1800c: f9400e11 ldr x17, \[x16, #24\]
18010: 91006210 add x16, x16, #0x18
18014: d61f0220 br x17
@@ -21,7 +21,7 @@ Disassembly of section \.plt:
1801c: d503201f nop
0000000000018020 <foo@plt>:
- 18020: 900000d0 adrp x16, 30000 <_GLOBAL_OFFSET_TABLE_>
+ 18020: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
18024: f9401211 ldr x17, \[x16, #32\]
18028: 91008210 add x16, x16, #0x20
1802c: d61f0220 br x17
diff --git a/ld/testsuite/ld-aarch64/protections/bti-far-opt.d b/ld/testsuite/ld-aarch64/protections/bti-far-opt.d
index cb293b6..f5038c0 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-far-opt.d
+++ b/ld/testsuite/ld-aarch64/protections/bti-far-opt.d
@@ -13,7 +13,7 @@ Disassembly of section \.plt:
0000000000018000 <\.plt>:
18000: d503245f bti c
18004: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
- 18008: 900000d0 adrp x16, 30000 <_GLOBAL_OFFSET_TABLE_>
+ 18008: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
1800c: f9400e11 ldr x17, \[x16, #24\]
18010: 91006210 add x16, x16, #0x18
18014: d61f0220 br x17
@@ -21,7 +21,7 @@ Disassembly of section \.plt:
1801c: d503201f nop
0000000000018020 <foo@plt>:
- 18020: 900000d0 adrp x16, 30000 <_GLOBAL_OFFSET_TABLE_>
+ 18020: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
18024: f9401211 ldr x17, \[x16, #32\]
18028: 91008210 add x16, x16, #0x20
1802c: d61f0220 br x17
diff --git a/ld/testsuite/ld-aarch64/protections/bti-far.ld b/ld/testsuite/ld-aarch64/protections/bti-far.ld
index 214b8cb..1568f18 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-far.ld
+++ b/ld/testsuite/ld-aarch64/protections/bti-far.ld
@@ -2,14 +2,28 @@ OUTPUT_ARCH(aarch64)
ENTRY(_start)
SECTIONS
{
+ PROVIDE(__executable_start = 0x8000);
+ . = SEGMENT_START("text-segment", 0x8000) + SIZEOF_HEADERS;
+ /* Start of the executable code region. */
+ .hash : { *(.hash) }
+ .gnu.hash : { *(.gnu.hash) }
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
. = 0x10000;
- .rela.plt : { *(.rela.plt) *(.rela.iplt) }
+ .rela.dyn : { *(.rela.ifunc) }
+ .rela.plt : { *(.rela.plt) *(.rela.iplt) }
. = 0x18000;
- .plt : { *(.plt) *(.iplt) }
+ .plt : { *(.plt) *(.iplt) }
. = 0x20000;
- .text : { *(.text) }
- . = 0x30000;
- .got : { *(.got) *(.got.plt) }
+ .text : { *(.text) }
. = 0x12340000;
- .far : { *(.far) }
+ .far : { *(.far) }
+ /* Start of the Read Only Data region. */
+ .note.gnu-property : { *(.note.gnu-property) }
+
+ /* Start of the Read Write Data region. */
+ . = ALIGN (CONSTANT (MAXPAGESIZE));
+ .got : { *(.got) *(.got.plt) }
+ /* Start of the metadata region. */
+ .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
}
diff --git a/ld/testsuite/ld-aarch64/protections/bti-pac-plt-1-a.d b/ld/testsuite/ld-aarch64/protections/bti-pac-plt-1-a.d
index 96268d3..4ab1ca8 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-pac-plt-1-a.d
+++ b/ld/testsuite/ld-aarch64/protections/bti-pac-plt-1-a.d
@@ -11,7 +11,7 @@ Disassembly of section \.plt:
[0-9a-f]+ <\.plt>:
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9400e11 ldr x17, \[x16, #24\]
.*: 91006210 add x16, x16, #0x18
.*: d61f0220 br x17
@@ -20,13 +20,13 @@ Disassembly of section \.plt:
.*: d503201f nop
[0-9a-f]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401211 ldr x17, \[x16, #32\]
.*: 91008210 add x16, x16, #0x20
.*: d61f0220 br x17
[0-9a-f]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401611 ldr x17, \[x16, #40\]
.*: 9100a210 add x16, x16, #0x28
.*: d61f0220 br x17
diff --git a/ld/testsuite/ld-aarch64/protections/bti-pac-plt-1-b.d b/ld/testsuite/ld-aarch64/protections/bti-pac-plt-1-b.d
index 041bf22..ef744e1 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-pac-plt-1-b.d
+++ b/ld/testsuite/ld-aarch64/protections/bti-pac-plt-1-b.d
@@ -16,7 +16,7 @@ Disassembly of section \.plt:
[0-9a-f]+ <\.plt>:
.*: d503245f bti c
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9400e11 ldr x17, \[x16, #24\]
.*: 91006210 add x16, x16, #0x18
.*: d61f0220 br x17
@@ -24,13 +24,13 @@ Disassembly of section \.plt:
.*: d503201f nop
[0-9a-f]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401211 ldr x17, \[x16, #32\]
.*: 91008210 add x16, x16, #0x20
.*: d61f0220 br x17
[0-9a-f]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401611 ldr x17, \[x16, #40\]
.*: 9100a210 add x16, x16, #0x28
.*: d61f0220 br x17
diff --git a/ld/testsuite/ld-aarch64/protections/bti-pac-plt-2-a.d b/ld/testsuite/ld-aarch64/protections/bti-pac-plt-2-a.d
index f1ae3cd..0e87bcc 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-pac-plt-2-a.d
+++ b/ld/testsuite/ld-aarch64/protections/bti-pac-plt-2-a.d
@@ -12,7 +12,7 @@ Disassembly of section \.plt:
[0-9a-f]+ <\.plt>:
.*: d503245f bti c
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9400e11 ldr x17, \[x16, #24\]
.*: 91006210 add x16, x16, #0x18
.*: d61f0220 br x17
@@ -20,7 +20,7 @@ Disassembly of section \.plt:
.*: d503201f nop
[0-9a-f]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401211 ldr x17, \[x16, #32\]
.*: 91008210 add x16, x16, #0x20
.*: d503219f autia1716
@@ -28,7 +28,7 @@ Disassembly of section \.plt:
.*: d503201f nop
[0-9a-f]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401611 ldr x17, \[x16, #40\]
.*: 9100a210 add x16, x16, #0x28
.*: d503219f autia1716
diff --git a/ld/testsuite/ld-aarch64/protections/bti-pac-plt-2-b.d b/ld/testsuite/ld-aarch64/protections/bti-pac-plt-2-b.d
index 69ccaab..199585c 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-pac-plt-2-b.d
+++ b/ld/testsuite/ld-aarch64/protections/bti-pac-plt-2-b.d
@@ -12,7 +12,7 @@ Disassembly of section \.plt:
[0-9]+ <\.plt>:
.*: d503245f bti c
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9400e11 ldr x17, \[x16, #24\]
.*: 91006210 add x16, x16, #0x18
.*: d61f0220 br x17
@@ -21,7 +21,7 @@ Disassembly of section \.plt:
[0-9]+ <.*>:
.*: d503245f bti c
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401211 ldr x17, \[x16, #32\]
.*: 91008210 add x16, x16, #0x20
.*: d503219f autia1716
@@ -29,7 +29,7 @@ Disassembly of section \.plt:
[0-9]+ <.*>:
.*: d503245f bti c
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401611 ldr x17, \[x16, #40\]
.*: 9100a210 add x16, x16, #0x28
.*: d503219f autia1716
diff --git a/ld/testsuite/ld-aarch64/protections/bti-pac-plt-3-a.d b/ld/testsuite/ld-aarch64/protections/bti-pac-plt-3-a.d
index c0c0bdb..1789a98 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-pac-plt-3-a.d
+++ b/ld/testsuite/ld-aarch64/protections/bti-pac-plt-3-a.d
@@ -12,7 +12,7 @@ Disassembly of section \.plt:
[0-9a-f]+ <\.plt>:
.*: d503245f bti c
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9400e11 ldr x17, \[x16, #24\]
.*: 91006210 add x16, x16, #0x18
.*: d61f0220 br x17
@@ -20,7 +20,7 @@ Disassembly of section \.plt:
.*: d503201f nop
[0-9a-f]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401211 ldr x17, \[x16, #32\]
.*: 91008210 add x16, x16, #0x20
.*: d503219f autia1716
@@ -28,7 +28,7 @@ Disassembly of section \.plt:
.*: d503201f nop
[0-9a-f]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401611 ldr x17, \[x16, #40\]
.*: 9100a210 add x16, x16, #0x28
.*: d503219f autia1716
diff --git a/ld/testsuite/ld-aarch64/protections/bti-pac-plt-3-b.d b/ld/testsuite/ld-aarch64/protections/bti-pac-plt-3-b.d
index 89a08ae..a0643ab 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-pac-plt-3-b.d
+++ b/ld/testsuite/ld-aarch64/protections/bti-pac-plt-3-b.d
@@ -12,7 +12,7 @@ Disassembly of section \.plt:
[0-9]+ <\.plt>:
.*: d503245f bti c
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9400e11 ldr x17, \[x16, #24\]
.*: 91006210 add x16, x16, #0x18
.*: d61f0220 br x17
@@ -21,7 +21,7 @@ Disassembly of section \.plt:
[0-9]+ <.*>:
.*: d503245f bti c
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401211 ldr x17, \[x16, #32\]
.*: 91008210 add x16, x16, #0x20
.*: d503219f autia1716
@@ -29,7 +29,7 @@ Disassembly of section \.plt:
[0-9]+ <.*>:
.*: d503245f bti c
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401611 ldr x17, \[x16, #40\]
.*: 9100a210 add x16, x16, #0x28
.*: d503219f autia1716
diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt-1-a.d b/ld/testsuite/ld-aarch64/protections/bti-plt-1-a.d
index 2dc3864..89c0abc 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-plt-1-a.d
+++ b/ld/testsuite/ld-aarch64/protections/bti-plt-1-a.d
@@ -12,7 +12,7 @@ Disassembly of section \.plt:
[0-9]+ <\.plt>:
.*: d503245f bti c
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9400e11 ldr x17, \[x16, #24\]
.*: 91006210 add x16, x16, #0x18
.*: d61f0220 br x17
@@ -20,13 +20,13 @@ Disassembly of section \.plt:
.*: d503201f nop
[0-9]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401211 ldr x17, \[x16, #32\]
.*: 91008210 add x16, x16, #0x20
.*: d61f0220 br x17
[0-9]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401611 ldr x17, \[x16, #40\]
.*: 9100a210 add x16, x16, #0x28
.*: d61f0220 br x17
diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt-1-b.d b/ld/testsuite/ld-aarch64/protections/bti-plt-1-b.d
index 4b0e424..c889c1c 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-plt-1-b.d
+++ b/ld/testsuite/ld-aarch64/protections/bti-plt-1-b.d
@@ -12,7 +12,7 @@ Disassembly of section \.plt:
[0-9]+ <\.plt>:
.*: d503245f bti c
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9400e11 ldr x17, \[x16, #24\]
.*: 91006210 add x16, x16, #0x18
.*: d61f0220 br x17
@@ -20,13 +20,13 @@ Disassembly of section \.plt:
.*: d503201f nop
[0-9]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401211 ldr x17, \[x16, #32\]
.*: 91008210 add x16, x16, #0x20
.*: d61f0220 br x17
[0-9]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401611 ldr x17, \[x16, #40\]
.*: 9100a210 add x16, x16, #0x28
.*: d61f0220 br x17
diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt-1-c.d b/ld/testsuite/ld-aarch64/protections/bti-plt-1-c.d
index 2fd0dea..c200b0c 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-plt-1-c.d
+++ b/ld/testsuite/ld-aarch64/protections/bti-plt-1-c.d
@@ -13,7 +13,7 @@ Disassembly of section \.plt:
[0-9]+ <\.plt>:
.*: d503245f bti c
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9400e11 ldr x17, \[x16, #24\]
.*: 91006210 add x16, x16, #0x18
.*: d61f0220 br x17
@@ -21,13 +21,13 @@ Disassembly of section \.plt:
.*: d503201f nop
[0-9]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401211 ldr x17, \[x16, #32\]
.*: 91008210 add x16, x16, #0x20
.*: d61f0220 br x17
[0-9]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401611 ldr x17, \[x16, #40\]
.*: 9100a210 add x16, x16, #0x28
.*: d61f0220 br x17
diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt-3.d b/ld/testsuite/ld-aarch64/protections/bti-plt-3.d
index e457bab..48db434 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-plt-3.d
+++ b/ld/testsuite/ld-aarch64/protections/bti-plt-3.d
@@ -12,7 +12,7 @@ Disassembly of section \.plt:
[0-9]+ <\.plt>:
.*: d503245f bti c
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9400e11 ldr x17, \[x16, #24\]
.*: 91006210 add x16, x16, #0x18
.*: d61f0220 br x17
@@ -21,7 +21,7 @@ Disassembly of section \.plt:
[0-9]+ <.*>:
.*: d503245f bti c
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401211 ldr x17, \[x16, #32\]
.*: 91008210 add x16, x16, #0x20
.*: d61f0220 br x17
@@ -29,7 +29,7 @@ Disassembly of section \.plt:
[0-9]+ <.*>:
.*: d503245f bti c
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401611 ldr x17, \[x16, #40\]
.*: 9100a210 add x16, x16, #0x28
.*: d61f0220 br x17
diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt.ld b/ld/testsuite/ld-aarch64/protections/bti-plt.ld
index 8682623..c930fc8 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-plt.ld
+++ b/ld/testsuite/ld-aarch64/protections/bti-plt.ld
@@ -2,13 +2,26 @@ OUTPUT_ARCH(aarch64)
ENTRY(_start)
SECTIONS
{
+ PROVIDE(__executable_start = 0x8000);
+ . = SEGMENT_START("text-segment", 0x8000) + SIZEOF_HEADERS;
+ /* Start of the executable code region. */
+ .hash : { *(.hash) }
+ .gnu.hash : { *(.gnu.hash) }
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
. = 0x10000;
- .rela.plt : { *(.rela.plt) *(.rela.iplt) }
+ .rela.dyn : { *(.rela.ifunc) }
+ .rela.plt : { *(.rela.plt) *(.rela.iplt) }
. = 0x18000;
- .plt : { *(.plt) *(.iplt) }
+ .plt : { *(.plt) *(.iplt) }
. = 0x20000;
- .text : { *(.text) }
- . = 0x28000;
- .got : { *(.got) *(.got.plt) }
- .ARM.attributes 0 : { *(.ARM.atttributes) }
+ .text : { *(.text) }
+ /* Start of the Read Only Data region. */
+ .note.gnu-property : { *(.note.gnu-property) }
+
+ /* Start of the Read Write Data region. */
+ . = ALIGN (CONSTANT (MAXPAGESIZE));
+ .got : { *(.got) *(.got.plt) }
+ /* Start of the metadata region. */
+ .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
}
diff --git a/ld/testsuite/ld-aarch64/protections/pac-plt-1-a.d b/ld/testsuite/ld-aarch64/protections/pac-plt-1-a.d
index fc10ec7..203cb12 100644
--- a/ld/testsuite/ld-aarch64/protections/pac-plt-1-a.d
+++ b/ld/testsuite/ld-aarch64/protections/pac-plt-1-a.d
@@ -11,7 +11,7 @@ Disassembly of section \.plt:
[0-9]+ <.*>:
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9400e11 ldr x17, \[x16, #24\]
.*: 91006210 add x16, x16, #0x18
.*: d61f0220 br x17
@@ -20,7 +20,7 @@ Disassembly of section \.plt:
.*: d503201f nop
[0-9]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401211 ldr x17, \[x16, #32\]
.*: 91008210 add x16, x16, #0x20
.*: d503219f autia1716
@@ -28,7 +28,7 @@ Disassembly of section \.plt:
.*: d503201f nop
[0-9]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401611 ldr x17, \[x16, #40\]
.*: 9100a210 add x16, x16, #0x28
.*: d503219f autia1716
diff --git a/ld/testsuite/ld-aarch64/protections/pac-plt-1-b.d b/ld/testsuite/ld-aarch64/protections/pac-plt-1-b.d
index 7a0fd59..6592689 100644
--- a/ld/testsuite/ld-aarch64/protections/pac-plt-1-b.d
+++ b/ld/testsuite/ld-aarch64/protections/pac-plt-1-b.d
@@ -15,7 +15,7 @@ Disassembly of section \.plt:
[0-9a-f]+ <\.plt>:
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9400e11 ldr x17, \[x16, #24\]
.*: 91006210 add x16, x16, #0x18
.*: d61f0220 br x17
@@ -24,13 +24,13 @@ Disassembly of section \.plt:
.*: d503201f nop
[0-9a-f]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401211 ldr x17, \[x16, #32\]
.*: 91008210 add x16, x16, #0x20
.*: d61f0220 br x17
[0-9a-f]+ <.*>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401611 ldr x17, \[x16, #40\]
.*: 9100a210 add x16, x16, #0x28
.*: d61f0220 br x17
diff --git a/ld/testsuite/ld-aarch64/protections/pac-plt-2.d b/ld/testsuite/ld-aarch64/protections/pac-plt-2.d
index 1c3d7f4..6795645 100644
--- a/ld/testsuite/ld-aarch64/protections/pac-plt-2.d
+++ b/ld/testsuite/ld-aarch64/protections/pac-plt-2.d
@@ -9,7 +9,7 @@ Disassembly of section \.plt:
.* \<.plt\>:
.*: a9bf7bf0 stp x16, x30, \[sp, #-16\]!
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401a11 ldr x17, \[x16, #48\]
.*: 9100c210 add x16, x16, #0x30
.*: d61f0220 br x17
@@ -19,7 +19,7 @@ Disassembly of section \.plt:
.* \<__tls_get_addr@plt\>:
-.*: 90000090 adrp x16, 28000 <_GLOBAL_OFFSET_TABLE_>
+.*: [[:xdigit:]]{8} adrp x16, [[:xdigit:]]+ <_GLOBAL_OFFSET_TABLE_>
.*: f9401e11 ldr x17, \[x16, #56\]
.*: 9100e210 add x16, x16, #0x38
.*: d503219f autia1716
diff --git a/ld/testsuite/ld-aarch64/relocs-ilp32.ld b/ld/testsuite/ld-aarch64/relocs-ilp32.ld
index 4ddba91..3958ad8 100644
--- a/ld/testsuite/ld-aarch64/relocs-ilp32.ld
+++ b/ld/testsuite/ld-aarch64/relocs-ilp32.ld
@@ -15,7 +15,7 @@ SECTIONS
.got : { *(.got) *(.got.plt)}
. = 0x12340000;
.far : { *(.far) }
- .ARM.attributes 0 : { *(.ARM.atttributes) }
+ .ARM.attributes 0 : { *(.ARM.attributes) }
/* Providing a .data section triggers a non-executable segment to be
generated, which gives somewhere else for the linker to put the TLS
segment without creating a RWX permissioned one. */
diff --git a/ld/testsuite/ld-aarch64/relocs.ld b/ld/testsuite/ld-aarch64/relocs.ld
index 77adac8..b0e75e0 100644
--- a/ld/testsuite/ld-aarch64/relocs.ld
+++ b/ld/testsuite/ld-aarch64/relocs.ld
@@ -15,7 +15,7 @@ SECTIONS
.got : { *(.got) *(.got.plt)}
. = 0x12340000;
.far : { *(.far) }
- .ARM.attributes 0 : { *(.ARM.atttributes) }
+ .ARM.attributes 0 : { *(.ARM.attributes) }
/* Providing a .data section triggers a non-executable segment to be
generated, which gives somewhere else for the linker to put the TLS
segment without creating a RWX permissioned one. */
diff --git a/ld/testsuite/ld-aarch64/sframe-simple-1.d b/ld/testsuite/ld-aarch64/sframe-simple-1.d
index 6ab8c2a..1ae73de 100644
--- a/ld/testsuite/ld-aarch64/sframe-simple-1.d
+++ b/ld/testsuite/ld-aarch64/sframe-simple-1.d
@@ -11,7 +11,8 @@ Contents of the SFrame section .sframe:
Header :
Version: SFRAME_VERSION_2
- Flags: SFRAME_F_FDE_SORTED
+ Flags: SFRAME_F_FDE_SORTED,
+ SFRAME_F_FDE_FUNC_START_PCREL
Num FDEs: 2
Num FREs: 2
diff --git a/ld/testsuite/ld-aarch64/variant_pcs-now.d b/ld/testsuite/ld-aarch64/variant_pcs-now.d
index 5007632..1add2bb 100644
--- a/ld/testsuite/ld-aarch64/variant_pcs-now.d
+++ b/ld/testsuite/ld-aarch64/variant_pcs-now.d
@@ -4,65 +4,65 @@
#ld: -shared --hash-style=sysv -T variant_pcs.ld -z now
#readelf: -rsW
-Relocation section '\.rela\.plt' at offset 0x11000 contains 12 entries:
+Relocation section '\.rela\.plt' at offset 0x[[:xdigit:]]+ contains 12 entries:
Offset Info Type Symbol's Value Symbol's Name \+ Addend
-0000000000009020 0000000100000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_base_global_default_undef \+ 0
-0000000000009028 0000000200000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_spec_global_default_undef \+ 0
-0000000000009030 0000000400000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_base_global_default_def \+ 0
-0000000000009038 0000000500000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_spec_global_default_def \+ 0
-0000000000009040 0000000000000408 R_AARCH64_IRELATIVE 8000
-0000000000009048 0000000300000402 R_AARCH64_JUMP_SLOT f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0
-0000000000009050 0000000000000408 R_AARCH64_IRELATIVE 8000
-0000000000009058 0000000600000402 R_AARCH64_JUMP_SLOT f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0
-0000000000009060 0000000000000408 R_AARCH64_IRELATIVE 8038
-0000000000009068 0000000000000408 R_AARCH64_IRELATIVE 8000
-0000000000009070 0000000000000408 R_AARCH64_IRELATIVE 8000
-0000000000009078 0000000000000408 R_AARCH64_IRELATIVE 8038
+00000000000[[:xdigit:]]{2}020 0000000100000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_base_global_default_undef \+ 0
+00000000000[[:xdigit:]]{2}028 0000000200000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_spec_global_default_undef \+ 0
+00000000000[[:xdigit:]]{2}030 0000000400000402 R_AARCH64_JUMP_SLOT 0000000000011000 f_base_global_default_def \+ 0
+00000000000[[:xdigit:]]{2}038 0000000500000402 R_AARCH64_JUMP_SLOT 0000000000011000 f_spec_global_default_def \+ 0
+00000000000[[:xdigit:]]{2}040 0000000000000408 R_AARCH64_IRELATIVE 11000
+00000000000[[:xdigit:]]{2}048 0000000300000402 R_AARCH64_JUMP_SLOT f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0
+00000000000[[:xdigit:]]{2}050 0000000000000408 R_AARCH64_IRELATIVE 11000
+00000000000[[:xdigit:]]{2}058 0000000600000402 R_AARCH64_JUMP_SLOT f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0
+00000000000[[:xdigit:]]{2}060 0000000000000408 R_AARCH64_IRELATIVE 11038
+00000000000[[:xdigit:]]{2}068 0000000000000408 R_AARCH64_IRELATIVE 11000
+00000000000[[:xdigit:]]{2}070 0000000000000408 R_AARCH64_IRELATIVE 11000
+00000000000[[:xdigit:]]{2}078 0000000000000408 R_AARCH64_IRELATIVE 11038
Symbol table '\.dynsym' contains 7 entries:
Num: Value Size Type Bind Vis Ndx Name
- 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND\s
1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef
2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef
- 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc
- 4: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def
- 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def
- 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc
+ 3: 0000000000011000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 6 f_spec_global_default_ifunc
+ 4: 0000000000011000 0 NOTYPE GLOBAL DEFAULT 6 f_base_global_default_def
+ 5: 0000000000011000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 6 f_spec_global_default_def
+ 6: 0000000000011000 0 IFUNC GLOBAL DEFAULT 6 f_base_global_default_ifunc
Symbol table '\.symtab' contains 35 entries:
Num: Value Size Type Bind Vis Ndx Name
- 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
- 1: 0000000000008000 0 SECTION LOCAL DEFAULT 1.*
- 2: 0000000000008070 0 SECTION LOCAL DEFAULT 2.*
- 3: 0000000000009000 0 SECTION LOCAL DEFAULT 3.*
- 4: 0000000000009080 0 SECTION LOCAL DEFAULT 4.*
- 5: 0000000000011000 0 SECTION LOCAL DEFAULT 5.*
- 6: 0000000000011120 0 SECTION LOCAL DEFAULT 6.*
- 7: 00000000000111c8 0 SECTION LOCAL DEFAULT 7.*
- 8: 0000000000011270 0 SECTION LOCAL DEFAULT 8.*
+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND\s
+ 1: 00000000000080e8 0 SECTION LOCAL DEFAULT 1 \.hash
+ 2: 0000000000008118 0 SECTION LOCAL DEFAULT 2 \.dynsym
+ 3: 00000000000081c0 0 SECTION LOCAL DEFAULT 3 \.dynstr
+ 4: 0000000000009000 0 SECTION LOCAL DEFAULT 4 \.rela\.plt
+ 5: 0000000000010000 0 SECTION LOCAL DEFAULT 5 \.plt
+ 6: 0000000000011000 0 SECTION LOCAL DEFAULT 6 \.text
+ 7: 0000000000020000 0 SECTION LOCAL DEFAULT 7 \.dynamic
+ 8: 0000000000021000 0 SECTION LOCAL DEFAULT 8 \.got
9: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o
- 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local
- 11: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc
- 12: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc
- 13: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_local
- 14: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 \$x
+ 10: 0000000000011000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 6 f_spec_local
+ 11: 0000000000011000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 6 f_spec_local_ifunc
+ 12: 0000000000011000 0 IFUNC LOCAL DEFAULT 6 f_base_local_ifunc
+ 13: 0000000000011000 0 NOTYPE LOCAL DEFAULT 6 f_base_local
+ 14: 0000000000011000 0 NOTYPE LOCAL DEFAULT 6 \$x
15: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o
- 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2
- 17: 0000000000008038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc
- 18: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc
- 19: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2
- 20: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 \$x
- 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS
- 22: 0000000000009080 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC
- 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_def
- 24: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_global_hidden_ifunc
- 25: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_global_hidden_def
- 26: 0000000000009000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
- 27: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc
- 28: 0000000000008070 0 NOTYPE LOCAL DEFAULT 2 \$x
+ 16: 0000000000011038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 6 f_spec_local2
+ 17: 0000000000011038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 6 f_spec_local2_ifunc
+ 18: 0000000000011038 0 IFUNC LOCAL DEFAULT 6 f_base_local2_ifunc
+ 19: 0000000000011038 0 NOTYPE LOCAL DEFAULT 6 f_base_local2
+ 20: 0000000000011038 0 NOTYPE LOCAL DEFAULT 6 \$x
+ 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS\s
+ 22: 0000000000020000 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC
+ 23: 0000000000011000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 6 f_spec_global_hidden_def
+ 24: 0000000000011000 0 IFUNC LOCAL DEFAULT 6 f_base_global_hidden_ifunc
+ 25: 0000000000011000 0 NOTYPE LOCAL DEFAULT 6 f_base_global_hidden_def
+ 26: 0000000000021000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
+ 27: 0000000000011000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 6 f_spec_global_hidden_ifunc
+ 28: 0000000000010000 0 NOTYPE LOCAL DEFAULT 5 \$x
29: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef
30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef
- 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc
- 32: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def
- 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def
- 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc
+ 31: 0000000000011000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 6 f_spec_global_default_ifunc
+ 32: 0000000000011000 0 NOTYPE GLOBAL DEFAULT 6 f_base_global_default_def
+ 33: 0000000000011000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 6 f_spec_global_default_def
+ 34: 0000000000011000 0 IFUNC GLOBAL DEFAULT 6 f_base_global_default_ifunc
diff --git a/ld/testsuite/ld-aarch64/variant_pcs-r.d b/ld/testsuite/ld-aarch64/variant_pcs-r.d
index 2651a68..65849e1 100644
--- a/ld/testsuite/ld-aarch64/variant_pcs-r.d
+++ b/ld/testsuite/ld-aarch64/variant_pcs-r.d
@@ -3,7 +3,7 @@
#ld: -r
#readelf: -rsW
-Relocation section '\.rela\.text' at offset .* contains 24 entries:
+Relocation section '\.rela\.text' at offset 0x[[:xdigit:]]+ contains 24 entries:
Offset Info Type Symbol's Value Symbol's Name \+ Addend
0000000000000000 000000180000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_def \+ 0
0000000000000004 000000110000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_undef \+ 0
@@ -32,10 +32,10 @@ Relocation section '\.rela\.text' at offset .* contains 24 entries:
Symbol table '\.symtab' contains 26 entries:
Num: Value Size Type Bind Vis Ndx Name
- 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
- 1: 0000000000000000 0 SECTION LOCAL DEFAULT 1.*
- 2: 0000000000000000 0 SECTION LOCAL DEFAULT 3.*
- 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4.*
+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND\s
+ 1: 0000000000000000 0 SECTION LOCAL DEFAULT 1 \.text
+ 2: 0000000000000000 0 SECTION LOCAL DEFAULT 3 \.data
+ 3: 0000000000000000 0 SECTION LOCAL DEFAULT 4 \.bss
4: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o
5: 0000000000000000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local
6: 0000000000000000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc
diff --git a/ld/testsuite/ld-aarch64/variant_pcs-shared.d b/ld/testsuite/ld-aarch64/variant_pcs-shared.d
index e021799..3a39d8c 100644
--- a/ld/testsuite/ld-aarch64/variant_pcs-shared.d
+++ b/ld/testsuite/ld-aarch64/variant_pcs-shared.d
@@ -4,65 +4,65 @@
#ld: -shared --hash-style=sysv -T variant_pcs.ld
#readelf: -rsW
-Relocation section '\.rela\.plt' at offset 0x11000 contains 12 entries:
+Relocation section '\.rela\.plt' at offset 0x[[:xdigit:]]+ contains 12 entries:
Offset Info Type Symbol's Value Symbol's Name \+ Addend
-0000000000009020 0000000100000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_base_global_default_undef \+ 0
-0000000000009028 0000000200000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_spec_global_default_undef \+ 0
-0000000000009030 0000000400000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_base_global_default_def \+ 0
-0000000000009038 0000000500000402 R_AARCH64_JUMP_SLOT 0000000000008000 f_spec_global_default_def \+ 0
-0000000000009040 0000000000000408 R_AARCH64_IRELATIVE 8000
-0000000000009048 0000000300000402 R_AARCH64_JUMP_SLOT f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0
-0000000000009050 0000000000000408 R_AARCH64_IRELATIVE 8000
-0000000000009058 0000000600000402 R_AARCH64_JUMP_SLOT f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0
-0000000000009060 0000000000000408 R_AARCH64_IRELATIVE 8038
-0000000000009068 0000000000000408 R_AARCH64_IRELATIVE 8000
-0000000000009070 0000000000000408 R_AARCH64_IRELATIVE 8000
-0000000000009078 0000000000000408 R_AARCH64_IRELATIVE 8038
+00000000000[[:xdigit:]]{2}020 0000000100000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_base_global_default_undef \+ 0
+00000000000[[:xdigit:]]{2}028 0000000200000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_spec_global_default_undef \+ 0
+00000000000[[:xdigit:]]{2}030 0000000400000402 R_AARCH64_JUMP_SLOT 0000000000011000 f_base_global_default_def \+ 0
+00000000000[[:xdigit:]]{2}038 0000000500000402 R_AARCH64_JUMP_SLOT 0000000000011000 f_spec_global_default_def \+ 0
+00000000000[[:xdigit:]]{2}040 0000000000000408 R_AARCH64_IRELATIVE 11000
+00000000000[[:xdigit:]]{2}048 0000000300000402 R_AARCH64_JUMP_SLOT f_spec_global_default_ifunc\(\) f_spec_global_default_ifunc \+ 0
+00000000000[[:xdigit:]]{2}050 0000000000000408 R_AARCH64_IRELATIVE 11000
+00000000000[[:xdigit:]]{2}058 0000000600000402 R_AARCH64_JUMP_SLOT f_base_global_default_ifunc\(\) f_base_global_default_ifunc \+ 0
+00000000000[[:xdigit:]]{2}060 0000000000000408 R_AARCH64_IRELATIVE 11038
+00000000000[[:xdigit:]]{2}068 0000000000000408 R_AARCH64_IRELATIVE 11000
+00000000000[[:xdigit:]]{2}070 0000000000000408 R_AARCH64_IRELATIVE 11000
+00000000000[[:xdigit:]]{2}078 0000000000000408 R_AARCH64_IRELATIVE 11038
Symbol table '\.dynsym' contains 7 entries:
Num: Value Size Type Bind Vis Ndx Name
- 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND\s
1: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef
2: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef
- 3: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc
- 4: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def
- 5: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def
- 6: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc
+ 3: 0000000000011000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 6 f_spec_global_default_ifunc
+ 4: 0000000000011000 0 NOTYPE GLOBAL DEFAULT 6 f_base_global_default_def
+ 5: 0000000000011000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 6 f_spec_global_default_def
+ 6: 0000000000011000 0 IFUNC GLOBAL DEFAULT 6 f_base_global_default_ifunc
Symbol table '\.symtab' contains 35 entries:
Num: Value Size Type Bind Vis Ndx Name
- 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
- 1: 0000000000008000 0 SECTION LOCAL DEFAULT 1.*
- 2: 0000000000008070 0 SECTION LOCAL DEFAULT 2.*
- 3: 0000000000009000 0 SECTION LOCAL DEFAULT 3.*
- 4: 0000000000009080 0 SECTION LOCAL DEFAULT 4.*
- 5: 0000000000011000 0 SECTION LOCAL DEFAULT 5.*
- 6: 0000000000011120 0 SECTION LOCAL DEFAULT 6.*
- 7: 00000000000111c8 0 SECTION LOCAL DEFAULT 7.*
- 8: 0000000000011270 0 SECTION LOCAL DEFAULT 8.*
+ 0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND\s
+ 1: 00000000000080e8 0 SECTION LOCAL DEFAULT 1 \.hash
+ 2: 0000000000008118 0 SECTION LOCAL DEFAULT 2 \.dynsym
+ 3: 00000000000081c0 0 SECTION LOCAL DEFAULT 3 \.dynstr
+ 4: 0000000000009000 0 SECTION LOCAL DEFAULT 4 \.rela\.plt
+ 5: 0000000000010000 0 SECTION LOCAL DEFAULT 5 \.plt
+ 6: 0000000000011000 0 SECTION LOCAL DEFAULT 6 \.text
+ 7: 0000000000020000 0 SECTION LOCAL DEFAULT 7 \.dynamic
+ 8: 0000000000021000 0 SECTION LOCAL DEFAULT 8 \.got
9: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-1\.o
- 10: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local
- 11: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local_ifunc
- 12: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_local_ifunc
- 13: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_local
- 14: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 \$x
+ 10: 0000000000011000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 6 f_spec_local
+ 11: 0000000000011000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 6 f_spec_local_ifunc
+ 12: 0000000000011000 0 IFUNC LOCAL DEFAULT 6 f_base_local_ifunc
+ 13: 0000000000011000 0 NOTYPE LOCAL DEFAULT 6 f_base_local
+ 14: 0000000000011000 0 NOTYPE LOCAL DEFAULT 6 \$x
15: 0000000000000000 0 FILE LOCAL DEFAULT ABS .*variant_pcs-2\.o
- 16: 0000000000008038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2
- 17: 0000000000008038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_local2_ifunc
- 18: 0000000000008038 0 IFUNC LOCAL DEFAULT 1 f_base_local2_ifunc
- 19: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 f_base_local2
- 20: 0000000000008038 0 NOTYPE LOCAL DEFAULT 1 \$x
- 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS
- 22: 0000000000009080 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC
- 23: 0000000000008000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_def
- 24: 0000000000008000 0 IFUNC LOCAL DEFAULT 1 f_base_global_hidden_ifunc
- 25: 0000000000008000 0 NOTYPE LOCAL DEFAULT 1 f_base_global_hidden_def
- 26: 0000000000009000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
- 27: 0000000000008000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_hidden_ifunc
- 28: 0000000000008070 0 NOTYPE LOCAL DEFAULT 2 \$x
+ 16: 0000000000011038 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 6 f_spec_local2
+ 17: 0000000000011038 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 6 f_spec_local2_ifunc
+ 18: 0000000000011038 0 IFUNC LOCAL DEFAULT 6 f_base_local2_ifunc
+ 19: 0000000000011038 0 NOTYPE LOCAL DEFAULT 6 f_base_local2
+ 20: 0000000000011038 0 NOTYPE LOCAL DEFAULT 6 \$x
+ 21: 0000000000000000 0 FILE LOCAL DEFAULT ABS\s
+ 22: 0000000000020000 0 OBJECT LOCAL DEFAULT ABS _DYNAMIC
+ 23: 0000000000011000 0 NOTYPE LOCAL DEFAULT \[VARIANT_PCS\] 6 f_spec_global_hidden_def
+ 24: 0000000000011000 0 IFUNC LOCAL DEFAULT 6 f_base_global_hidden_ifunc
+ 25: 0000000000011000 0 NOTYPE LOCAL DEFAULT 6 f_base_global_hidden_def
+ 26: 0000000000021000 0 OBJECT LOCAL DEFAULT ABS _GLOBAL_OFFSET_TABLE_
+ 27: 0000000000011000 0 IFUNC LOCAL DEFAULT \[VARIANT_PCS\] 6 f_spec_global_hidden_ifunc
+ 28: 0000000000010000 0 NOTYPE LOCAL DEFAULT 5 \$x
29: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND f_base_global_default_undef
30: 0000000000000000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] UND f_spec_global_default_undef
- 31: 0000000000008000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_ifunc
- 32: 0000000000008000 0 NOTYPE GLOBAL DEFAULT 1 f_base_global_default_def
- 33: 0000000000008000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 1 f_spec_global_default_def
- 34: 0000000000008000 0 IFUNC GLOBAL DEFAULT 1 f_base_global_default_ifunc
+ 31: 0000000000011000 0 IFUNC GLOBAL DEFAULT \[VARIANT_PCS\] 6 f_spec_global_default_ifunc
+ 32: 0000000000011000 0 NOTYPE GLOBAL DEFAULT 6 f_base_global_default_def
+ 33: 0000000000011000 0 NOTYPE GLOBAL DEFAULT \[VARIANT_PCS\] 6 f_spec_global_default_def
+ 34: 0000000000011000 0 IFUNC GLOBAL DEFAULT 6 f_base_global_default_ifunc
diff --git a/ld/testsuite/ld-aarch64/variant_pcs.ld b/ld/testsuite/ld-aarch64/variant_pcs.ld
index a66a934..cadecd8 100644
--- a/ld/testsuite/ld-aarch64/variant_pcs.ld
+++ b/ld/testsuite/ld-aarch64/variant_pcs.ld
@@ -3,21 +3,31 @@ OUTPUT_ARCH(aarch64)
ENTRY(_start)
SECTIONS
{
- /* Read-only sections, merged into text segment: */
- PROVIDE (__executable_start = 0x8000); . = 0x8000;
+ PROVIDE(__executable_start = 0x8000);
+ . = SEGMENT_START("text-segment", 0x8000) + SIZEOF_HEADERS;
+ /* Start of the executable code region. */
+ .hash : { *(.hash) }
+ .gnu.hash : { *(.gnu.hash) }
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
+ . = 0x9000;
+ .rela.plt : { *(.rela.plt) *(.rela.iplt) }
+ . = 0x10000;
+ .plt : { *(.plt) }
+ . = 0x11000;
.text :
{
*(.before)
*(.text)
*(.after)
- } =0
- . = 0x9000;
+ }
+
+ /* Start of the Read Write Data region. */
+ . = ALIGN (CONSTANT (MAXPAGESIZE));
+ .dynamic : { *(.dynamic) }
+ . = ALIGN(4K);
.got : { *(.got) *(.got.plt)}
- . = 0x10000;
- .rela.dyn : { *(.rela.ifunc) }
- . = 0x11000;
- .rela.plt : { *(.rela.plt) *(.rela.iplt) }
- . = 0x12340000;
- .far : { *(.far) }
- .ARM.attributes 0 : { *(.ARM.atttributes) }
+
+ /* Start of the metadata region. */
+ .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) }
}
diff --git a/ld/testsuite/ld-arm/arm.ld b/ld/testsuite/ld-arm/arm.ld
index 8e3fac2..4b596ce 100644
--- a/ld/testsuite/ld-arm/arm.ld
+++ b/ld/testsuite/ld-arm/arm.ld
@@ -19,5 +19,5 @@ SECTIONS
.got : { *(.got) *(.got.plt)}
. = 0x12340000;
.far : { *(.far) }
- .ARM.attribues 0 : { *(.ARM.atttributes) }
+ .ARM.attributes 0 : { *(.ARM.attributes) }
}
diff --git a/ld/testsuite/ld-arm/arm_purecode.ld b/ld/testsuite/ld-arm/arm_purecode.ld
index 195aca1..488e3dd 100644
--- a/ld/testsuite/ld-arm/arm_purecode.ld
+++ b/ld/testsuite/ld-arm/arm_purecode.ld
@@ -28,5 +28,5 @@ SECTIONS
.got : { *(.got) *(.got.plt)}
. = 0x12340000;
.far : { *(.far) }
- .ARM.attribues 0 : { *(.ARM.atttributes) }
+ .ARM.attributes 0 : { *(.ARM.attributes) }
}
diff --git a/ld/testsuite/ld-arm/discard-unwind.ld b/ld/testsuite/ld-arm/discard-unwind.ld
index d8f6524..54418f7 100644
--- a/ld/testsuite/ld-arm/discard-unwind.ld
+++ b/ld/testsuite/ld-arm/discard-unwind.ld
@@ -15,5 +15,5 @@ SECTIONS
*(.v4_bx)
} =0
/DISCARD/ : { *(.ARM.exidx*) }
- .ARM.attribues 0 : { *(.ARM.atttributes) }
+ .ARM.attributes 0 : { *(.ARM.attributes) }
}
diff --git a/ld/testsuite/ld-arm/script-type.ld b/ld/testsuite/ld-arm/script-type.ld
index 01995eb..af34697 100644
--- a/ld/testsuite/ld-arm/script-type.ld
+++ b/ld/testsuite/ld-arm/script-type.ld
@@ -3,7 +3,7 @@ SECTIONS {
foo_a = bar_a;
foo_t = bar_t;
foo_o = bar_o;
- *(.text)
+ *(.text)
}
- .ARM.attribues 0 : { *(.ARM.attributes) }
+ .ARM.attributes 0 : { *(.ARM.attributes) }
}
diff --git a/ld/testsuite/ld-arm/unwind-1.d b/ld/testsuite/ld-arm/unwind-1.d
index add5cb7..073d6a5 100644
--- a/ld/testsuite/ld-arm/unwind-1.d
+++ b/ld/testsuite/ld-arm/unwind-1.d
@@ -1,10 +1,7 @@
#ld: -T arm.ld
-#objdump: -s
+#objdump: -s -j .ARM.exidx
.*: file format.*
-#...
-Contents of section .ARM.exidx:
- 8008 (f8ffff7f b0b0a880 f4ffff7f 01000000|7ffffff8 80a8b0b0 7ffffff4 00000001) .*
-Contents of section .far:
-#...
+Contents of section \.ARM\.exidx:
+ 8008 (f8ffff7f b0b0a880 f4ffff7f 01000000|7ffffff8 80a8b0b0 7ffffff4 00000001) \.+
diff --git a/ld/testsuite/ld-arm/unwind-2.d b/ld/testsuite/ld-arm/unwind-2.d
index a096c9b..c9cd433 100644
--- a/ld/testsuite/ld-arm/unwind-2.d
+++ b/ld/testsuite/ld-arm/unwind-2.d
@@ -1,10 +1,7 @@
#ld: -T arm.ld
-#objdump: -s
+#objdump: -s -j .ARM.exidx
.*: file format.*
-#...
-Contents of section .ARM.exidx:
- 8004 (fcffff7f b0b0a880 f8ffff7f 01000000|7ffffffc 80a8b0b0 7ffffff8 00000001) .*
-Contents of section .far:
-#...
+Contents of section \.ARM\.exidx:
+ 8004 (fcffff7f b0b0a880 f8ffff7f 01000000|7ffffffc 80a8b0b0 7ffffff8 00000001) \.+
diff --git a/ld/testsuite/ld-arm/unwind-3.d b/ld/testsuite/ld-arm/unwind-3.d
index 0b8e85e..9da1484 100644
--- a/ld/testsuite/ld-arm/unwind-3.d
+++ b/ld/testsuite/ld-arm/unwind-3.d
@@ -1,11 +1,8 @@
#ld: -T arm.ld
-#objdump: -s
+#objdump: -s -j .ARM.exidx
.*: file format.*
-#...
-Contents of section .ARM.exidx:
- 800c (f4ffff7f b0b0a880 f0ffff7f 01000000|7ffffff4 80a8b0b0 7ffffff0 00000001) .*
- 801c (ecffff7f b0b0a880 e8ffff7f 01000000|7fffffec 80a8b0b0 7fffffe8 00000001) .*
-Contents of section .far:
-#...
+Contents of section \.ARM\.exidx:
+ 800c (f4ffff7f b0b0a880 f0ffff7f 01000000|7ffffff4 80a8b0b0 7ffffff0 00000001) \.+
+ 801c (ecffff7f b0b0a880 e8ffff7f 01000000|7fffffec 80a8b0b0 7fffffe8 00000001) \.+
diff --git a/ld/testsuite/ld-arm/unwind-4.d b/ld/testsuite/ld-arm/unwind-4.d
index ffc8725..7b71de88 100644
--- a/ld/testsuite/ld-arm/unwind-4.d
+++ b/ld/testsuite/ld-arm/unwind-4.d
@@ -1,9 +1,8 @@
#ld: -q -T arm.ld
-#objdump: -sr
+#objdump: -sr -j .ARM.exidx
.*: file format.*
-#...
RELOCATION RECORDS FOR \[\.ARM\.exidx\]:
OFFSET +TYPE +VALUE
00000000 R_ARM_PREL31 \.text
@@ -17,11 +16,6 @@ OFFSET +TYPE +VALUE
00000010 R_ARM_NONE __aeabi_unwind_cpp_pr0
00000018 R_ARM_PREL31 \.text
-
-Contents of section .text:
-#...
-Contents of section .ARM.exidx:
- 8020 (e0ffff7f b0b0a880 dcffff7f e8ffff7f|7fffffe0 80a8b0b0 7fffffdc 7fffffe8) .*
- 8030 (d8ffff7f b0b0a880 d8ffff7f 01000000|7fffffd8 80a8b0b0 7fffffd8 00000001) .*
-Contents of section .far:
-#...
+Contents of section \.ARM\.exidx:
+ 8020 (e0ffff7f b0b0a880 dcffff7f e8ffff7f|7fffffe0 80a8b0b0 7fffffdc 7fffffe8) \.+
+ 8030 (d8ffff7f b0b0a880 d8ffff7f 01000000|7fffffd8 80a8b0b0 7fffffd8 00000001) \.+
diff --git a/ld/testsuite/ld-cris/asneed1.d b/ld/testsuite/ld-cris/asneed1.d
index 00fba75..b40356d 100644
--- a/ld/testsuite/ld-cris/asneed1.d
+++ b/ld/testsuite/ld-cris/asneed1.d
@@ -1,7 +1,7 @@
#source: start1.s
#source: dso-2.s
#source: dso-1.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: -m crislinux --as-needed tmpdir/libdso-1.so
#objdump: -p
diff --git a/ld/testsuite/ld-cris/badgotr1.d b/ld/testsuite/ld-cris/badgotr1.d
index f7a5ac8..a993e90 100644
--- a/ld/testsuite/ld-cris/badgotr1.d
+++ b/ld/testsuite/ld-cris/badgotr1.d
@@ -1,5 +1,5 @@
#source: gotrel1.s
-#as: --pic --underscore --em=criself
+#as: --pic --underscore --emulation=criself
#ld: -m crislinux -shared
#objdump: -dr
#error: \A[^\nc][^\n]*o: uses _-prefixed [^\nc]*\n[^\nc][^\n]* failed to merge [^\n]*\n[^\nc][^\n]* no GOT [^\n]*\n[^\nc][^\n]* bad value\Z
diff --git a/ld/testsuite/ld-cris/def2.d b/ld/testsuite/ld-cris/def2.d
index ff75d88..00c5f41 100644
--- a/ld/testsuite/ld-cris/def2.d
+++ b/ld/testsuite/ld-cris/def2.d
@@ -2,7 +2,7 @@
#source: stabs1.s
#source: globsymw1.s
#target: cris-*-*elf* cris-*-*aout*
-#as: --em=crisaout
+#as: --emulation=crisaout
#ld: -mcrisaout
#objdump: -p
# Just checking that undef2 links correctly when given a symbol.
diff --git a/ld/testsuite/ld-cris/def3.d b/ld/testsuite/ld-cris/def3.d
index e1ae3c5..231414b 100644
--- a/ld/testsuite/ld-cris/def3.d
+++ b/ld/testsuite/ld-cris/def3.d
@@ -2,7 +2,7 @@
#source: stabs1.s
#source: globsymw1.s
#target: cris-*-*elf* cris-*-*aout*
-#as: --em=criself
+#as: --emulation=criself
#ld: -mcriself
#objdump: -p
# Just checking that undef3 links correctly when given a symbol.
diff --git a/ld/testsuite/ld-cris/dso-pltdis1.d b/ld/testsuite/ld-cris/dso-pltdis1.d
index efc4d94..9614033 100644
--- a/ld/testsuite/ld-cris/dso-pltdis1.d
+++ b/ld/testsuite/ld-cris/dso-pltdis1.d
@@ -1,7 +1,7 @@
#source: dsov32-1.s
#source: dsov32-2.s
#source: dsofn4g.s
-#as: --pic --no-underscore --march=v32 --em=criself
+#as: --pic --no-underscore --march=v32 --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#objdump: -d -R
diff --git a/ld/testsuite/ld-cris/dso-pltdis2.d b/ld/testsuite/ld-cris/dso-pltdis2.d
index c6f53fd..e967386 100644
--- a/ld/testsuite/ld-cris/dso-pltdis2.d
+++ b/ld/testsuite/ld-cris/dso-pltdis2.d
@@ -1,7 +1,7 @@
#source: dsov32-1.s
#source: dsov32-2.s
#source: dsofng.s
-#as: --pic --no-underscore --march=v32 --em=criself
+#as: --pic --no-underscore --march=v32 --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#objdump: -d
diff --git a/ld/testsuite/ld-cris/dso12-pltdis.d b/ld/testsuite/ld-cris/dso12-pltdis.d
index 429f91e..e5a230c 100644
--- a/ld/testsuite/ld-cris/dso12-pltdis.d
+++ b/ld/testsuite/ld-cris/dso12-pltdis.d
@@ -1,7 +1,7 @@
#source: expdyn1.s
#source: dsov32-1.s
#source: dsov32-2.s
-#as: --pic --no-underscore --march=v32 --em=criself
+#as: --pic --no-underscore --march=v32 --emulation=criself
#ld: --shared -m crislinux -z nocombreloc --hash-style=sysv
#objdump: -d
diff --git a/ld/testsuite/ld-cris/expdyn1.d b/ld/testsuite/ld-cris/expdyn1.d
index 37cbe4d..0c1ea55 100644
--- a/ld/testsuite/ld-cris/expdyn1.d
+++ b/ld/testsuite/ld-cris/expdyn1.d
@@ -1,5 +1,5 @@
#source: expdyn1.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux -export-dynamic tmpdir/libdso-1.so --hash-style=sysv
#objdump: -T
diff --git a/ld/testsuite/ld-cris/expdyn2.d b/ld/testsuite/ld-cris/expdyn2.d
index 6c5faa5..b2a6fb3 100644
--- a/ld/testsuite/ld-cris/expdyn2.d
+++ b/ld/testsuite/ld-cris/expdyn2.d
@@ -1,6 +1,6 @@
#source: expdyn1.s
#source: expdref1.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --export-dynamic tmpdir/libdso-1.so
#objdump: -R
diff --git a/ld/testsuite/ld-cris/expdyn3.d b/ld/testsuite/ld-cris/expdyn3.d
index 34f2a5e..aefbe84 100644
--- a/ld/testsuite/ld-cris/expdyn3.d
+++ b/ld/testsuite/ld-cris/expdyn3.d
@@ -1,7 +1,7 @@
#source: expdyn1.s
#source: expdref1.s --pic
#source: euwref1.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --export-dynamic tmpdir/libdso-1.so
#objdump: -R
diff --git a/ld/testsuite/ld-cris/expdyn4.d b/ld/testsuite/ld-cris/expdyn4.d
index e932056..5510142 100644
--- a/ld/testsuite/ld-cris/expdyn4.d
+++ b/ld/testsuite/ld-cris/expdyn4.d
@@ -1,7 +1,7 @@
#source: expdyn1.s
#source: expdref1.s --pic
#source: comref1.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --export-dynamic tmpdir/libdso-1.so
#objdump: -R
diff --git a/ld/testsuite/ld-cris/expdyn5.d b/ld/testsuite/ld-cris/expdyn5.d
index 818ee4f..0c4dfd0 100644
--- a/ld/testsuite/ld-cris/expdyn5.d
+++ b/ld/testsuite/ld-cris/expdyn5.d
@@ -1,6 +1,6 @@
#source: expdyn1.s
#source: expdref1.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --export-dynamic tmpdir/libdso-1.so --hash-style=sysv
#objdump: -s -j .got
diff --git a/ld/testsuite/ld-cris/expdyn6.d b/ld/testsuite/ld-cris/expdyn6.d
index cf4a578..c315d95 100644
--- a/ld/testsuite/ld-cris/expdyn6.d
+++ b/ld/testsuite/ld-cris/expdyn6.d
@@ -1,7 +1,7 @@
#source: expdyn1.s
#source: expdref1.s --pic
#source: euwref1.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --export-dynamic tmpdir/libdso-1.so --hash-style=sysv
#objdump: -s -j .got
diff --git a/ld/testsuite/ld-cris/expdyn7.d b/ld/testsuite/ld-cris/expdyn7.d
index 6028343..a5d52d1 100644
--- a/ld/testsuite/ld-cris/expdyn7.d
+++ b/ld/testsuite/ld-cris/expdyn7.d
@@ -1,7 +1,7 @@
#source: expdyn1.s
#source: expdref1.s --pic
#source: comref1.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --export-dynamic tmpdir/libdso-1.so --hash-style=sysv
#objdump: -s -j .got
diff --git a/ld/testsuite/ld-cris/gotplt1.d b/ld/testsuite/ld-cris/gotplt1.d
index 163bb01..96ea5e1 100644
--- a/ld/testsuite/ld-cris/gotplt1.d
+++ b/ld/testsuite/ld-cris/gotplt1.d
@@ -1,7 +1,7 @@
#source: dso-2.s
#source: dsofnf2.s
#source: gotrel1.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: -m crislinux tmpdir/libdso-1.so --hash-style=sysv
#objdump: -sR
diff --git a/ld/testsuite/ld-cris/gotplt2.d b/ld/testsuite/ld-cris/gotplt2.d
index 32d0f89..32c515f 100644
--- a/ld/testsuite/ld-cris/gotplt2.d
+++ b/ld/testsuite/ld-cris/gotplt2.d
@@ -1,7 +1,7 @@
#source: dso-2.s
#source: dsofnf.s
#source: gotrel1.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: -shared -m crislinux -z nocombreloc --hash-style=sysv
#objdump: -sR
diff --git a/ld/testsuite/ld-cris/gotplt3.d b/ld/testsuite/ld-cris/gotplt3.d
index abc0192..7dd8562 100644
--- a/ld/testsuite/ld-cris/gotplt3.d
+++ b/ld/testsuite/ld-cris/gotplt3.d
@@ -2,7 +2,7 @@
#source: dsofnf.s
#source: gotrel1.s
#source: dso-1.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: -shared -m crislinux -z nocombreloc --hash-style=sysv
#objdump: -sR
diff --git a/ld/testsuite/ld-cris/hiddef1.d b/ld/testsuite/ld-cris/hiddef1.d
index 602f1bf..7cbe876 100644
--- a/ld/testsuite/ld-cris/hiddef1.d
+++ b/ld/testsuite/ld-cris/hiddef1.d
@@ -2,7 +2,7 @@
#source: hiddef1.s
#source: hidrefgotplt1.s
#ld: -shared -m crislinux --hash-style=sysv
-#as: --pic --no-underscore -I$srcdir/$subdir --em=criself
+#as: --pic --no-underscore -I$srcdir/$subdir --emulation=criself
#readelf: -S -s -r
# Regression test for mishandling of GOTPLT relocs against a
diff --git a/ld/testsuite/ld-cris/ldsym1.d b/ld/testsuite/ld-cris/ldsym1.d
index e8dcd32..2aacf3a 100644
--- a/ld/testsuite/ld-cris/ldsym1.d
+++ b/ld/testsuite/ld-cris/ldsym1.d
@@ -1,6 +1,6 @@
# source: expdyn1.s
# target: cris-*-*elf* cris-*-*aout*
-# as: --em=criself
+# as: --emulation=criself
# ld: -mcriself
# objdump: -d
diff --git a/ld/testsuite/ld-cris/libdso-1.d b/ld/testsuite/ld-cris/libdso-1.d
index 5a7e9a1..ba5d3b0 100644
--- a/ld/testsuite/ld-cris/libdso-1.d
+++ b/ld/testsuite/ld-cris/libdso-1.d
@@ -1,5 +1,5 @@
#source: dso-1.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux
#objdump: -T
diff --git a/ld/testsuite/ld-cris/libdso-10.d b/ld/testsuite/ld-cris/libdso-10.d
index 0f0d562..696b16e 100644
--- a/ld/testsuite/ld-cris/libdso-10.d
+++ b/ld/testsuite/ld-cris/libdso-10.d
@@ -1,5 +1,5 @@
#source: dso-1.s
-#as: --pic --no-underscore --march=v32 --em=criself
+#as: --pic --no-underscore --march=v32 --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#objdump: -p -h
diff --git a/ld/testsuite/ld-cris/libdso-11.d b/ld/testsuite/ld-cris/libdso-11.d
index 0e00ad6..f95ca4f 100644
--- a/ld/testsuite/ld-cris/libdso-11.d
+++ b/ld/testsuite/ld-cris/libdso-11.d
@@ -1,6 +1,6 @@
#source: dso-1.s
#source: dsov32-1.s
-#as: --pic --no-underscore --march=v32 --em=criself
+#as: --pic --no-underscore --march=v32 --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#objdump: -s -T
diff --git a/ld/testsuite/ld-cris/libdso-12.d b/ld/testsuite/ld-cris/libdso-12.d
index 7fe8342..1bf4596 100644
--- a/ld/testsuite/ld-cris/libdso-12.d
+++ b/ld/testsuite/ld-cris/libdso-12.d
@@ -1,7 +1,7 @@
#source: expdyn1.s
#source: dsov32-1.s
#source: dsov32-2.s
-#as: --pic --no-underscore --march=v32 --em=criself
+#as: --pic --no-underscore --march=v32 --emulation=criself
#ld: --shared -m crislinux -z nocombreloc --hash-style=sysv
#objdump: -s -T
diff --git a/ld/testsuite/ld-cris/libdso-12b.d b/ld/testsuite/ld-cris/libdso-12b.d
index 215d188..a133f11 100644
--- a/ld/testsuite/ld-cris/libdso-12b.d
+++ b/ld/testsuite/ld-cris/libdso-12b.d
@@ -1,7 +1,7 @@
#source: expdyn1.s
#source: dsov32-1.s
#source: dsov32-2.s
-#as: --pic --no-underscore --march=v32 --em=criself
+#as: --pic --no-underscore --march=v32 --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#objdump: -s -T
diff --git a/ld/testsuite/ld-cris/libdso-12c.d b/ld/testsuite/ld-cris/libdso-12c.d
index 949a0e7..484630e 100644
--- a/ld/testsuite/ld-cris/libdso-12c.d
+++ b/ld/testsuite/ld-cris/libdso-12c.d
@@ -2,7 +2,7 @@
#source: dsov32-1.s
#source: dsov32-2.s
#source: dso-1.s
-#as: --pic --no-underscore --march=v32 --em=criself
+#as: --pic --no-underscore --march=v32 --emulation=criself
#ld: --shared -m crislinux --version-script $srcdir/$subdir/hidedsofns2468 --hash-style=sysv
#objdump: -s -T
diff --git a/ld/testsuite/ld-cris/libdso-13.d b/ld/testsuite/ld-cris/libdso-13.d
index b50a5af..ad32019 100644
--- a/ld/testsuite/ld-cris/libdso-13.d
+++ b/ld/testsuite/ld-cris/libdso-13.d
@@ -1,6 +1,6 @@
#source: dso-1.s
#source: dsov32-3.s
-#as: --pic --no-underscore --march=v32 --em=criself
+#as: --pic --no-underscore --march=v32 --emulation=criself
#ld: --shared -m crislinux -z nocombreloc --enable-new-dtags --hash-style=sysv
#readelf: -d -r
#warning: relocation R_CRIS_32_PCREL should not be used in a shared object; recompile with -fPIC
diff --git a/ld/testsuite/ld-cris/libdso-13b.d b/ld/testsuite/ld-cris/libdso-13b.d
index cf8200e..b592a9c 100644
--- a/ld/testsuite/ld-cris/libdso-13b.d
+++ b/ld/testsuite/ld-cris/libdso-13b.d
@@ -1,6 +1,6 @@
#source: dso-1.s
#source: dsov32-3.s
-#as: --pic --no-underscore --march=v32 --em=criself
+#as: --pic --no-underscore --march=v32 --emulation=criself
#ld: --shared -m crislinux --version-script $srcdir/$subdir/hidedsofns2468 --hash-style=sysv
#readelf: -d -r
diff --git a/ld/testsuite/ld-cris/libdso-14.d b/ld/testsuite/ld-cris/libdso-14.d
index b87a5ce..ce4b8ad 100644
--- a/ld/testsuite/ld-cris/libdso-14.d
+++ b/ld/testsuite/ld-cris/libdso-14.d
@@ -1,6 +1,6 @@
#source: dso-1.s
#source: dsov32-4.s
-#as: --pic --no-underscore --march=v32 --em=criself
+#as: --pic --no-underscore --march=v32 --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#readelf: -d -r
diff --git a/ld/testsuite/ld-cris/libdso-15.d b/ld/testsuite/ld-cris/libdso-15.d
index e772fa3..6f9b575 100644
--- a/ld/testsuite/ld-cris/libdso-15.d
+++ b/ld/testsuite/ld-cris/libdso-15.d
@@ -1,5 +1,5 @@
#source: expdyn2.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: --shared -m crislinux --version-script $srcdir/$subdir/expalltst3 --hash-style=sysv
#objdump: -s -T
diff --git a/ld/testsuite/ld-cris/libdso-15b.d b/ld/testsuite/ld-cris/libdso-15b.d
index d02619b..161a58e 100644
--- a/ld/testsuite/ld-cris/libdso-15b.d
+++ b/ld/testsuite/ld-cris/libdso-15b.d
@@ -1,5 +1,5 @@
#source: expdref2.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#ld_after_inputfiles: tmpdir/libdso-15.so
#objdump: -s -T
diff --git a/ld/testsuite/ld-cris/libdso-15c.d b/ld/testsuite/ld-cris/libdso-15c.d
index b035990..3adb952 100644
--- a/ld/testsuite/ld-cris/libdso-15c.d
+++ b/ld/testsuite/ld-cris/libdso-15c.d
@@ -1,5 +1,5 @@
#source: expdref2.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#ld_after_inputfiles: tmpdir/libdso-15.so
#readelf: -d
diff --git a/ld/testsuite/ld-cris/libdso-1b.d b/ld/testsuite/ld-cris/libdso-1b.d
index 56e5788..6d88e13 100644
--- a/ld/testsuite/ld-cris/libdso-1b.d
+++ b/ld/testsuite/ld-cris/libdso-1b.d
@@ -1,5 +1,5 @@
#source: dso-1b.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: --shared -m crislinux --version-script $srcdir/$subdir/hidedsofns2468 --hash-style=sysv
#objdump: -T
diff --git a/ld/testsuite/ld-cris/libdso-1c.d b/ld/testsuite/ld-cris/libdso-1c.d
index d69b857..218f296 100644
--- a/ld/testsuite/ld-cris/libdso-1c.d
+++ b/ld/testsuite/ld-cris/libdso-1c.d
@@ -1,5 +1,5 @@
#source: expdref1.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: --shared -m crislinux --hash-style=sysv
#ld_after_inputfiles: tmpdir/libdso-1b.so
#objdump: -s -T
diff --git a/ld/testsuite/ld-cris/libdso-1d.d b/ld/testsuite/ld-cris/libdso-1d.d
index 83a4337..7755b0e 100644
--- a/ld/testsuite/ld-cris/libdso-1d.d
+++ b/ld/testsuite/ld-cris/libdso-1d.d
@@ -1,6 +1,6 @@
#source: expdref1.s
#source: expdyn1w.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: --shared -m crislinux --hash-style=sysv
#ld_after_inputfiles: tmpdir/libdso-1b.so
#objdump: -s -T
diff --git a/ld/testsuite/ld-cris/libdso-2.d b/ld/testsuite/ld-cris/libdso-2.d
index 900d00d..7133dd5 100644
--- a/ld/testsuite/ld-cris/libdso-2.d
+++ b/ld/testsuite/ld-cris/libdso-2.d
@@ -1,6 +1,6 @@
#source: dso-1.s
#source: dso-2.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv --version-script $srcdir/$subdir/hide1
#readelf: -S -s -r
diff --git a/ld/testsuite/ld-cris/libdso-3.d b/ld/testsuite/ld-cris/libdso-3.d
index 9e18c59..c02eb3d 100644
--- a/ld/testsuite/ld-cris/libdso-3.d
+++ b/ld/testsuite/ld-cris/libdso-3.d
@@ -1,6 +1,6 @@
#source: expdyn1.s
#source: dso-3.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux
#objdump: -R
diff --git a/ld/testsuite/ld-cris/libdso-4.d b/ld/testsuite/ld-cris/libdso-4.d
index 3d57395..11a85a1 100644
--- a/ld/testsuite/ld-cris/libdso-4.d
+++ b/ld/testsuite/ld-cris/libdso-4.d
@@ -1,5 +1,5 @@
#source: dso-2.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#objdump: -T
diff --git a/ld/testsuite/ld-cris/locref1.d b/ld/testsuite/ld-cris/locref1.d
index ac26b28..da5d86c 100644
--- a/ld/testsuite/ld-cris/locref1.d
+++ b/ld/testsuite/ld-cris/locref1.d
@@ -1,4 +1,4 @@
-#as: --no-underscore --pic --em=criself
+#as: --no-underscore --pic --emulation=criself
#source: expdyn1.s
#source: locref1.s
#ld: -m crislinux
diff --git a/ld/testsuite/ld-cris/locref2.d b/ld/testsuite/ld-cris/locref2.d
index 0cf5394..4f8712b 100644
--- a/ld/testsuite/ld-cris/locref2.d
+++ b/ld/testsuite/ld-cris/locref2.d
@@ -1,4 +1,4 @@
-#as: --no-underscore --pic --em=criself
+#as: --no-underscore --pic --emulation=criself
#source: gotrel1.s
#source: locref2.s
#ld: -m crislinux
diff --git a/ld/testsuite/ld-cris/nodyn4.d b/ld/testsuite/ld-cris/nodyn4.d
index c1af092..9a20173 100644
--- a/ld/testsuite/ld-cris/nodyn4.d
+++ b/ld/testsuite/ld-cris/nodyn4.d
@@ -1,7 +1,7 @@
#source: expdyn1.s
#source: expdref1.s --pic
#source: comref1.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#readelf: -l
diff --git a/ld/testsuite/ld-cris/nodyn5.d b/ld/testsuite/ld-cris/nodyn5.d
index 28b581e..0130fa5 100644
--- a/ld/testsuite/ld-cris/nodyn5.d
+++ b/ld/testsuite/ld-cris/nodyn5.d
@@ -1,7 +1,7 @@
#source: expdyn1.s
#source: expdref1.s --pic
#source: comref1.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#objdump: -s -j .got
diff --git a/ld/testsuite/ld-cris/pcrelcp-1.d b/ld/testsuite/ld-cris/pcrelcp-1.d
index 0d5f6b8..7152308 100644
--- a/ld/testsuite/ld-cris/pcrelcp-1.d
+++ b/ld/testsuite/ld-cris/pcrelcp-1.d
@@ -1,4 +1,4 @@
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -shared -m crislinux -z nocombreloc
#ld_after_inputfiles: tmpdir/libdso-1b.so
#warning: \A[^\n]*\.o, section `.text', to symbol `expfn@@TST2':[^\n]*recompile with -fPIC\Z
diff --git a/ld/testsuite/ld-cris/pic-gc-72.d b/ld/testsuite/ld-cris/pic-gc-72.d
index 3c096ea..269a5d2 100644
--- a/ld/testsuite/ld-cris/pic-gc-72.d
+++ b/ld/testsuite/ld-cris/pic-gc-72.d
@@ -1,7 +1,7 @@
#source: pic-gc-72.s
#source: expdref1.s
#source: expdyn1.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: --shared -m crislinux --gc-sections --hash-style=sysv
#objdump: -s -t -R -p -T
diff --git a/ld/testsuite/ld-cris/pic-gc-73.d b/ld/testsuite/ld-cris/pic-gc-73.d
index 603ce45..bafe483 100644
--- a/ld/testsuite/ld-cris/pic-gc-73.d
+++ b/ld/testsuite/ld-cris/pic-gc-73.d
@@ -1,6 +1,6 @@
#source: pic-gc-73.s
#source: expdyn1.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: --shared -m crislinux --gc-sections --hash-style=sysv
#objdump: -s -t -R -p -T
diff --git a/ld/testsuite/ld-cris/pr16044.d b/ld/testsuite/ld-cris/pr16044.d
index 9bb264b..59e90bb 100644
--- a/ld/testsuite/ld-cris/pr16044.d
+++ b/ld/testsuite/ld-cris/pr16044.d
@@ -1,7 +1,7 @@
#source: dso-4.s
#source: dso-2b.s
#source: dso-1c.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: --shared -m crislinux --hash-style=sysv
#readelf: -s -r
diff --git a/ld/testsuite/ld-cris/pr26589.d b/ld/testsuite/ld-cris/pr26589.d
index aee3143..17da49a 100644
--- a/ld/testsuite/ld-cris/pr26589.d
+++ b/ld/testsuite/ld-cris/pr26589.d
@@ -1,6 +1,6 @@
#source: dso-1.s
#source: locref3.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux
#readelf: --dyn-syms -r
diff --git a/ld/testsuite/ld-cris/pv32-1.d b/ld/testsuite/ld-cris/pv32-1.d
index 3b17e23..0d9a924 100644
--- a/ld/testsuite/ld-cris/pv32-1.d
+++ b/ld/testsuite/ld-cris/pv32-1.d
@@ -1,5 +1,5 @@
#source: pv32.s
-#as: --march=v32 --no-underscore --em=criself
+#as: --march=v32 --no-underscore --emulation=criself
#ld: -e here -m crislinux tmpdir/libdso-12.so --hash-style=sysv
#objdump: -s -T
diff --git a/ld/testsuite/ld-cris/tls-dso-dtpoffd2.d b/ld/testsuite/ld-cris/tls-dso-dtpoffd2.d
index 46ad8ab..cd99981 100644
--- a/ld/testsuite/ld-cris/tls-dso-dtpoffd2.d
+++ b/ld/testsuite/ld-cris/tls-dso-dtpoffd2.d
@@ -3,7 +3,7 @@
#source: tls-gd-1.s
#source: tls128.s
#source: tls-x.s
-#as: --no-underscore --em=criself --pic -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself --pic -I$srcdir/$subdir
#ld: -m crislinux --shared --hash-style=sysv --hash-style=sysv
#objdump: -d -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-dso-dtpoffd4.d b/ld/testsuite/ld-cris/tls-dso-dtpoffd4.d
index a8f1305..b1792e8 100644
--- a/ld/testsuite/ld-cris/tls-dso-dtpoffd4.d
+++ b/ld/testsuite/ld-cris/tls-dso-dtpoffd4.d
@@ -3,7 +3,7 @@
#source: tls-gd-1.s
#source: tls128.s
#source: tls-commx.s
-#as: --no-underscore --em=criself --pic -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself --pic -I$srcdir/$subdir
#ld: -m crislinux --shared --hash-style=sysv
#objdump: -d -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-dso-tpoffgotcomm1.d b/ld/testsuite/ld-cris/tls-dso-tpoffgotcomm1.d
index a591113..fcdfe4e 100644
--- a/ld/testsuite/ld-cris/tls-dso-tpoffgotcomm1.d
+++ b/ld/testsuite/ld-cris/tls-dso-tpoffgotcomm1.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-dso-tpoffgotcomm1.s
-#as: --no-underscore --pic --em=criself -I$srcdir/$subdir
+#as: --no-underscore --pic --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux -shared --hash-style=sysv
#objdump: -d -h -s -t -r -R -p
diff --git a/ld/testsuite/ld-cris/tls-dso-x1x2-1.d b/ld/testsuite/ld-cris/tls-dso-x1x2-1.d
index 6168701..29e3ed7 100644
--- a/ld/testsuite/ld-cris/tls-dso-x1x2-1.d
+++ b/ld/testsuite/ld-cris/tls-dso-x1x2-1.d
@@ -1,6 +1,6 @@
#source: tls-hx.s
#source: tls-x1x2.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --shared --hash-style=sysv
#objdump: -T
diff --git a/ld/testsuite/ld-cris/tls-dso-xz-1.d b/ld/testsuite/ld-cris/tls-dso-xz-1.d
index 9a33b78..87a0165 100644
--- a/ld/testsuite/ld-cris/tls-dso-xz-1.d
+++ b/ld/testsuite/ld-cris/tls-dso-xz-1.d
@@ -2,7 +2,7 @@
#source: tls-hx1x2.s
#source: tls-x.s
#source: tls-z.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --shared
#objdump: -T
diff --git a/ld/testsuite/ld-cris/tls-e-20.d b/ld/testsuite/ld-cris/tls-e-20.d
index eb323a5..d192e84 100644
--- a/ld/testsuite/ld-cris/tls-e-20.d
+++ b/ld/testsuite/ld-cris/tls-e-20.d
@@ -4,7 +4,7 @@
#source: tls-ld-6.s --pic
#source: tls-ie-10.s --pic
#source: tls-hx1x2.s --pic
-#as: --no-underscore --em=criself -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -d -s -h -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-e-20a.d b/ld/testsuite/ld-cris/tls-e-20a.d
index 7d5a95e..5680184 100644
--- a/ld/testsuite/ld-cris/tls-e-20a.d
+++ b/ld/testsuite/ld-cris/tls-e-20a.d
@@ -6,7 +6,7 @@
#source: tls-ie-10.s
#source: tls-hx.s
#source: tls-hx1x2.s
-#as: --no-underscore --em=criself -I$srcdir/$subdir --pic
+#as: --no-underscore --emulation=criself -I$srcdir/$subdir --pic
#ld: -m crislinux
#objdump: -d -s -h -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-e-21.d b/ld/testsuite/ld-cris/tls-e-21.d
index 80ca3e3..33c2214 100644
--- a/ld/testsuite/ld-cris/tls-e-21.d
+++ b/ld/testsuite/ld-cris/tls-e-21.d
@@ -2,7 +2,7 @@
#source: tls128.s
#source: tls-gd-2.s
#source: tls-hx.s
-#as: --no-underscore --em=criself --pic
+#as: --no-underscore --emulation=criself --pic
#ld: -m crislinux
#objdump: -d -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-e-22.d b/ld/testsuite/ld-cris/tls-e-22.d
index 93ab45d..c49a4b4 100644
--- a/ld/testsuite/ld-cris/tls-e-22.d
+++ b/ld/testsuite/ld-cris/tls-e-22.d
@@ -2,7 +2,7 @@
#source: tls128.s
#source: tls-ld-6.s
#source: tls-hx.s
-#as: --no-underscore --em=criself --pic -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself --pic -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -d -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-e-23.d b/ld/testsuite/ld-cris/tls-e-23.d
index a09d55e..ae07bb2 100644
--- a/ld/testsuite/ld-cris/tls-e-23.d
+++ b/ld/testsuite/ld-cris/tls-e-23.d
@@ -2,7 +2,7 @@
#source: tls128.s
#source: tls-ie-10.s
#source: tls-hx.s
-#as: --no-underscore --em=criself --pic -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself --pic -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -d -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-e-66.d b/ld/testsuite/ld-cris/tls-e-66.d
index ba1755d..f556ddf 100644
--- a/ld/testsuite/ld-cris/tls-e-66.d
+++ b/ld/testsuite/ld-cris/tls-e-66.d
@@ -1,7 +1,7 @@
#source: start1.s
#source: tls-le-12s.s
#source: tls-z.s
-#as: --no-underscore --em=criself -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -d -s -t -r -p -h
diff --git a/ld/testsuite/ld-cris/tls-e-80.d b/ld/testsuite/ld-cris/tls-e-80.d
index 15ce3d7..919be62 100644
--- a/ld/testsuite/ld-cris/tls-e-80.d
+++ b/ld/testsuite/ld-cris/tls-e-80.d
@@ -8,7 +8,7 @@
#source: tls-ld-6.s --pic
#source: tls-ie-10.s --pic
#source: tls-hx1x2.s --pic
-#as: --no-underscore --em=criself -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -d -s -h -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-e-dtpoffd1.d b/ld/testsuite/ld-cris/tls-e-dtpoffd1.d
index 5da24b5..3d07dbc 100644
--- a/ld/testsuite/ld-cris/tls-e-dtpoffd1.d
+++ b/ld/testsuite/ld-cris/tls-e-dtpoffd1.d
@@ -3,7 +3,7 @@
#source: tls-gd-1.s
#source: tls128.s
#source: tls-x.s
-#as: --no-underscore --em=criself --pic -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself --pic -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -d -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-e-dtpoffd3.d b/ld/testsuite/ld-cris/tls-e-dtpoffd3.d
index 6013a3a..f619598 100644
--- a/ld/testsuite/ld-cris/tls-e-dtpoffd3.d
+++ b/ld/testsuite/ld-cris/tls-e-dtpoffd3.d
@@ -3,7 +3,7 @@
#source: tls-gd-1.s
#source: tls128.s
#source: tls-commx.s
-#as: --no-underscore --em=criself --pic -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself --pic -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -d -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-e-tpiecomm1.d b/ld/testsuite/ld-cris/tls-e-tpiecomm1.d
index 2e0f0f0..0360790 100644
--- a/ld/testsuite/ld-cris/tls-e-tpiecomm1.d
+++ b/ld/testsuite/ld-cris/tls-e-tpiecomm1.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-e-tpiecomm1.s
-#as: --no-underscore --em=criself -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -d -s -h -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-e-tpoffcomm1.d b/ld/testsuite/ld-cris/tls-e-tpoffcomm1.d
index 4fc067e..4300a22 100644
--- a/ld/testsuite/ld-cris/tls-e-tpoffcomm1.d
+++ b/ld/testsuite/ld-cris/tls-e-tpoffcomm1.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-e-tpoffcomm1.s
-#as: --no-underscore --em=criself -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -d -s -h -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-e-tpoffgotcomm1.d b/ld/testsuite/ld-cris/tls-e-tpoffgotcomm1.d
index 9d34f68..a0501e9 100644
--- a/ld/testsuite/ld-cris/tls-e-tpoffgotcomm1.d
+++ b/ld/testsuite/ld-cris/tls-e-tpoffgotcomm1.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-dso-tpoffgotcomm1.s --pic
-#as: --no-underscore --em=criself -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -d -s -h -t -p
diff --git a/ld/testsuite/ld-cris/tls-err-20x.d b/ld/testsuite/ld-cris/tls-err-20x.d
index 9a3af03..06661dc 100644
--- a/ld/testsuite/ld-cris/tls-err-20x.d
+++ b/ld/testsuite/ld-cris/tls-err-20x.d
@@ -3,7 +3,7 @@
#source: tls-ld-6.s --pic
#source: tls-ie-10.s --pic
#source: tls-hx.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#error: \A[^\n]*: warning: cannot find entry symbol _start; defaulting to [0-9a-f]*\n[^\n]*: in function `tlsdsofn9':\n[^\n]*: undefined reference to `x1'\n[^\n]*: undefined reference to `x2'\Z
diff --git a/ld/testsuite/ld-cris/tls-err-24.d b/ld/testsuite/ld-cris/tls-err-24.d
index 0867870..504b76e 100644
--- a/ld/testsuite/ld-cris/tls-err-24.d
+++ b/ld/testsuite/ld-cris/tls-err-24.d
@@ -1,6 +1,6 @@
#source: tls-le-12s.s
#source: tls-z.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: --shared -m crislinux
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*invalid operation\Z
diff --git a/ld/testsuite/ld-cris/tls-err-25.d b/ld/testsuite/ld-cris/tls-err-25.d
index e162d6e..6f049f2 100644
--- a/ld/testsuite/ld-cris/tls-err-25.d
+++ b/ld/testsuite/ld-cris/tls-err-25.d
@@ -1,6 +1,6 @@
#source: tls-le-12.s
#source: tls-z.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: --shared -m crislinux
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*invalid operation\Z
diff --git a/ld/testsuite/ld-cris/tls-err-26.d b/ld/testsuite/ld-cris/tls-err-26.d
index 45ebfe2..e8f18a3 100644
--- a/ld/testsuite/ld-cris/tls-err-26.d
+++ b/ld/testsuite/ld-cris/tls-err-26.d
@@ -1,6 +1,6 @@
#source: tls-ld-4.s
#source: tls-x.s
-#as: --no-underscore --em=criself --pic
+#as: --no-underscore --emulation=criself --pic
#ld: --shared -m crislinux
#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*bad value\Z
diff --git a/ld/testsuite/ld-cris/tls-err-27.d b/ld/testsuite/ld-cris/tls-err-27.d
index ce55924..876e5ad 100644
--- a/ld/testsuite/ld-cris/tls-err-27.d
+++ b/ld/testsuite/ld-cris/tls-err-27.d
@@ -1,6 +1,6 @@
#source: tls-ld-6.s
#source: tls-x.s
-#as: --no-underscore --em=criself --pic
+#as: --no-underscore --emulation=criself --pic
#ld: --shared -m crislinux
#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*bad value\Z
diff --git a/ld/testsuite/ld-cris/tls-err-28.d b/ld/testsuite/ld-cris/tls-err-28.d
index 8ccd40b..4edf9f9 100644
--- a/ld/testsuite/ld-cris/tls-err-28.d
+++ b/ld/testsuite/ld-cris/tls-err-28.d
@@ -1,6 +1,6 @@
#source: tls-gd-3.s
#source: tls-x.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: --shared -m crislinux
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*invalid operation\Z
diff --git a/ld/testsuite/ld-cris/tls-err-29.d b/ld/testsuite/ld-cris/tls-err-29.d
index e0d7327..d5c9d75 100644
--- a/ld/testsuite/ld-cris/tls-err-29.d
+++ b/ld/testsuite/ld-cris/tls-err-29.d
@@ -1,6 +1,6 @@
#source: init.s
#source: tls-gdgotrelm.s --defsym r=8192
-#as: --no-underscore --em=criself --pic
+#as: --no-underscore --emulation=criself --pic
#ld: --shared -m crislinux
#error: \A[^\n]*\.o: in function[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\Z
diff --git a/ld/testsuite/ld-cris/tls-err-31.d b/ld/testsuite/ld-cris/tls-err-31.d
index b7484ad..ccc5027 100644
--- a/ld/testsuite/ld-cris/tls-err-31.d
+++ b/ld/testsuite/ld-cris/tls-err-31.d
@@ -1,5 +1,5 @@
#source: tls-dtprelm.s --defsym r=32768
-#as: --no-underscore --em=criself --pic
+#as: --no-underscore --emulation=criself --pic
#ld: --shared -m crislinux
#error: \A[^\n]*\.o: in function[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too big[^\n]*\Z
diff --git a/ld/testsuite/ld-cris/tls-err-33.d b/ld/testsuite/ld-cris/tls-err-33.d
index 329fae1..d3fb231 100644
--- a/ld/testsuite/ld-cris/tls-err-33.d
+++ b/ld/testsuite/ld-cris/tls-err-33.d
@@ -1,5 +1,5 @@
#source: tls-gottprelm.s --defsym r=8190
-#as: --no-underscore --em=criself --pic
+#as: --no-underscore --emulation=criself --pic
#ld: --shared -m crislinux
#error: \A[^\n]*\.o: in function[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\Z
diff --git a/ld/testsuite/ld-cris/tls-err-35.d b/ld/testsuite/ld-cris/tls-err-35.d
index b203e35..7d7a371 100644
--- a/ld/testsuite/ld-cris/tls-err-35.d
+++ b/ld/testsuite/ld-cris/tls-err-35.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-tprelm.s --defsym r=32768
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#error: \A[^\n]*\.o: in function[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too big[^\n]*\Z
diff --git a/ld/testsuite/ld-cris/tls-err-37.d b/ld/testsuite/ld-cris/tls-err-37.d
index a41dd0a..10a2cc2 100644
--- a/ld/testsuite/ld-cris/tls-err-37.d
+++ b/ld/testsuite/ld-cris/tls-err-37.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-gd-2.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#error: \A[^\n]*\.o: in function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
diff --git a/ld/testsuite/ld-cris/tls-err-39.d b/ld/testsuite/ld-cris/tls-err-39.d
index fbdc698..a666fcb 100644
--- a/ld/testsuite/ld-cris/tls-err-39.d
+++ b/ld/testsuite/ld-cris/tls-err-39.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-ld-6.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#error: \A[^\n]*\.o: in function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
diff --git a/ld/testsuite/ld-cris/tls-err-40.d b/ld/testsuite/ld-cris/tls-err-40.d
index 91b4165..8bcd356 100644
--- a/ld/testsuite/ld-cris/tls-err-40.d
+++ b/ld/testsuite/ld-cris/tls-err-40.d
@@ -1,5 +1,5 @@
#source: tls-ld-6.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --shared
#error: \A[^\n]*\.o[^\n]*undefined reference[^\n]*\n[^\n]*bad value\Z
diff --git a/ld/testsuite/ld-cris/tls-err-41.d b/ld/testsuite/ld-cris/tls-err-41.d
index 0c4705f..b74bbb8 100644
--- a/ld/testsuite/ld-cris/tls-err-41.d
+++ b/ld/testsuite/ld-cris/tls-err-41.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-ie-10.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#error: \A[^\n]*\.o: in function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
diff --git a/ld/testsuite/ld-cris/tls-err-43.d b/ld/testsuite/ld-cris/tls-err-43.d
index bb3abb4..de5eb4c 100644
--- a/ld/testsuite/ld-cris/tls-err-43.d
+++ b/ld/testsuite/ld-cris/tls-err-43.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-le-12.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#error: \A[^\n]*\.o: in function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
diff --git a/ld/testsuite/ld-cris/tls-err-44.d b/ld/testsuite/ld-cris/tls-err-44.d
index 941e21c..f70a965 100644
--- a/ld/testsuite/ld-cris/tls-err-44.d
+++ b/ld/testsuite/ld-cris/tls-err-44.d
@@ -1,5 +1,5 @@
#source: tls-le-12.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --shared
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*invalid operation\Z
diff --git a/ld/testsuite/ld-cris/tls-err-45.d b/ld/testsuite/ld-cris/tls-err-45.d
index 28faa30..dedab8f 100644
--- a/ld/testsuite/ld-cris/tls-err-45.d
+++ b/ld/testsuite/ld-cris/tls-err-45.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-gd-1.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#error: \A[^\n]*\.o: in function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
diff --git a/ld/testsuite/ld-cris/tls-err-47.d b/ld/testsuite/ld-cris/tls-err-47.d
index 4f7139b..035ca1e 100644
--- a/ld/testsuite/ld-cris/tls-err-47.d
+++ b/ld/testsuite/ld-cris/tls-err-47.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-ld-4.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#error: \A[^\n]*\.o: in function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
diff --git a/ld/testsuite/ld-cris/tls-err-48.d b/ld/testsuite/ld-cris/tls-err-48.d
index 756f1b5..5530c34 100644
--- a/ld/testsuite/ld-cris/tls-err-48.d
+++ b/ld/testsuite/ld-cris/tls-err-48.d
@@ -1,5 +1,5 @@
#source: tls-ld-4.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --shared
#error: \A[^\n]*\.o[^\n]*undefined reference[^\n]*\n[^\n]*bad value\Z
diff --git a/ld/testsuite/ld-cris/tls-err-49.d b/ld/testsuite/ld-cris/tls-err-49.d
index 5d8a9c9..6509560 100644
--- a/ld/testsuite/ld-cris/tls-err-49.d
+++ b/ld/testsuite/ld-cris/tls-err-49.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-ie-8.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#error: \A[^\n]*\.o: in function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
diff --git a/ld/testsuite/ld-cris/tls-err-51.d b/ld/testsuite/ld-cris/tls-err-51.d
index 3891aac..efe5f3c 100644
--- a/ld/testsuite/ld-cris/tls-err-51.d
+++ b/ld/testsuite/ld-cris/tls-err-51.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-le-12s.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#error: \A[^\n]*\.o: in function[^\n]*\n[^\n]*undefined reference[^\n]*\Z
diff --git a/ld/testsuite/ld-cris/tls-err-52.d b/ld/testsuite/ld-cris/tls-err-52.d
index b2f85cf..9aeb260 100644
--- a/ld/testsuite/ld-cris/tls-err-52.d
+++ b/ld/testsuite/ld-cris/tls-err-52.d
@@ -1,5 +1,5 @@
#source: tls-le-12s.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --shared
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*invalid operation\Z
diff --git a/ld/testsuite/ld-cris/tls-err-53.d b/ld/testsuite/ld-cris/tls-err-53.d
index 89884be..31f3a3c 100644
--- a/ld/testsuite/ld-cris/tls-err-53.d
+++ b/ld/testsuite/ld-cris/tls-err-53.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-ld-4.s
-#as: --no-underscore --em=criself --pic
+#as: --no-underscore --emulation=criself --pic
#ld: -m crislinux tmpdir/tls-dso-xz-1.so
#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*bad value\Z
diff --git a/ld/testsuite/ld-cris/tls-err-55.d b/ld/testsuite/ld-cris/tls-err-55.d
index 32f0517..10a8016 100644
--- a/ld/testsuite/ld-cris/tls-err-55.d
+++ b/ld/testsuite/ld-cris/tls-err-55.d
@@ -1,5 +1,5 @@
#source: tls-err-55.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: --shared -m crislinux
#error: \A[^\n]*\.o[^\n]*relocation R_CRIS_32_GOT_GD with non-zero addend 42 against symbol `tls128'[^\n]*\n[^\n]*bad value\Z
diff --git a/ld/testsuite/ld-cris/tls-err-56.d b/ld/testsuite/ld-cris/tls-err-56.d
index 8a68dd1..d46e27e 100644
--- a/ld/testsuite/ld-cris/tls-err-56.d
+++ b/ld/testsuite/ld-cris/tls-err-56.d
@@ -1,5 +1,5 @@
#source: tls-err-56.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: --shared -m crislinux
#error: \A[^\n]*\.o[^\n]*relocation R_CRIS_32_GOT_GD with non-zero addend 42 against symbol `tls128'[^\n]*\n[^\n]*bad value\Z
diff --git a/ld/testsuite/ld-cris/tls-err-62.d b/ld/testsuite/ld-cris/tls-err-62.d
index da64d1c..1e18000 100644
--- a/ld/testsuite/ld-cris/tls-err-62.d
+++ b/ld/testsuite/ld-cris/tls-err-62.d
@@ -1,5 +1,5 @@
#source: tls-err-62.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: --shared -m crislinux
#error: \A[^\n]*\.o[^\n]*relocation R_CRIS_32_GOT_TPREL with non-zero addend 42 against symbol `tls128'[^\n]*\n[^\n]*bad value\Z
diff --git a/ld/testsuite/ld-cris/tls-err-65.d b/ld/testsuite/ld-cris/tls-err-65.d
index 62958a2..0de5e51 100644
--- a/ld/testsuite/ld-cris/tls-err-65.d
+++ b/ld/testsuite/ld-cris/tls-err-65.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-le-12s.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux tmpdir/tls-dso-xz-1.so
#error: \A[^\n]*\.o,[^\n]*mixup[^\n]*\n[^\n]*bad value\Z
diff --git a/ld/testsuite/ld-cris/tls-err-67.d b/ld/testsuite/ld-cris/tls-err-67.d
index 6a010e1..a1493e5 100644
--- a/ld/testsuite/ld-cris/tls-err-67.d
+++ b/ld/testsuite/ld-cris/tls-err-67.d
@@ -1,6 +1,6 @@
#source: init.s
#source: tls-gdgotrelm.s --defsym r=8203
-#as: --no-underscore --em=criself --pic
+#as: --no-underscore --emulation=criself --pic
#ld: --shared -m crislinux
#error: \A[^\n]*\.o: in[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: in[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: in[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: in[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: in[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: in[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: in[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: in[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: in[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: in[^\n]*\n[^\n]*truncated[^\n]*\n[^\n]*too many[^\n]*\n[^\n]*\.o: in[^\n]*\n[^\n]*omitted[^\n]*\Z
diff --git a/ld/testsuite/ld-cris/tls-err-77.d b/ld/testsuite/ld-cris/tls-err-77.d
index 6b7696b..2888da3 100644
--- a/ld/testsuite/ld-cris/tls-err-77.d
+++ b/ld/testsuite/ld-cris/tls-err-77.d
@@ -1,6 +1,6 @@
#source: tls-ie-8e.s
#source: tls-x.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: --shared -m crislinux
#error: \A[^\n]*\.o, [^\n]*\n[^\n]*mixup[^\n]*\n[^\n]*invalid operation\Z
diff --git a/ld/testsuite/ld-cris/tls-gc-68.d b/ld/testsuite/ld-cris/tls-gc-68.d
index c1a7d25..a2c04f1 100644
--- a/ld/testsuite/ld-cris/tls-gc-68.d
+++ b/ld/testsuite/ld-cris/tls-gc-68.d
@@ -1,7 +1,7 @@
#source: start1.s
#source: tls-x.s
#source: tls-local-58.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux --gc-sections
#objdump: -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-gc-69.d b/ld/testsuite/ld-cris/tls-gc-69.d
index ef02437..3714efb 100644
--- a/ld/testsuite/ld-cris/tls-gc-69.d
+++ b/ld/testsuite/ld-cris/tls-gc-69.d
@@ -1,7 +1,7 @@
#source: start1.s
#source: tls-x.s
#source: tls-local-59.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux --gc-sections
#objdump: -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-gc-70.d b/ld/testsuite/ld-cris/tls-gc-70.d
index 74d0d13..b6c5c76 100644
--- a/ld/testsuite/ld-cris/tls-gc-70.d
+++ b/ld/testsuite/ld-cris/tls-gc-70.d
@@ -2,7 +2,7 @@
#source: tls128.s
#source: tls-gd-3.s
#source: tls-x.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --gc-sections
#objdump: -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-gc-71.d b/ld/testsuite/ld-cris/tls-gc-71.d
index 343204e..c6f35ca 100644
--- a/ld/testsuite/ld-cris/tls-gc-71.d
+++ b/ld/testsuite/ld-cris/tls-gc-71.d
@@ -2,7 +2,7 @@
#source: init.s
#source: tls128g.s
#source: tls-hx.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: --shared -m crislinux --gc-sections --hash-style=sysv
#objdump: -s -t -R -p -T
diff --git a/ld/testsuite/ld-cris/tls-gc-75.d b/ld/testsuite/ld-cris/tls-gc-75.d
index f377dc2..2ce0fcf 100644
--- a/ld/testsuite/ld-cris/tls-gc-75.d
+++ b/ld/testsuite/ld-cris/tls-gc-75.d
@@ -4,7 +4,7 @@
#source: tls-ie-10.s
#source: tls-gd-1.s
#source: tls-ie-8.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux --gc-sections
#objdump: -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-gc-76.d b/ld/testsuite/ld-cris/tls-gc-76.d
index 2bcf25c..01d37c9 100644
--- a/ld/testsuite/ld-cris/tls-gc-76.d
+++ b/ld/testsuite/ld-cris/tls-gc-76.d
@@ -1,4 +1,4 @@
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux --gc-sections -u gc76fn
#source: start1.s
#source: tls-gc-76.s
diff --git a/ld/testsuite/ld-cris/tls-gc-79.d b/ld/testsuite/ld-cris/tls-gc-79.d
index a5bd7ff..92fce15 100644
--- a/ld/testsuite/ld-cris/tls-gc-79.d
+++ b/ld/testsuite/ld-cris/tls-gc-79.d
@@ -2,7 +2,7 @@
#source: tls128.s
#source: tls-ie-8e.s
#source: tls-x.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --gc-sections
#objdump: -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-gd-1.d b/ld/testsuite/ld-cris/tls-gd-1.d
index 5156a27..61d5804 100644
--- a/ld/testsuite/ld-cris/tls-gd-1.d
+++ b/ld/testsuite/ld-cris/tls-gd-1.d
@@ -1,4 +1,4 @@
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#source: tls-gd-1.s
#source: tls128.s
diff --git a/ld/testsuite/ld-cris/tls-gd-1h.d b/ld/testsuite/ld-cris/tls-gd-1h.d
index e012304..242f3ac 100644
--- a/ld/testsuite/ld-cris/tls-gd-1h.d
+++ b/ld/testsuite/ld-cris/tls-gd-1h.d
@@ -1,4 +1,4 @@
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#source: tls-gd-1.s
#source: tls128g.s
diff --git a/ld/testsuite/ld-cris/tls-gd-2.d b/ld/testsuite/ld-cris/tls-gd-2.d
index 107687c..989fa56 100644
--- a/ld/testsuite/ld-cris/tls-gd-2.d
+++ b/ld/testsuite/ld-cris/tls-gd-2.d
@@ -1,4 +1,4 @@
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#source: tls-gd-2.s
#source: tls128g.s
diff --git a/ld/testsuite/ld-cris/tls-gd-2h.d b/ld/testsuite/ld-cris/tls-gd-2h.d
index f5eaa8b..1041de4 100644
--- a/ld/testsuite/ld-cris/tls-gd-2h.d
+++ b/ld/testsuite/ld-cris/tls-gd-2h.d
@@ -1,4 +1,4 @@
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#source: tls-gd-2.s
#source: tls128g.s
diff --git a/ld/testsuite/ld-cris/tls-gd-3.d b/ld/testsuite/ld-cris/tls-gd-3.d
index b2de851..d9ed9de 100644
--- a/ld/testsuite/ld-cris/tls-gd-3.d
+++ b/ld/testsuite/ld-cris/tls-gd-3.d
@@ -2,7 +2,7 @@
#source: tls128.s
#source: tls-gd-3.s
#source: tls-x.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#objdump: -d -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-gd-3h.d b/ld/testsuite/ld-cris/tls-gd-3h.d
index 898a670..69455e6 100644
--- a/ld/testsuite/ld-cris/tls-gd-3h.d
+++ b/ld/testsuite/ld-cris/tls-gd-3h.d
@@ -2,7 +2,7 @@
#source: tls128.s
#source: tls-gd-3.s
#source: tls-hx.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#objdump: -d -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-global-74.d b/ld/testsuite/ld-cris/tls-global-74.d
index b70c6a9..e0b9859 100644
--- a/ld/testsuite/ld-cris/tls-global-74.d
+++ b/ld/testsuite/ld-cris/tls-global-74.d
@@ -4,7 +4,7 @@
#source: tls-ie-10.s
#source: tls-gd-1.s
#source: tls-ie-8.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-ie-10.d b/ld/testsuite/ld-cris/tls-ie-10.d
index 0df1e9d..bf010f0 100644
--- a/ld/testsuite/ld-cris/tls-ie-10.d
+++ b/ld/testsuite/ld-cris/tls-ie-10.d
@@ -1,4 +1,4 @@
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#source: tls-ie-10.s
#source: tls128g.s
diff --git a/ld/testsuite/ld-cris/tls-ie-11.d b/ld/testsuite/ld-cris/tls-ie-11.d
index 3bd727a..8a43359 100644
--- a/ld/testsuite/ld-cris/tls-ie-11.d
+++ b/ld/testsuite/ld-cris/tls-ie-11.d
@@ -1,4 +1,4 @@
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#source: tls-ie-11.s
#source: tls128g.s
diff --git a/ld/testsuite/ld-cris/tls-ie-78.d b/ld/testsuite/ld-cris/tls-ie-78.d
index ae9862c..7e477490 100644
--- a/ld/testsuite/ld-cris/tls-ie-78.d
+++ b/ld/testsuite/ld-cris/tls-ie-78.d
@@ -1,7 +1,7 @@
#source: start1.s
#source: tls128.s
#source: tls-ie-8e.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --hash-style=sysv
#ld_after_inputfiles: tmpdir/tls-dso-xz-1.so
#objdump: -s -h -t -T -R -r -p
diff --git a/ld/testsuite/ld-cris/tls-ie-8.d b/ld/testsuite/ld-cris/tls-ie-8.d
index 4af78fb..deed73f 100644
--- a/ld/testsuite/ld-cris/tls-ie-8.d
+++ b/ld/testsuite/ld-cris/tls-ie-8.d
@@ -1,4 +1,4 @@
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#source: tls-ie-8.s
#source: tls128g.s
diff --git a/ld/testsuite/ld-cris/tls-ie-8e1.d b/ld/testsuite/ld-cris/tls-ie-8e1.d
index 0093935..2666e3e 100644
--- a/ld/testsuite/ld-cris/tls-ie-8e1.d
+++ b/ld/testsuite/ld-cris/tls-ie-8e1.d
@@ -1,4 +1,4 @@
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#source: start1.s
#source: tls-ie-8e.s
diff --git a/ld/testsuite/ld-cris/tls-ie-9.d b/ld/testsuite/ld-cris/tls-ie-9.d
index c1b5b1a..5334dc5 100644
--- a/ld/testsuite/ld-cris/tls-ie-9.d
+++ b/ld/testsuite/ld-cris/tls-ie-9.d
@@ -1,4 +1,4 @@
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#source: tls-ie-9.s
#source: tls128g.s
diff --git a/ld/testsuite/ld-cris/tls-js1.d b/ld/testsuite/ld-cris/tls-js1.d
index f007ea4..099d046 100644
--- a/ld/testsuite/ld-cris/tls-js1.d
+++ b/ld/testsuite/ld-cris/tls-js1.d
@@ -4,7 +4,7 @@
#source: expdyn1.s
#source: tls-hx.s
#source: dso-1.s
-#as: --pic --no-underscore --em=criself --march=v32
+#as: --pic --no-underscore --emulation=criself --march=v32
#ld: --shared -m crislinux --hash-style=sysv
#readelf: -a
diff --git a/ld/testsuite/ld-cris/tls-ld-4.d b/ld/testsuite/ld-cris/tls-ld-4.d
index ea1fc29..2d2c7c5 100644
--- a/ld/testsuite/ld-cris/tls-ld-4.d
+++ b/ld/testsuite/ld-cris/tls-ld-4.d
@@ -1,4 +1,4 @@
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#source: tls-ld-4.s
#source: tls128g.s
diff --git a/ld/testsuite/ld-cris/tls-ld-5.d b/ld/testsuite/ld-cris/tls-ld-5.d
index 5d423aa..f2bb06e 100644
--- a/ld/testsuite/ld-cris/tls-ld-5.d
+++ b/ld/testsuite/ld-cris/tls-ld-5.d
@@ -1,4 +1,4 @@
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#source: tls-ld-5.s
#source: tls128g.s
diff --git a/ld/testsuite/ld-cris/tls-ld-6.d b/ld/testsuite/ld-cris/tls-ld-6.d
index 21dbabe..db00c15 100644
--- a/ld/testsuite/ld-cris/tls-ld-6.d
+++ b/ld/testsuite/ld-cris/tls-ld-6.d
@@ -1,4 +1,4 @@
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: --shared -m crislinux --hash-style=sysv
#source: tls128g.s
#source: tls-ld-6.s
diff --git a/ld/testsuite/ld-cris/tls-ld-7.d b/ld/testsuite/ld-cris/tls-ld-7.d
index e0fb31e..7f89a90 100644
--- a/ld/testsuite/ld-cris/tls-ld-7.d
+++ b/ld/testsuite/ld-cris/tls-ld-7.d
@@ -1,4 +1,4 @@
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#source: tls-ld-7.s
#source: tls128g.s
diff --git a/ld/testsuite/ld-cris/tls-ldgd-14.d b/ld/testsuite/ld-cris/tls-ldgd-14.d
index 0c1d486..1a93a47 100644
--- a/ld/testsuite/ld-cris/tls-ldgd-14.d
+++ b/ld/testsuite/ld-cris/tls-ldgd-14.d
@@ -5,7 +5,7 @@
#source: tls-x.s
#source: tls-z.s
#source: tls-hx1x2.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#objdump: -s -t -R -p -T
diff --git a/ld/testsuite/ld-cris/tls-ldgd-15.d b/ld/testsuite/ld-cris/tls-ldgd-15.d
index 7916d31..a51e8ff 100644
--- a/ld/testsuite/ld-cris/tls-ldgd-15.d
+++ b/ld/testsuite/ld-cris/tls-ldgd-15.d
@@ -5,7 +5,7 @@
#source: tls-x.s
#source: tls-z.s
#source: tls-hx1x2.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv
#objdump: -s -t -R -p -T
diff --git a/ld/testsuite/ld-cris/tls-ldgde-14.d b/ld/testsuite/ld-cris/tls-ldgde-14.d
index 9eada3e..0f2d90d 100644
--- a/ld/testsuite/ld-cris/tls-ldgde-14.d
+++ b/ld/testsuite/ld-cris/tls-ldgde-14.d
@@ -6,7 +6,7 @@
#source: tls-x.s
#source: tls-z.s
#source: tls-hx1x2.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: -m crislinux
#objdump: -d -s -h -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-ldgde-15.d b/ld/testsuite/ld-cris/tls-ldgde-15.d
index d5e993d..8b3c6ed 100644
--- a/ld/testsuite/ld-cris/tls-ldgde-15.d
+++ b/ld/testsuite/ld-cris/tls-ldgde-15.d
@@ -6,7 +6,7 @@
#source: tls-x.s
#source: tls-z.s
#source: tls-hx1x2.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: -m crislinux
#objdump: -d -s -h -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-ldgdex-14.d b/ld/testsuite/ld-cris/tls-ldgdex-14.d
index 86a8d4e..b96e6de 100644
--- a/ld/testsuite/ld-cris/tls-ldgdex-14.d
+++ b/ld/testsuite/ld-cris/tls-ldgdex-14.d
@@ -4,7 +4,7 @@
#source: tls-gd-1.s
#source: tls-ldgd-14.s
#source: tls-hx1x2.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: -m crislinux tmpdir/tls-dso-xz-1.so --hash-style=sysv
#objdump: -s -h -t -T -R -r -p
diff --git a/ld/testsuite/ld-cris/tls-ldgdex-15.d b/ld/testsuite/ld-cris/tls-ldgdex-15.d
index 0a4e527..0589a35 100644
--- a/ld/testsuite/ld-cris/tls-ldgdex-15.d
+++ b/ld/testsuite/ld-cris/tls-ldgdex-15.d
@@ -4,7 +4,7 @@
#source: tls-gd-2.s
#source: tls-ldgd-15.s
#source: tls-hx1x2.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: -m crislinux tmpdir/tls-dso-xz-1.so --hash-style=sysv
#objdump: -s -h -t -T -R -r -p
diff --git a/ld/testsuite/ld-cris/tls-ldgdx-14.d b/ld/testsuite/ld-cris/tls-ldgdx-14.d
index a773522..d9d229e 100644
--- a/ld/testsuite/ld-cris/tls-ldgdx-14.d
+++ b/ld/testsuite/ld-cris/tls-ldgdx-14.d
@@ -3,7 +3,7 @@
#source: tls-gd-1.s
#source: tls-ldgd-14.s
#source: tls-hx1x2.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv tmpdir/tls-dso-xz-1.so
#objdump: -s -h -t -T -R -r -p
diff --git a/ld/testsuite/ld-cris/tls-ldgdx-15.d b/ld/testsuite/ld-cris/tls-ldgdx-15.d
index e0b9a53..ac3dfd6 100644
--- a/ld/testsuite/ld-cris/tls-ldgdx-15.d
+++ b/ld/testsuite/ld-cris/tls-ldgdx-15.d
@@ -3,7 +3,7 @@
#source: tls-gd-2.s
#source: tls-ldgd-15.s
#source: tls-hx1x2.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux --hash-style=sysv tmpdir/tls-dso-xz-1.so
#objdump: -s -h -t -T -R -r -p
diff --git a/ld/testsuite/ld-cris/tls-le-12.d b/ld/testsuite/ld-cris/tls-le-12.d
index d24b21b..b5d8abf 100644
--- a/ld/testsuite/ld-cris/tls-le-12.d
+++ b/ld/testsuite/ld-cris/tls-le-12.d
@@ -2,7 +2,7 @@
#source: tls128.s
#source: tls-le-12.s
#source: tls-z.s
-#as: --no-underscore --em=criself -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -d -s -t -r -p -h
diff --git a/ld/testsuite/ld-cris/tls-le-12s.d b/ld/testsuite/ld-cris/tls-le-12s.d
index 96570e9..b69b871 100644
--- a/ld/testsuite/ld-cris/tls-le-12s.d
+++ b/ld/testsuite/ld-cris/tls-le-12s.d
@@ -2,7 +2,7 @@
#source: tls-le-12s.s
#source: tls-z.s
#source: tls128.s
-#as: --no-underscore --em=criself -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -d -s -t -r -p -h
diff --git a/ld/testsuite/ld-cris/tls-le-13.d b/ld/testsuite/ld-cris/tls-le-13.d
index 3d969ac..c04de57 100644
--- a/ld/testsuite/ld-cris/tls-le-13.d
+++ b/ld/testsuite/ld-cris/tls-le-13.d
@@ -2,7 +2,7 @@
#source: tls128.s
#source: tls-le-13.s
#source: tls-x1x2.s
-#as: --no-underscore --em=criself -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -d -s -t -r -p -h
diff --git a/ld/testsuite/ld-cris/tls-le-13s.d b/ld/testsuite/ld-cris/tls-le-13s.d
index 146c913..dc5720e 100644
--- a/ld/testsuite/ld-cris/tls-le-13s.d
+++ b/ld/testsuite/ld-cris/tls-le-13s.d
@@ -2,7 +2,7 @@
#source: tls128.s
#source: tls-le-13s.s
#source: tls-x1x2.s
-#as: --no-underscore --em=criself -I$srcdir/$subdir
+#as: --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -d -s -t -r -p -h
diff --git a/ld/testsuite/ld-cris/tls-legd-16.d b/ld/testsuite/ld-cris/tls-legd-16.d
index 092d39e..b5fc3d7 100644
--- a/ld/testsuite/ld-cris/tls-legd-16.d
+++ b/ld/testsuite/ld-cris/tls-legd-16.d
@@ -6,7 +6,7 @@
#source: tls-x.s
#source: tls-z.s
#source: tls-x1x2.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#objdump: -d -s -h -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-legd-17.d b/ld/testsuite/ld-cris/tls-legd-17.d
index 49f2d45..f7f4421 100644
--- a/ld/testsuite/ld-cris/tls-legd-17.d
+++ b/ld/testsuite/ld-cris/tls-legd-17.d
@@ -6,7 +6,7 @@
#source: tls-x.s
#source: tls-z.s
#source: tls-x1x2.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#objdump: -d -s -h -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-legdx-16.d b/ld/testsuite/ld-cris/tls-legdx-16.d
index badbeb3..11816cc 100644
--- a/ld/testsuite/ld-cris/tls-legdx-16.d
+++ b/ld/testsuite/ld-cris/tls-legdx-16.d
@@ -4,7 +4,7 @@
#source: tls-gd-3.s
#source: tls-legd-16.s
#source: tls-x1x2.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux tmpdir/tls-dso-xz-1.so --hash-style=sysv
#objdump: -s -h -t -T -R -r -p
diff --git a/ld/testsuite/ld-cris/tls-legdx-17.d b/ld/testsuite/ld-cris/tls-legdx-17.d
index 5b2c7ec..9eba531 100644
--- a/ld/testsuite/ld-cris/tls-legdx-17.d
+++ b/ld/testsuite/ld-cris/tls-legdx-17.d
@@ -4,7 +4,7 @@
#source: tls-gd-2.s --pic
#source: tls-ldgd-14.s --pic
#source: tls-x1x2.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux tmpdir/tls-dso-xz-1.so --hash-style=sysv
#objdump: -s -h -t -T -R -r -p
diff --git a/ld/testsuite/ld-cris/tls-leie-18.d b/ld/testsuite/ld-cris/tls-leie-18.d
index edff43c..2285f46 100644
--- a/ld/testsuite/ld-cris/tls-leie-18.d
+++ b/ld/testsuite/ld-cris/tls-leie-18.d
@@ -3,7 +3,7 @@
#source: tls-le-13s.s
#source: tls-ie-9.s --pic
#source: tls-x1x2.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#objdump: -d -s -h -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-leie-19.d b/ld/testsuite/ld-cris/tls-leie-19.d
index 859e2e6..09f5cf6 100644
--- a/ld/testsuite/ld-cris/tls-leie-19.d
+++ b/ld/testsuite/ld-cris/tls-leie-19.d
@@ -6,7 +6,7 @@
#source: tls-hx1x2.s
#source: tls-x.s
#source: tls-z.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#objdump: -d -s -h -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-local-54.d b/ld/testsuite/ld-cris/tls-local-54.d
index 0098e56..1209cfd 100644
--- a/ld/testsuite/ld-cris/tls-local-54.d
+++ b/ld/testsuite/ld-cris/tls-local-54.d
@@ -1,5 +1,5 @@
#source: tls-local-54.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: --shared -m crislinux --hash-style=sysv
#objdump: -s -t -R -p -T
diff --git a/ld/testsuite/ld-cris/tls-local-57.d b/ld/testsuite/ld-cris/tls-local-57.d
index cce2486..ed74fe0 100644
--- a/ld/testsuite/ld-cris/tls-local-57.d
+++ b/ld/testsuite/ld-cris/tls-local-57.d
@@ -1,7 +1,7 @@
#source: start1.s
#source: tls-x.s
#source: tls-local-57.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-local-58.d b/ld/testsuite/ld-cris/tls-local-58.d
index d7926bd..e22b393 100644
--- a/ld/testsuite/ld-cris/tls-local-58.d
+++ b/ld/testsuite/ld-cris/tls-local-58.d
@@ -1,7 +1,7 @@
#source: start1.s
#source: tls-x.s
#source: tls-local-58.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-local-59.d b/ld/testsuite/ld-cris/tls-local-59.d
index c37584b..ee68c3a 100644
--- a/ld/testsuite/ld-cris/tls-local-59.d
+++ b/ld/testsuite/ld-cris/tls-local-59.d
@@ -1,7 +1,7 @@
#source: start1.s
#source: tls-x.s
#source: tls-local-59.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux
#objdump: -s -t -r -p
diff --git a/ld/testsuite/ld-cris/tls-local-60.d b/ld/testsuite/ld-cris/tls-local-60.d
index ce64203..acbed26 100644
--- a/ld/testsuite/ld-cris/tls-local-60.d
+++ b/ld/testsuite/ld-cris/tls-local-60.d
@@ -1,6 +1,6 @@
#source: tls-x.s
#source: tls-local-59.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux --shared --hash-style=sysv
#objdump: -s -t -r -p -R -T
diff --git a/ld/testsuite/ld-cris/tls-local-61.d b/ld/testsuite/ld-cris/tls-local-61.d
index c902a87..1a47880 100644
--- a/ld/testsuite/ld-cris/tls-local-61.d
+++ b/ld/testsuite/ld-cris/tls-local-61.d
@@ -1,5 +1,5 @@
#source: tls-local-59.s
-#as: --pic --no-underscore --em=criself -I$srcdir/$subdir
+#as: --pic --no-underscore --emulation=criself -I$srcdir/$subdir
#ld: -m crislinux --shared --hash-style=sysv
#objdump: -s -t -r -p -R -T
diff --git a/ld/testsuite/ld-cris/tls-local-63.d b/ld/testsuite/ld-cris/tls-local-63.d
index 7fde60a..4dcdb2e 100644
--- a/ld/testsuite/ld-cris/tls-local-63.d
+++ b/ld/testsuite/ld-cris/tls-local-63.d
@@ -1,6 +1,6 @@
#source: tls-ie-8.s --pic
#source: tls-hx.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --shared --hash-style=sysv
#readelf: -a -x 6 -x 8 -x 5
diff --git a/ld/testsuite/ld-cris/tls-local-64.d b/ld/testsuite/ld-cris/tls-local-64.d
index ec0b0ea..38f90c8 100644
--- a/ld/testsuite/ld-cris/tls-local-64.d
+++ b/ld/testsuite/ld-cris/tls-local-64.d
@@ -1,7 +1,7 @@
#source: tls-ie-8.s --pic
#source: tls128.s
#source: tls-hx.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --shared --hash-style=sysv
#readelf: -a -x 6 -x 8 -x 5
diff --git a/ld/testsuite/ld-cris/tls-ok-30.d b/ld/testsuite/ld-cris/tls-ok-30.d
index b5f0f56..3e1cbcb 100644
--- a/ld/testsuite/ld-cris/tls-ok-30.d
+++ b/ld/testsuite/ld-cris/tls-ok-30.d
@@ -1,5 +1,5 @@
#source: tls-gdgotrelm.s --defsym r=8191
-#as: --no-underscore --em=criself --pic
+#as: --no-underscore --emulation=criself --pic
#ld: --shared -m crislinux --hash-style=sysv
#objdump: -s -j .got -R
diff --git a/ld/testsuite/ld-cris/tls-ok-32.d b/ld/testsuite/ld-cris/tls-ok-32.d
index 6f7dab0..64e4e07 100644
--- a/ld/testsuite/ld-cris/tls-ok-32.d
+++ b/ld/testsuite/ld-cris/tls-ok-32.d
@@ -1,5 +1,5 @@
#source: tls-dtprelm.s --defsym r=32767
-#as: --no-underscore --em=criself --pic
+#as: --no-underscore --emulation=criself --pic
#ld: --shared -m crislinux --hash-style=sysv
#objdump: -s -j .got -j .text -j .tdata -R
diff --git a/ld/testsuite/ld-cris/tls-ok-34.d b/ld/testsuite/ld-cris/tls-ok-34.d
index ec2f7ee..c5cf66f 100644
--- a/ld/testsuite/ld-cris/tls-ok-34.d
+++ b/ld/testsuite/ld-cris/tls-ok-34.d
@@ -1,5 +1,5 @@
#source: tls-gottprelm.s --defsym r=8189
-#as: --no-underscore --em=criself --pic
+#as: --no-underscore --emulation=criself --pic
#ld: --shared -m crislinux --hash-style=sysv
#objdump: -s -j .got -R
diff --git a/ld/testsuite/ld-cris/tls-ok-36.d b/ld/testsuite/ld-cris/tls-ok-36.d
index fcfecb9..fac6746 100644
--- a/ld/testsuite/ld-cris/tls-ok-36.d
+++ b/ld/testsuite/ld-cris/tls-ok-36.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: tls-tprelm.s --defsym r=32767
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux
#objdump: -s -j .got -j .text -j .tdata
diff --git a/ld/testsuite/ld-cris/tls-und-38.d b/ld/testsuite/ld-cris/tls-und-38.d
index fefe386..07c0662 100644
--- a/ld/testsuite/ld-cris/tls-und-38.d
+++ b/ld/testsuite/ld-cris/tls-und-38.d
@@ -1,5 +1,5 @@
#source: tls-gd-2.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --shared --hash-style=sysv
#readelf: -a -x 7
diff --git a/ld/testsuite/ld-cris/tls-und-42.d b/ld/testsuite/ld-cris/tls-und-42.d
index 6446077..b7309a7 100644
--- a/ld/testsuite/ld-cris/tls-und-42.d
+++ b/ld/testsuite/ld-cris/tls-und-42.d
@@ -1,5 +1,5 @@
#source: tls-ie-10.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --shared --hash-style=sysv
#readelf: -a -x 7
diff --git a/ld/testsuite/ld-cris/tls-und-46.d b/ld/testsuite/ld-cris/tls-und-46.d
index ab62cde..1088e42 100644
--- a/ld/testsuite/ld-cris/tls-und-46.d
+++ b/ld/testsuite/ld-cris/tls-und-46.d
@@ -1,5 +1,5 @@
#source: tls-gd-1.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --shared --hash-style=sysv
#readelf: -a -x 7
diff --git a/ld/testsuite/ld-cris/tls-und-50.d b/ld/testsuite/ld-cris/tls-und-50.d
index ed35e42..2b22a21 100644
--- a/ld/testsuite/ld-cris/tls-und-50.d
+++ b/ld/testsuite/ld-cris/tls-und-50.d
@@ -1,5 +1,5 @@
#source: tls-ie-8.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --shared --hash-style=sysv
#readelf: -a -x 7
diff --git a/ld/testsuite/ld-cris/undef1.d b/ld/testsuite/ld-cris/undef1.d
index cec00cb..7940c77 100644
--- a/ld/testsuite/ld-cris/undef1.d
+++ b/ld/testsuite/ld-cris/undef1.d
@@ -1,6 +1,6 @@
#source: dso-1.s
#source: gotrel1.s --pic
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux tmpdir/libdso-4.so
#objdump: -T
diff --git a/ld/testsuite/ld-cris/undef2.d b/ld/testsuite/ld-cris/undef2.d
index cd2c43e..a8e6e86 100644
--- a/ld/testsuite/ld-cris/undef2.d
+++ b/ld/testsuite/ld-cris/undef2.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: stabs1.s
#target: cris-*-*elf* cris-*-*aout*
-#as: --em=crisaout
+#as: --emulation=crisaout
#ld: -mcrisaout
#error: .o:/blah/foo.c:96:\(.*\): undefined reference to `globsym1'$
diff --git a/ld/testsuite/ld-cris/undef3.d b/ld/testsuite/ld-cris/undef3.d
index e21456b..92c348f 100644
--- a/ld/testsuite/ld-cris/undef3.d
+++ b/ld/testsuite/ld-cris/undef3.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: stabs1.s
#target: cris-*-*elf* cris-*-*aout*
-#as: --em=criself
+#as: --emulation=criself
#ld: -mcriself
#error: .o:/blah/foo.c:96:\(.*\): undefined reference to `globsym1'$
diff --git a/ld/testsuite/ld-cris/v10-v32.d b/ld/testsuite/ld-cris/v10-v32.d
index d692926..0c41946 100644
--- a/ld/testsuite/ld-cris/v10-v32.d
+++ b/ld/testsuite/ld-cris/v10-v32.d
@@ -1,7 +1,7 @@
# notarget: cris*-*-linux-gnu
# source: start1.s --march=v32
# source: move-1.s --march=v0_v10
-# as: --em=criself
+# as: --emulation=criself
# ld: -m criself
# error: contains non-CRIS-v32 code
diff --git a/ld/testsuite/ld-cris/v10-va.d b/ld/testsuite/ld-cris/v10-va.d
index c6db037..f5288bb 100644
--- a/ld/testsuite/ld-cris/v10-va.d
+++ b/ld/testsuite/ld-cris/v10-va.d
@@ -1,7 +1,7 @@
# notarget: cris*-*-linux-gnu
# source: start1.s --march=common_v10_v32
# source: move-1.s --march=v0_v10
-# as: --em=criself
+# as: --emulation=criself
# ld: -m criself
# objdump: -p
diff --git a/ld/testsuite/ld-cris/v32-ba-1.d b/ld/testsuite/ld-cris/v32-ba-1.d
index b4ce78d..24c9ed8 100644
--- a/ld/testsuite/ld-cris/v32-ba-1.d
+++ b/ld/testsuite/ld-cris/v32-ba-1.d
@@ -1,5 +1,5 @@
# notarget: cris*-*-linux-gnu
-# as: --march=v32 --em=criself
+# as: --march=v32 --emulation=criself
# ld: -m criself
# objdump: -d
diff --git a/ld/testsuite/ld-cris/v32-bin-1.d b/ld/testsuite/ld-cris/v32-bin-1.d
index 3a8714b..3eb94b7 100644
--- a/ld/testsuite/ld-cris/v32-bin-1.d
+++ b/ld/testsuite/ld-cris/v32-bin-1.d
@@ -1,5 +1,5 @@
#notarget: cris*-*-linux-gnu
-#as: --em=criself --march=v32
+#as: --emulation=criself --march=v32
#ld: -m criself --oformat binary --defsym ext1=0x4000 --defsym ext2=0x6000
#objdump: -s -b binary
diff --git a/ld/testsuite/ld-cris/v32-v10.d b/ld/testsuite/ld-cris/v32-v10.d
index a96120f..23995b2 100644
--- a/ld/testsuite/ld-cris/v32-v10.d
+++ b/ld/testsuite/ld-cris/v32-v10.d
@@ -1,7 +1,7 @@
# notarget: cris*-*-linux-gnu
# source: start1.s --march=v0_v10
# source: move-1.s --march=v32
-# as: --em=criself
+# as: --emulation=criself
# ld: -m criself
# error: contains CRIS v32 code
diff --git a/ld/testsuite/ld-cris/v32-va.d b/ld/testsuite/ld-cris/v32-va.d
index 526d3c3..28d1c9e 100644
--- a/ld/testsuite/ld-cris/v32-va.d
+++ b/ld/testsuite/ld-cris/v32-va.d
@@ -1,7 +1,7 @@
# notarget: cris*-*-linux-gnu
# source: start1.s --march=common_v10_v32
# source: move-1.s --march=v32
-# as: --em=criself
+# as: --emulation=criself
# ld: -m criself
# objdump: -p
diff --git a/ld/testsuite/ld-cris/va-v10.d b/ld/testsuite/ld-cris/va-v10.d
index d6bda58..94579f3 100644
--- a/ld/testsuite/ld-cris/va-v10.d
+++ b/ld/testsuite/ld-cris/va-v10.d
@@ -1,7 +1,7 @@
# notarget: cris*-*-linux-gnu
# source: start1.s --march=v0_v10
# source: move-1.s --march=common_v10_v32
-# as: --em=criself
+# as: --emulation=criself
# ld: -m criself
# objdump: -p
diff --git a/ld/testsuite/ld-cris/va-v32.d b/ld/testsuite/ld-cris/va-v32.d
index b598ff5..8c16b05 100644
--- a/ld/testsuite/ld-cris/va-v32.d
+++ b/ld/testsuite/ld-cris/va-v32.d
@@ -1,7 +1,7 @@
# notarget: cris*-*-linux-gnu
# source: start1.s --march=v32
# source: move-1.s --march=common_v10_v32
-# as: --em=criself
+# as: --emulation=criself
# ld: -m criself
# objdump: -p
diff --git a/ld/testsuite/ld-cris/warn1.d b/ld/testsuite/ld-cris/warn1.d
index ecdf19e..7ba9225 100644
--- a/ld/testsuite/ld-cris/warn1.d
+++ b/ld/testsuite/ld-cris/warn1.d
@@ -2,7 +2,7 @@
#source: globsym1ref.s
#source: globsymw1.s
#target: cris-*-*elf* cris-*-*aout*
-#as: --em=crisaout
+#as: --emulation=crisaout
#ld: -mcrisaout
#objdump: -p
# There should be no warning, since the symbol warned about is
diff --git a/ld/testsuite/ld-cris/warn2.d b/ld/testsuite/ld-cris/warn2.d
index 96f089e..dd48f8c 100644
--- a/ld/testsuite/ld-cris/warn2.d
+++ b/ld/testsuite/ld-cris/warn2.d
@@ -2,7 +2,7 @@
#source: globsym1ref.s
#source: globsymw1.s
#target: cris-*-*elf* cris-*-*aout*
-#as: --em=criself
+#as: --emulation=criself
#ld: -mcriself
#objdump: -p
# There should be no warning, since the symbol warned about is
diff --git a/ld/testsuite/ld-cris/warn3.d b/ld/testsuite/ld-cris/warn3.d
index 8cd1435..3f87fcc 100644
--- a/ld/testsuite/ld-cris/warn3.d
+++ b/ld/testsuite/ld-cris/warn3.d
@@ -2,7 +2,7 @@
#source: globsym1ref.s
#source: globsymw2.s
#target: cris-*-*elf* cris-*-*aout*
-#as: --em=crisaout
+#as: --emulation=crisaout
#ld: -mcrisaout
#warning: warning: isatty is not implemented, will always fail$
#objdump: -p
diff --git a/ld/testsuite/ld-cris/warn4.d b/ld/testsuite/ld-cris/warn4.d
index dc096b6..cc1ebb5 100644
--- a/ld/testsuite/ld-cris/warn4.d
+++ b/ld/testsuite/ld-cris/warn4.d
@@ -2,7 +2,7 @@
#source: globsym1ref.s
#source: globsymw2.s
#target: cris-*-*elf* cris-*-*aout*
-#as: --em=criself
+#as: --emulation=criself
#ld: -mcriself
#warning: warning: isatty is not implemented and will always fail$
#objdump: -p
diff --git a/ld/testsuite/ld-cris/weakhiddso.d b/ld/testsuite/ld-cris/weakhiddso.d
index f4776d6..41d21a7 100644
--- a/ld/testsuite/ld-cris/weakhiddso.d
+++ b/ld/testsuite/ld-cris/weakhiddso.d
@@ -1,5 +1,5 @@
#source: weakhid.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: --shared -m crislinux -z nocombreloc --hash-style=sysv
#objdump: -s -R -T
diff --git a/ld/testsuite/ld-cris/weakref1.d b/ld/testsuite/ld-cris/weakref1.d
index 6dab5e4..53697e2 100644
--- a/ld/testsuite/ld-cris/weakref1.d
+++ b/ld/testsuite/ld-cris/weakref1.d
@@ -1,5 +1,5 @@
#source: gotrel2.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: -m crislinux tmpdir/libdso-1.so
#objdump: -R
diff --git a/ld/testsuite/ld-cris/weakref2.d b/ld/testsuite/ld-cris/weakref2.d
index fa9689b..00ac443 100644
--- a/ld/testsuite/ld-cris/weakref2.d
+++ b/ld/testsuite/ld-cris/weakref2.d
@@ -1,5 +1,5 @@
#source: gotrel2.s
-#as: --pic --no-underscore --em=criself
+#as: --pic --no-underscore --emulation=criself
#ld: -m crislinux tmpdir/libdso-1.so --hash-style=sysv
#objdump: -s -j .got
diff --git a/ld/testsuite/ld-cris/weakref3.d b/ld/testsuite/ld-cris/weakref3.d
index 46ac80c..a4a55b4 100644
--- a/ld/testsuite/ld-cris/weakref3.d
+++ b/ld/testsuite/ld-cris/weakref3.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: expdref3.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --hash-style=sysv
#ld_after_inputfiles: tmpdir/libdso-15.so
#readelf: -a -x 10
diff --git a/ld/testsuite/ld-cris/weakref4.d b/ld/testsuite/ld-cris/weakref4.d
index 520191f..9012bdc 100644
--- a/ld/testsuite/ld-cris/weakref4.d
+++ b/ld/testsuite/ld-cris/weakref4.d
@@ -1,6 +1,6 @@
#source: start1.s
#source: expdref4.s
-#as: --no-underscore --em=criself
+#as: --no-underscore --emulation=criself
#ld: -m crislinux --hash-style=sysv
#ld_after_inputfiles: tmpdir/libdso-15.so
#readelf: -a -x 11
diff --git a/ld/testsuite/ld-elf/tbss4.d b/ld/testsuite/ld-elf/tbss4.d
new file mode 100644
index 0000000..336ed8f
--- /dev/null
+++ b/ld/testsuite/ld-elf/tbss4.d
@@ -0,0 +1,13 @@
+#ld: -e _start -Ttext=0x1000 -z max-page-size=0x1000 -z common-page-size=0x1000 -z noseparate-code
+#readelf: -lSW
+#target: *-linux* *-gnu*
+#notarget: hppa64-*-* ia64-*-*
+
+#...
+.* \.tbss +NOBITS +0+1014 +0+1014 +0+4 +0+ +WAT +0 +0 +4
+
+#...
+ +TLS +0x0*1014 +0x0+1014 +0x0+1014 +0x0+ +0x0+4 R +0x4
+#...
+.* \.tbss
+#pass
diff --git a/ld/testsuite/ld-elf/tbss4.s b/ld/testsuite/ld-elf/tbss4.s
new file mode 100644
index 0000000..f49491e
--- /dev/null
+++ b/ld/testsuite/ld-elf/tbss4.s
@@ -0,0 +1,25 @@
+# Writeable gcc_except_table is required in order to put this section after
+# the DATA_SEGMENT_ALIGN directive in the default linker script (and hence
+# in the same PT_LOAD as the PT_TLS segment, and hence so that the
+# gcc_except_table can affect the .tbss section location).
+ .section .gcc_except_table,"aw",%progbits
+# Alignment is needed -- otherwise gcc_except_table start position seems to
+# be adjusted so that the tbss section is fully aligned.
+ .balign 4
+ .ascii "Odd number of chars"
+
+ .section .tbss,"awT",%nobits
+ .balign 4
+ .type xyz, %object
+ .size xyz, 4
+xyz:
+ .zero 4
+
+ .data
+dataval:
+ .balign 4
+ .ascii "x"
+
+ .text
+ .global _start
+_start:
diff --git a/ld/testsuite/ld-elfvers/vers7.c b/ld/testsuite/ld-elfvers/vers7.c
index 54316c9..a4fb254 100644
--- a/ld/testsuite/ld-elfvers/vers7.c
+++ b/ld/testsuite/ld-elfvers/vers7.c
@@ -2,8 +2,8 @@
* Test program that goes with test7.so
*/
-extern int hide_a();
-extern int show_b();
+extern int hide_a(int e);
+extern int show_b(int e);
int
main()
diff --git a/ld/testsuite/ld-loongarch-elf/32_pcrel.s b/ld/testsuite/ld-loongarch-elf/32_pcrel.s
new file mode 100644
index 0000000..3ef16de
--- /dev/null
+++ b/ld/testsuite/ld-loongarch-elf/32_pcrel.s
@@ -0,0 +1,6 @@
+ .section sx,"a"
+x:
+ nop
+
+ .section sy,"a"
+ .4byte x-.
diff --git a/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp b/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp
index 0295be8..2f09a69 100644
--- a/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp
+++ b/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp
@@ -200,6 +200,8 @@ if [istarget "loongarch64-*-*"] {
run_dump_test "bad_pcrel20_s2_global"
run_dump_test "bad_pcrel20_s2_weak"
run_dump_test "weak-undef-hidden-shared"
+ run_dump_test "overflow_32_pcrel"
+ run_dump_test "underflow_32_pcrel"
}
if [check_pie_support] {
diff --git a/ld/testsuite/ld-loongarch-elf/overflow_32_pcrel.d b/ld/testsuite/ld-loongarch-elf/overflow_32_pcrel.d
new file mode 100644
index 0000000..154dac9
--- /dev/null
+++ b/ld/testsuite/ld-loongarch-elf/overflow_32_pcrel.d
@@ -0,0 +1,4 @@
+#source: 32_pcrel.s
+#as: -mthin-add-sub
+#ld: -shared --section-start=sx=0x80001000 --section-start=sy=0x1000
+#error: .*relocation truncated to fit: R_LARCH_32_PCREL against `x'
diff --git a/ld/testsuite/ld-loongarch-elf/underflow_32_pcrel.d b/ld/testsuite/ld-loongarch-elf/underflow_32_pcrel.d
new file mode 100644
index 0000000..a5396bc
--- /dev/null
+++ b/ld/testsuite/ld-loongarch-elf/underflow_32_pcrel.d
@@ -0,0 +1,4 @@
+#source: 32_pcrel.s
+#as: -mthin-add-sub
+#ld: -shared --section-start=sx=0x1000 --section-start=sy=0x80001001
+#error: .*relocation truncated to fit: R_LARCH_32_PCREL against `x'
diff --git a/ld/testsuite/ld-mips-elf/micromips-hilo-n32.d b/ld/testsuite/ld-mips-elf/micromips-hilo-n32.d
new file mode 100644
index 0000000..1cb3d87
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/micromips-hilo-n32.d
@@ -0,0 +1,8 @@
+#name: R_MICROMIPS_HI16 and R_MICROMIPS_LO16 relocs n32
+#source: ../../../gas/testsuite/gas/mips/mips-hilo.s
+#source: mips-hilo.s
+#as: -mmicromips -march=mips64r2
+#objdump: -d
+#ld: -Tmips-hilo.ld -e 0x500000 -N
+#notarget: mips*el-ps2-elf*
+#dump: micromips-hilo.d
diff --git a/ld/testsuite/ld-mips-elf/micromips-hilo-n64.d b/ld/testsuite/ld-mips-elf/micromips-hilo-n64.d
new file mode 100644
index 0000000..1243e91
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/micromips-hilo-n64.d
@@ -0,0 +1,662 @@
+#name: R_MICROMIPS_HI16 and R_MICROMIPS_LO16 relocs n64
+#source: ../../../gas/testsuite/gas/mips/mips-hilo-n64.s
+#source: mips-hilo.s
+#as: -mmicromips -march=mips64r2
+#objdump: -d
+#ld: -Tmips-hilo.ld -e 0x500000 -N
+#notarget: mips*el-ps2-elf*
+
+.*: file format (:?elf.*mips.*|srec)
+
+Disassembly of section \.(:?text|sec1):
+
+0*500000 <[^>]*>:
+ *500000: 41a1 0000 lui at,0x0
+ *500004: 41a4 0000 lui a0,0x0
+ *500008: 3021 0000 addiu at,at,0
+ *50000c: 3084 0000 addiu a0,a0,0
+ *500010: 5821 0008 dsll32 at,at,0x0
+ *500014: 5824 2150 daddu a0,a0,at
+ *500018: 41a1 0000 lui at,0x0
+ *50001c: 41a4 0065 lui a0,0x65
+ *500020: 3021 0000 addiu at,at,0
+ *500024: 3084 4320 addiu a0,a0,17184
+ *500028: 5821 0008 dsll32 at,at,0x0
+ *50002c: 5824 2150 daddu a0,a0,at
+ *500030: 41a1 0000 lui at,0x0
+ *500034: 41a4 0065 lui a0,0x65
+ *500038: 3021 0000 addiu at,at,0
+ *50003c: 3084 4324 addiu a0,a0,17188
+ *500040: 5821 0008 dsll32 at,at,0x0
+ *500044: 5824 2150 daddu a0,a0,at
+ *500048: 41a1 0000 lui at,0x0
+ *50004c: 41a4 0065 lui a0,0x65
+ *500050: 3021 0000 addiu at,at,0
+ *500054: 3084 4330 addiu a0,a0,17200
+ *500058: 5821 0008 dsll32 at,at,0x0
+ *50005c: 5824 2150 daddu a0,a0,at
+ *500060: 41a1 0000 lui at,0x0
+ *500064: 41a4 0065 lui a0,0x65
+ *500068: 3021 0000 addiu at,at,0
+ *50006c: 3084 4720 addiu a0,a0,18208
+ *500070: 5821 0008 dsll32 at,at,0x0
+ *500074: 5824 2150 daddu a0,a0,at
+ *500078: 41a1 0000 lui at,0x0
+ *50007c: 41a4 0076 lui a0,0x76
+ *500080: 3021 0000 addiu at,at,0
+ *500084: 3084 5820 addiu a0,a0,22560
+ *500088: 5821 0008 dsll32 at,at,0x0
+ *50008c: 5824 2150 daddu a0,a0,at
+ *500090: 41a1 0000 lui at,0x0
+ *500094: 41a4 0076 lui a0,0x76
+ *500098: 3021 0000 addiu at,at,0
+ *50009c: 3084 5c08 addiu a0,a0,23560
+ *5000a0: 5821 0008 dsll32 at,at,0x0
+ *5000a4: 5824 2150 daddu a0,a0,at
+ *5000a8: 41a1 0000 lui at,0x0
+ *5000ac: 41a4 0076 lui a0,0x76
+ *5000b0: 3021 0000 addiu at,at,0
+ *5000b4: 3084 5430 addiu a0,a0,21552
+ *5000b8: 5821 0008 dsll32 at,at,0x0
+ *5000bc: 5824 2150 daddu a0,a0,at
+ *5000c0: 41a1 0000 lui at,0x0
+ *5000c4: 41a4 0076 lui a0,0x76
+ *5000c8: 3021 0000 addiu at,at,0
+ *5000cc: 3084 5c09 addiu a0,a0,23561
+ *5000d0: 5821 0008 dsll32 at,at,0x0
+ *5000d4: 5824 2150 daddu a0,a0,at
+ *5000d8: 41a1 0000 lui at,0x0
+ *5000dc: 41a4 0000 lui a0,0x0
+ *5000e0: 3021 0000 addiu at,at,0
+ *5000e4: 3084 0001 addiu a0,a0,1
+ *5000e8: 5821 0008 dsll32 at,at,0x0
+ *5000ec: 5824 2150 daddu a0,a0,at
+ *5000f0: 41a1 0000 lui at,0x0
+ *5000f4: 41a4 0065 lui a0,0x65
+ *5000f8: 3021 0000 addiu at,at,0
+ *5000fc: 3084 4321 addiu a0,a0,17185
+ *500100: 5821 0008 dsll32 at,at,0x0
+ *500104: 5824 2150 daddu a0,a0,at
+ *500108: 41a1 0000 lui at,0x0
+ *50010c: 41a4 0065 lui a0,0x65
+ *500110: 3021 0000 addiu at,at,0
+ *500114: 3084 4325 addiu a0,a0,17189
+ *500118: 5821 0008 dsll32 at,at,0x0
+ *50011c: 5824 2150 daddu a0,a0,at
+ *500120: 41a1 0000 lui at,0x0
+ *500124: 41a4 0065 lui a0,0x65
+ *500128: 3021 0000 addiu at,at,0
+ *50012c: 3084 4331 addiu a0,a0,17201
+ *500130: 5821 0008 dsll32 at,at,0x0
+ *500134: 5824 2150 daddu a0,a0,at
+ *500138: 41a1 0000 lui at,0x0
+ *50013c: 41a4 0065 lui a0,0x65
+ *500140: 3021 0000 addiu at,at,0
+ *500144: 3084 4721 addiu a0,a0,18209
+ *500148: 5821 0008 dsll32 at,at,0x0
+ *50014c: 5824 2150 daddu a0,a0,at
+ *500150: 41a1 0000 lui at,0x0
+ *500154: 41a4 0076 lui a0,0x76
+ *500158: 3021 0000 addiu at,at,0
+ *50015c: 3084 5821 addiu a0,a0,22561
+ *500160: 5821 0008 dsll32 at,at,0x0
+ *500164: 5824 2150 daddu a0,a0,at
+ *500168: 41a1 0000 lui at,0x0
+ *50016c: 41a4 0076 lui a0,0x76
+ *500170: 3021 0000 addiu at,at,0
+ *500174: 3084 5c09 addiu a0,a0,23561
+ *500178: 5821 0008 dsll32 at,at,0x0
+ *50017c: 5824 2150 daddu a0,a0,at
+ *500180: 41a1 0000 lui at,0x0
+ *500184: 41a4 0076 lui a0,0x76
+ *500188: 3021 0000 addiu at,at,0
+ *50018c: 3084 5431 addiu a0,a0,21553
+ *500190: 5821 0008 dsll32 at,at,0x0
+ *500194: 5824 2150 daddu a0,a0,at
+ *500198: 41a1 0000 lui at,0x0
+ *50019c: 41a4 0076 lui a0,0x76
+ *5001a0: 3021 0000 addiu at,at,0
+ *5001a4: 3084 5c0a addiu a0,a0,23562
+ *5001a8: 5821 0008 dsll32 at,at,0x0
+ *5001ac: 5824 2150 daddu a0,a0,at
+ *5001b0: 41a1 0001 lui at,0x1
+ *5001b4: 41a4 8001 lui a0,0x8001
+ *5001b8: 3021 8001 addiu at,at,-32767
+ *5001bc: 3084 8000 addiu a0,a0,-32768
+ *5001c0: 5821 0008 dsll32 at,at,0x0
+ *5001c4: 5824 2150 daddu a0,a0,at
+ *5001c8: 41a1 0001 lui at,0x1
+ *5001cc: 41a4 8066 lui a0,0x8066
+ *5001d0: 3021 8001 addiu at,at,-32767
+ *5001d4: 3084 c320 addiu a0,a0,-15584
+ *5001d8: 5821 0008 dsll32 at,at,0x0
+ *5001dc: 5824 2150 daddu a0,a0,at
+ *5001e0: 41a1 0001 lui at,0x1
+ *5001e4: 41a4 8066 lui a0,0x8066
+ *5001e8: 3021 8001 addiu at,at,-32767
+ *5001ec: 3084 c324 addiu a0,a0,-15580
+ *5001f0: 5821 0008 dsll32 at,at,0x0
+ *5001f4: 5824 2150 daddu a0,a0,at
+ *5001f8: 41a1 0001 lui at,0x1
+ *5001fc: 41a4 8066 lui a0,0x8066
+ *500200: 3021 8001 addiu at,at,-32767
+ *500204: 3084 c330 addiu a0,a0,-15568
+ *500208: 5821 0008 dsll32 at,at,0x0
+ *50020c: 5824 2150 daddu a0,a0,at
+ *500210: 41a1 0001 lui at,0x1
+ *500214: 41a4 8066 lui a0,0x8066
+ *500218: 3021 8001 addiu at,at,-32767
+ *50021c: 3084 c720 addiu a0,a0,-14560
+ *500220: 5821 0008 dsll32 at,at,0x0
+ *500224: 5824 2150 daddu a0,a0,at
+ *500228: 41a1 0001 lui at,0x1
+ *50022c: 41a4 8077 lui a0,0x8077
+ *500230: 3021 8001 addiu at,at,-32767
+ *500234: 3084 d820 addiu a0,a0,-10208
+ *500238: 5821 0008 dsll32 at,at,0x0
+ *50023c: 5824 2150 daddu a0,a0,at
+ *500240: 41a1 0001 lui at,0x1
+ *500244: 41a4 8077 lui a0,0x8077
+ *500248: 3021 8001 addiu at,at,-32767
+ *50024c: 3084 dc08 addiu a0,a0,-9208
+ *500250: 5821 0008 dsll32 at,at,0x0
+ *500254: 5824 2150 daddu a0,a0,at
+ *500258: 41a1 0001 lui at,0x1
+ *50025c: 41a4 8077 lui a0,0x8077
+ *500260: 3021 8001 addiu at,at,-32767
+ *500264: 3084 d430 addiu a0,a0,-11216
+ *500268: 5821 0008 dsll32 at,at,0x0
+ *50026c: 5824 2150 daddu a0,a0,at
+ *500270: 41a1 0001 lui at,0x1
+ *500274: 41a4 8077 lui a0,0x8077
+ *500278: 3021 8001 addiu at,at,-32767
+ *50027c: 3084 dc09 addiu a0,a0,-9207
+ *500280: 5821 0008 dsll32 at,at,0x0
+ *500284: 5824 2150 daddu a0,a0,at
+ *500288: 41a1 0000 lui at,0x0
+ *50028c: 41a4 8000 lui a0,0x8000
+ *500290: 3021 8000 addiu at,at,-32768
+ *500294: 3084 8000 addiu a0,a0,-32768
+ *500298: 5821 0008 dsll32 at,at,0x0
+ *50029c: 5824 2150 daddu a0,a0,at
+ *5002a0: 41a1 0000 lui at,0x0
+ *5002a4: 41a4 8065 lui a0,0x8065
+ *5002a8: 3021 8000 addiu at,at,-32768
+ *5002ac: 3084 c320 addiu a0,a0,-15584
+ *5002b0: 5821 0008 dsll32 at,at,0x0
+ *5002b4: 5824 2150 daddu a0,a0,at
+ *5002b8: 41a1 0000 lui at,0x0
+ *5002bc: 41a4 8065 lui a0,0x8065
+ *5002c0: 3021 8000 addiu at,at,-32768
+ *5002c4: 3084 c324 addiu a0,a0,-15580
+ *5002c8: 5821 0008 dsll32 at,at,0x0
+ *5002cc: 5824 2150 daddu a0,a0,at
+ *5002d0: 41a1 0000 lui at,0x0
+ *5002d4: 41a4 8065 lui a0,0x8065
+ *5002d8: 3021 8000 addiu at,at,-32768
+ *5002dc: 3084 c330 addiu a0,a0,-15568
+ *5002e0: 5821 0008 dsll32 at,at,0x0
+ *5002e4: 5824 2150 daddu a0,a0,at
+ *5002e8: 41a1 0000 lui at,0x0
+ *5002ec: 41a4 8065 lui a0,0x8065
+ *5002f0: 3021 8000 addiu at,at,-32768
+ *5002f4: 3084 c720 addiu a0,a0,-14560
+ *5002f8: 5821 0008 dsll32 at,at,0x0
+ *5002fc: 5824 2150 daddu a0,a0,at
+ *500300: 41a1 0000 lui at,0x0
+ *500304: 41a4 8076 lui a0,0x8076
+ *500308: 3021 8000 addiu at,at,-32768
+ *50030c: 3084 d820 addiu a0,a0,-10208
+ *500310: 5821 0008 dsll32 at,at,0x0
+ *500314: 5824 2150 daddu a0,a0,at
+ *500318: 41a1 0000 lui at,0x0
+ *50031c: 41a4 8076 lui a0,0x8076
+ *500320: 3021 8000 addiu at,at,-32768
+ *500324: 3084 dc08 addiu a0,a0,-9208
+ *500328: 5821 0008 dsll32 at,at,0x0
+ *50032c: 5824 2150 daddu a0,a0,at
+ *500330: 41a1 0000 lui at,0x0
+ *500334: 41a4 8076 lui a0,0x8076
+ *500338: 3021 8000 addiu at,at,-32768
+ *50033c: 3084 d430 addiu a0,a0,-11216
+ *500340: 5821 0008 dsll32 at,at,0x0
+ *500344: 5824 2150 daddu a0,a0,at
+ *500348: 41a1 0000 lui at,0x0
+ *50034c: 41a4 8076 lui a0,0x8076
+ *500350: 3021 8000 addiu at,at,-32768
+ *500354: 3084 dc09 addiu a0,a0,-9207
+ *500358: 5821 0008 dsll32 at,at,0x0
+ *50035c: 5824 2150 daddu a0,a0,at
+ *500360: 41a1 0001 lui at,0x1
+ *500364: 41a4 0001 lui a0,0x1
+ *500368: 3021 0001 addiu at,at,1
+ *50036c: 3084 0000 addiu a0,a0,0
+ *500370: 5821 0008 dsll32 at,at,0x0
+ *500374: 5824 2150 daddu a0,a0,at
+ *500378: 41a1 0001 lui at,0x1
+ *50037c: 41a4 0066 lui a0,0x66
+ *500380: 3021 0001 addiu at,at,1
+ *500384: 3084 4320 addiu a0,a0,17184
+ *500388: 5821 0008 dsll32 at,at,0x0
+ *50038c: 5824 2150 daddu a0,a0,at
+ *500390: 41a1 0001 lui at,0x1
+ *500394: 41a4 0066 lui a0,0x66
+ *500398: 3021 0001 addiu at,at,1
+ *50039c: 3084 4324 addiu a0,a0,17188
+ *5003a0: 5821 0008 dsll32 at,at,0x0
+ *5003a4: 5824 2150 daddu a0,a0,at
+ *5003a8: 41a1 0001 lui at,0x1
+ *5003ac: 41a4 0066 lui a0,0x66
+ *5003b0: 3021 0001 addiu at,at,1
+ *5003b4: 3084 4330 addiu a0,a0,17200
+ *5003b8: 5821 0008 dsll32 at,at,0x0
+ *5003bc: 5824 2150 daddu a0,a0,at
+ *5003c0: 41a1 0001 lui at,0x1
+ *5003c4: 41a4 0066 lui a0,0x66
+ *5003c8: 3021 0001 addiu at,at,1
+ *5003cc: 3084 4720 addiu a0,a0,18208
+ *5003d0: 5821 0008 dsll32 at,at,0x0
+ *5003d4: 5824 2150 daddu a0,a0,at
+ *5003d8: 41a1 0001 lui at,0x1
+ *5003dc: 41a4 0077 lui a0,0x77
+ *5003e0: 3021 0001 addiu at,at,1
+ *5003e4: 3084 5820 addiu a0,a0,22560
+ *5003e8: 5821 0008 dsll32 at,at,0x0
+ *5003ec: 5824 2150 daddu a0,a0,at
+ *5003f0: 41a1 0001 lui at,0x1
+ *5003f4: 41a4 0077 lui a0,0x77
+ *5003f8: 3021 0001 addiu at,at,1
+ *5003fc: 3084 5c08 addiu a0,a0,23560
+ *500400: 5821 0008 dsll32 at,at,0x0
+ *500404: 5824 2150 daddu a0,a0,at
+ *500408: 41a1 0001 lui at,0x1
+ *50040c: 41a4 0077 lui a0,0x77
+ *500410: 3021 0001 addiu at,at,1
+ *500414: 3084 5430 addiu a0,a0,21552
+ *500418: 5821 0008 dsll32 at,at,0x0
+ *50041c: 5824 2150 daddu a0,a0,at
+ *500420: 41a1 0001 lui at,0x1
+ *500424: 41a4 0077 lui a0,0x77
+ *500428: 3021 0001 addiu at,at,1
+ *50042c: 3084 5c09 addiu a0,a0,23561
+ *500430: 5821 0008 dsll32 at,at,0x0
+ *500434: 5824 2150 daddu a0,a0,at
+ *500438: 41a1 0002 lui at,0x2
+ *50043c: 41a4 0002 lui a0,0x2
+ *500440: 3021 a5a5 addiu at,at,-23131
+ *500444: 3084 a5a5 addiu a0,a0,-23131
+ *500448: 5821 0008 dsll32 at,at,0x0
+ *50044c: 5824 2150 daddu a0,a0,at
+ *500450: 41a1 0002 lui at,0x2
+ *500454: 41a4 0067 lui a0,0x67
+ *500458: 3021 a5a5 addiu at,at,-23131
+ *50045c: 3084 e8c5 addiu a0,a0,-5947
+ *500460: 5821 0008 dsll32 at,at,0x0
+ *500464: 5824 2150 daddu a0,a0,at
+ *500468: 41a1 0002 lui at,0x2
+ *50046c: 41a4 0067 lui a0,0x67
+ *500470: 3021 a5a5 addiu at,at,-23131
+ *500474: 3084 e8c9 addiu a0,a0,-5943
+ *500478: 5821 0008 dsll32 at,at,0x0
+ *50047c: 5824 2150 daddu a0,a0,at
+ *500480: 41a1 0002 lui at,0x2
+ *500484: 41a4 0067 lui a0,0x67
+ *500488: 3021 a5a5 addiu at,at,-23131
+ *50048c: 3084 e8d5 addiu a0,a0,-5931
+ *500490: 5821 0008 dsll32 at,at,0x0
+ *500494: 5824 2150 daddu a0,a0,at
+ *500498: 41a1 0002 lui at,0x2
+ *50049c: 41a4 0067 lui a0,0x67
+ *5004a0: 3021 a5a5 addiu at,at,-23131
+ *5004a4: 3084 ecc5 addiu a0,a0,-4923
+ *5004a8: 5821 0008 dsll32 at,at,0x0
+ *5004ac: 5824 2150 daddu a0,a0,at
+ *5004b0: 41a1 0002 lui at,0x2
+ *5004b4: 41a4 0078 lui a0,0x78
+ *5004b8: 3021 a5a5 addiu at,at,-23131
+ *5004bc: 3084 fdc5 addiu a0,a0,-571
+ *5004c0: 5821 0008 dsll32 at,at,0x0
+ *5004c4: 5824 2150 daddu a0,a0,at
+ *5004c8: 41a1 0002 lui at,0x2
+ *5004cc: 41a4 0078 lui a0,0x78
+ *5004d0: 3021 a5a5 addiu at,at,-23131
+ *5004d4: 3084 01ad addiu a0,a0,429
+ *5004d8: 5821 0008 dsll32 at,at,0x0
+ *5004dc: 5824 2150 daddu a0,a0,at
+ *5004e0: 41a1 0002 lui at,0x2
+ *5004e4: 41a4 0078 lui a0,0x78
+ *5004e8: 3021 a5a5 addiu at,at,-23131
+ *5004ec: 3084 f9d5 addiu a0,a0,-1579
+ *5004f0: 5821 0008 dsll32 at,at,0x0
+ *5004f4: 5824 2150 daddu a0,a0,at
+ *5004f8: 41a1 0002 lui at,0x2
+ *5004fc: 41a4 0078 lui a0,0x78
+ *500500: 3021 a5a5 addiu at,at,-23131
+ *500504: 3084 01ae addiu a0,a0,430
+ *500508: 5821 0008 dsll32 at,at,0x0
+ *50050c: 5824 2150 daddu a0,a0,at
+ *500510: 41a1 0000 lui at,0x0
+ *500514: 41a5 0000 lui a1,0x0
+ *500518: 3021 0000 addiu at,at,0
+ *50051c: 5821 0008 dsll32 at,at,0x0
+ *500520: 5825 2950 daddu a1,a1,at
+ *500524: fc85 0000 lw a0,0\(a1\)
+ *500528: 41a1 0000 lui at,0x0
+ *50052c: 41a5 0065 lui a1,0x65
+ *500530: 3021 0000 addiu at,at,0
+ *500534: 5821 0008 dsll32 at,at,0x0
+ *500538: 5825 2950 daddu a1,a1,at
+ *50053c: fc85 4320 lw a0,17184\(a1\)
+ *500540: 41a1 0000 lui at,0x0
+ *500544: 41a5 0065 lui a1,0x65
+ *500548: 3021 0000 addiu at,at,0
+ *50054c: 5821 0008 dsll32 at,at,0x0
+ *500550: 5825 2950 daddu a1,a1,at
+ *500554: fc85 4324 lw a0,17188\(a1\)
+ *500558: 41a1 0000 lui at,0x0
+ *50055c: 41a5 0065 lui a1,0x65
+ *500560: 3021 0000 addiu at,at,0
+ *500564: 5821 0008 dsll32 at,at,0x0
+ *500568: 5825 2950 daddu a1,a1,at
+ *50056c: fc85 4330 lw a0,17200\(a1\)
+ *500570: 41a1 0000 lui at,0x0
+ *500574: 41a5 0065 lui a1,0x65
+ *500578: 3021 0000 addiu at,at,0
+ *50057c: 5821 0008 dsll32 at,at,0x0
+ *500580: 5825 2950 daddu a1,a1,at
+ *500584: fc85 4720 lw a0,18208\(a1\)
+ *500588: 41a1 0000 lui at,0x0
+ *50058c: 41a5 0076 lui a1,0x76
+ *500590: 3021 0000 addiu at,at,0
+ *500594: 5821 0008 dsll32 at,at,0x0
+ *500598: 5825 2950 daddu a1,a1,at
+ *50059c: fc85 5820 lw a0,22560\(a1\)
+ *5005a0: 41a1 0000 lui at,0x0
+ *5005a4: 41a5 0076 lui a1,0x76
+ *5005a8: 3021 0000 addiu at,at,0
+ *5005ac: 5821 0008 dsll32 at,at,0x0
+ *5005b0: 5825 2950 daddu a1,a1,at
+ *5005b4: fc85 5c08 lw a0,23560\(a1\)
+ *5005b8: 41a1 0000 lui at,0x0
+ *5005bc: 41a5 0076 lui a1,0x76
+ *5005c0: 3021 0000 addiu at,at,0
+ *5005c4: 5821 0008 dsll32 at,at,0x0
+ *5005c8: 5825 2950 daddu a1,a1,at
+ *5005cc: fc85 5430 lw a0,21552\(a1\)
+ *5005d0: 41a1 0000 lui at,0x0
+ *5005d4: 41a5 0076 lui a1,0x76
+ *5005d8: 3021 0000 addiu at,at,0
+ *5005dc: 5821 0008 dsll32 at,at,0x0
+ *5005e0: 5825 2950 daddu a1,a1,at
+ *5005e4: fc85 5c09 lw a0,23561\(a1\)
+ *5005e8: 41a1 0000 lui at,0x0
+ *5005ec: 41a5 0000 lui a1,0x0
+ *5005f0: 3021 0000 addiu at,at,0
+ *5005f4: 5821 0008 dsll32 at,at,0x0
+ *5005f8: 5825 2950 daddu a1,a1,at
+ *5005fc: fc85 0001 lw a0,1\(a1\)
+ *500600: 41a1 0000 lui at,0x0
+ *500604: 41a5 0065 lui a1,0x65
+ *500608: 3021 0000 addiu at,at,0
+ *50060c: 5821 0008 dsll32 at,at,0x0
+ *500610: 5825 2950 daddu a1,a1,at
+ *500614: fc85 4321 lw a0,17185\(a1\)
+ *500618: 41a1 0000 lui at,0x0
+ *50061c: 41a5 0065 lui a1,0x65
+ *500620: 3021 0000 addiu at,at,0
+ *500624: 5821 0008 dsll32 at,at,0x0
+ *500628: 5825 2950 daddu a1,a1,at
+ *50062c: fc85 4325 lw a0,17189\(a1\)
+ *500630: 41a1 0000 lui at,0x0
+ *500634: 41a5 0065 lui a1,0x65
+ *500638: 3021 0000 addiu at,at,0
+ *50063c: 5821 0008 dsll32 at,at,0x0
+ *500640: 5825 2950 daddu a1,a1,at
+ *500644: fc85 4331 lw a0,17201\(a1\)
+ *500648: 41a1 0000 lui at,0x0
+ *50064c: 41a5 0065 lui a1,0x65
+ *500650: 3021 0000 addiu at,at,0
+ *500654: 5821 0008 dsll32 at,at,0x0
+ *500658: 5825 2950 daddu a1,a1,at
+ *50065c: fc85 4721 lw a0,18209\(a1\)
+ *500660: 41a1 0000 lui at,0x0
+ *500664: 41a5 0076 lui a1,0x76
+ *500668: 3021 0000 addiu at,at,0
+ *50066c: 5821 0008 dsll32 at,at,0x0
+ *500670: 5825 2950 daddu a1,a1,at
+ *500674: fc85 5821 lw a0,22561\(a1\)
+ *500678: 41a1 0000 lui at,0x0
+ *50067c: 41a5 0076 lui a1,0x76
+ *500680: 3021 0000 addiu at,at,0
+ *500684: 5821 0008 dsll32 at,at,0x0
+ *500688: 5825 2950 daddu a1,a1,at
+ *50068c: fc85 5c09 lw a0,23561\(a1\)
+ *500690: 41a1 0000 lui at,0x0
+ *500694: 41a5 0076 lui a1,0x76
+ *500698: 3021 0000 addiu at,at,0
+ *50069c: 5821 0008 dsll32 at,at,0x0
+ *5006a0: 5825 2950 daddu a1,a1,at
+ *5006a4: fc85 5431 lw a0,21553\(a1\)
+ *5006a8: 41a1 0000 lui at,0x0
+ *5006ac: 41a5 0076 lui a1,0x76
+ *5006b0: 3021 0000 addiu at,at,0
+ *5006b4: 5821 0008 dsll32 at,at,0x0
+ *5006b8: 5825 2950 daddu a1,a1,at
+ *5006bc: fc85 5c0a lw a0,23562\(a1\)
+ *5006c0: 41a1 0001 lui at,0x1
+ *5006c4: 41a5 8001 lui a1,0x8001
+ *5006c8: 3021 8001 addiu at,at,-32767
+ *5006cc: 5821 0008 dsll32 at,at,0x0
+ *5006d0: 5825 2950 daddu a1,a1,at
+ *5006d4: fc85 8000 lw a0,-32768\(a1\)
+ *5006d8: 41a1 0001 lui at,0x1
+ *5006dc: 41a5 8066 lui a1,0x8066
+ *5006e0: 3021 8001 addiu at,at,-32767
+ *5006e4: 5821 0008 dsll32 at,at,0x0
+ *5006e8: 5825 2950 daddu a1,a1,at
+ *5006ec: fc85 c320 lw a0,-15584\(a1\)
+ *5006f0: 41a1 0001 lui at,0x1
+ *5006f4: 41a5 8066 lui a1,0x8066
+ *5006f8: 3021 8001 addiu at,at,-32767
+ *5006fc: 5821 0008 dsll32 at,at,0x0
+ *500700: 5825 2950 daddu a1,a1,at
+ *500704: fc85 c324 lw a0,-15580\(a1\)
+ *500708: 41a1 0001 lui at,0x1
+ *50070c: 41a5 8066 lui a1,0x8066
+ *500710: 3021 8001 addiu at,at,-32767
+ *500714: 5821 0008 dsll32 at,at,0x0
+ *500718: 5825 2950 daddu a1,a1,at
+ *50071c: fc85 c330 lw a0,-15568\(a1\)
+ *500720: 41a1 0001 lui at,0x1
+ *500724: 41a5 8066 lui a1,0x8066
+ *500728: 3021 8001 addiu at,at,-32767
+ *50072c: 5821 0008 dsll32 at,at,0x0
+ *500730: 5825 2950 daddu a1,a1,at
+ *500734: fc85 c720 lw a0,-14560\(a1\)
+ *500738: 41a1 0001 lui at,0x1
+ *50073c: 41a5 8077 lui a1,0x8077
+ *500740: 3021 8001 addiu at,at,-32767
+ *500744: 5821 0008 dsll32 at,at,0x0
+ *500748: 5825 2950 daddu a1,a1,at
+ *50074c: fc85 d820 lw a0,-10208\(a1\)
+ *500750: 41a1 0001 lui at,0x1
+ *500754: 41a5 8077 lui a1,0x8077
+ *500758: 3021 8001 addiu at,at,-32767
+ *50075c: 5821 0008 dsll32 at,at,0x0
+ *500760: 5825 2950 daddu a1,a1,at
+ *500764: fc85 dc08 lw a0,-9208\(a1\)
+ *500768: 41a1 0001 lui at,0x1
+ *50076c: 41a5 8077 lui a1,0x8077
+ *500770: 3021 8001 addiu at,at,-32767
+ *500774: 5821 0008 dsll32 at,at,0x0
+ *500778: 5825 2950 daddu a1,a1,at
+ *50077c: fc85 d430 lw a0,-11216\(a1\)
+ *500780: 41a1 0001 lui at,0x1
+ *500784: 41a5 8077 lui a1,0x8077
+ *500788: 3021 8001 addiu at,at,-32767
+ *50078c: 5821 0008 dsll32 at,at,0x0
+ *500790: 5825 2950 daddu a1,a1,at
+ *500794: fc85 dc09 lw a0,-9207\(a1\)
+ *500798: 41a1 0000 lui at,0x0
+ *50079c: 41a5 8000 lui a1,0x8000
+ *5007a0: 3021 8000 addiu at,at,-32768
+ *5007a4: 5821 0008 dsll32 at,at,0x0
+ *5007a8: 5825 2950 daddu a1,a1,at
+ *5007ac: fc85 8000 lw a0,-32768\(a1\)
+ *5007b0: 41a1 0000 lui at,0x0
+ *5007b4: 41a5 8065 lui a1,0x8065
+ *5007b8: 3021 8000 addiu at,at,-32768
+ *5007bc: 5821 0008 dsll32 at,at,0x0
+ *5007c0: 5825 2950 daddu a1,a1,at
+ *5007c4: fc85 c320 lw a0,-15584\(a1\)
+ *5007c8: 41a1 0000 lui at,0x0
+ *5007cc: 41a5 8065 lui a1,0x8065
+ *5007d0: 3021 8000 addiu at,at,-32768
+ *5007d4: 5821 0008 dsll32 at,at,0x0
+ *5007d8: 5825 2950 daddu a1,a1,at
+ *5007dc: fc85 c324 lw a0,-15580\(a1\)
+ *5007e0: 41a1 0000 lui at,0x0
+ *5007e4: 41a5 8065 lui a1,0x8065
+ *5007e8: 3021 8000 addiu at,at,-32768
+ *5007ec: 5821 0008 dsll32 at,at,0x0
+ *5007f0: 5825 2950 daddu a1,a1,at
+ *5007f4: fc85 c330 lw a0,-15568\(a1\)
+ *5007f8: 41a1 0000 lui at,0x0
+ *5007fc: 41a5 8065 lui a1,0x8065
+ *500800: 3021 8000 addiu at,at,-32768
+ *500804: 5821 0008 dsll32 at,at,0x0
+ *500808: 5825 2950 daddu a1,a1,at
+ *50080c: fc85 c720 lw a0,-14560\(a1\)
+ *500810: 41a1 0000 lui at,0x0
+ *500814: 41a5 8076 lui a1,0x8076
+ *500818: 3021 8000 addiu at,at,-32768
+ *50081c: 5821 0008 dsll32 at,at,0x0
+ *500820: 5825 2950 daddu a1,a1,at
+ *500824: fc85 d820 lw a0,-10208\(a1\)
+ *500828: 41a1 0000 lui at,0x0
+ *50082c: 41a5 8076 lui a1,0x8076
+ *500830: 3021 8000 addiu at,at,-32768
+ *500834: 5821 0008 dsll32 at,at,0x0
+ *500838: 5825 2950 daddu a1,a1,at
+ *50083c: fc85 dc08 lw a0,-9208\(a1\)
+ *500840: 41a1 0000 lui at,0x0
+ *500844: 41a5 8076 lui a1,0x8076
+ *500848: 3021 8000 addiu at,at,-32768
+ *50084c: 5821 0008 dsll32 at,at,0x0
+ *500850: 5825 2950 daddu a1,a1,at
+ *500854: fc85 d430 lw a0,-11216\(a1\)
+ *500858: 41a1 0000 lui at,0x0
+ *50085c: 41a5 8076 lui a1,0x8076
+ *500860: 3021 8000 addiu at,at,-32768
+ *500864: 5821 0008 dsll32 at,at,0x0
+ *500868: 5825 2950 daddu a1,a1,at
+ *50086c: fc85 dc09 lw a0,-9207\(a1\)
+ *500870: 41a1 0001 lui at,0x1
+ *500874: 41a5 0001 lui a1,0x1
+ *500878: 3021 0001 addiu at,at,1
+ *50087c: 5821 0008 dsll32 at,at,0x0
+ *500880: 5825 2950 daddu a1,a1,at
+ *500884: fc85 0000 lw a0,0\(a1\)
+ *500888: 41a1 0001 lui at,0x1
+ *50088c: 41a5 0066 lui a1,0x66
+ *500890: 3021 0001 addiu at,at,1
+ *500894: 5821 0008 dsll32 at,at,0x0
+ *500898: 5825 2950 daddu a1,a1,at
+ *50089c: fc85 4320 lw a0,17184\(a1\)
+ *5008a0: 41a1 0001 lui at,0x1
+ *5008a4: 41a5 0066 lui a1,0x66
+ *5008a8: 3021 0001 addiu at,at,1
+ *5008ac: 5821 0008 dsll32 at,at,0x0
+ *5008b0: 5825 2950 daddu a1,a1,at
+ *5008b4: fc85 4324 lw a0,17188\(a1\)
+ *5008b8: 41a1 0001 lui at,0x1
+ *5008bc: 41a5 0066 lui a1,0x66
+ *5008c0: 3021 0001 addiu at,at,1
+ *5008c4: 5821 0008 dsll32 at,at,0x0
+ *5008c8: 5825 2950 daddu a1,a1,at
+ *5008cc: fc85 4330 lw a0,17200\(a1\)
+ *5008d0: 41a1 0001 lui at,0x1
+ *5008d4: 41a5 0066 lui a1,0x66
+ *5008d8: 3021 0001 addiu at,at,1
+ *5008dc: 5821 0008 dsll32 at,at,0x0
+ *5008e0: 5825 2950 daddu a1,a1,at
+ *5008e4: fc85 4720 lw a0,18208\(a1\)
+ *5008e8: 41a1 0001 lui at,0x1
+ *5008ec: 41a5 0077 lui a1,0x77
+ *5008f0: 3021 0001 addiu at,at,1
+ *5008f4: 5821 0008 dsll32 at,at,0x0
+ *5008f8: 5825 2950 daddu a1,a1,at
+ *5008fc: fc85 5820 lw a0,22560\(a1\)
+ *500900: 41a1 0001 lui at,0x1
+ *500904: 41a5 0077 lui a1,0x77
+ *500908: 3021 0001 addiu at,at,1
+ *50090c: 5821 0008 dsll32 at,at,0x0
+ *500910: 5825 2950 daddu a1,a1,at
+ *500914: fc85 5c08 lw a0,23560\(a1\)
+ *500918: 41a1 0001 lui at,0x1
+ *50091c: 41a5 0077 lui a1,0x77
+ *500920: 3021 0001 addiu at,at,1
+ *500924: 5821 0008 dsll32 at,at,0x0
+ *500928: 5825 2950 daddu a1,a1,at
+ *50092c: fc85 5430 lw a0,21552\(a1\)
+ *500930: 41a1 0001 lui at,0x1
+ *500934: 41a5 0077 lui a1,0x77
+ *500938: 3021 0001 addiu at,at,1
+ *50093c: 5821 0008 dsll32 at,at,0x0
+ *500940: 5825 2950 daddu a1,a1,at
+ *500944: fc85 5c09 lw a0,23561\(a1\)
+ *500948: 41a1 0002 lui at,0x2
+ *50094c: 41a5 0002 lui a1,0x2
+ *500950: 3021 a5a5 addiu at,at,-23131
+ *500954: 5821 0008 dsll32 at,at,0x0
+ *500958: 5825 2950 daddu a1,a1,at
+ *50095c: fc85 a5a5 lw a0,-23131\(a1\)
+ *500960: 41a1 0002 lui at,0x2
+ *500964: 41a5 0067 lui a1,0x67
+ *500968: 3021 a5a5 addiu at,at,-23131
+ *50096c: 5821 0008 dsll32 at,at,0x0
+ *500970: 5825 2950 daddu a1,a1,at
+ *500974: fc85 e8c5 lw a0,-5947\(a1\)
+ *500978: 41a1 0002 lui at,0x2
+ *50097c: 41a5 0067 lui a1,0x67
+ *500980: 3021 a5a5 addiu at,at,-23131
+ *500984: 5821 0008 dsll32 at,at,0x0
+ *500988: 5825 2950 daddu a1,a1,at
+ *50098c: fc85 e8c9 lw a0,-5943\(a1\)
+ *500990: 41a1 0002 lui at,0x2
+ *500994: 41a5 0067 lui a1,0x67
+ *500998: 3021 a5a5 addiu at,at,-23131
+ *50099c: 5821 0008 dsll32 at,at,0x0
+ *5009a0: 5825 2950 daddu a1,a1,at
+ *5009a4: fc85 e8d5 lw a0,-5931\(a1\)
+ *5009a8: 41a1 0002 lui at,0x2
+ *5009ac: 41a5 0067 lui a1,0x67
+ *5009b0: 3021 a5a5 addiu at,at,-23131
+ *5009b4: 5821 0008 dsll32 at,at,0x0
+ *5009b8: 5825 2950 daddu a1,a1,at
+ *5009bc: fc85 ecc5 lw a0,-4923\(a1\)
+ *5009c0: 41a1 0002 lui at,0x2
+ *5009c4: 41a5 0078 lui a1,0x78
+ *5009c8: 3021 a5a5 addiu at,at,-23131
+ *5009cc: 5821 0008 dsll32 at,at,0x0
+ *5009d0: 5825 2950 daddu a1,a1,at
+ *5009d4: fc85 fdc5 lw a0,-571\(a1\)
+ *5009d8: 41a1 0002 lui at,0x2
+ *5009dc: 41a5 0078 lui a1,0x78
+ *5009e0: 3021 a5a5 addiu at,at,-23131
+ *5009e4: 5821 0008 dsll32 at,at,0x0
+ *5009e8: 5825 2950 daddu a1,a1,at
+ *5009ec: fc85 01ad lw a0,429\(a1\)
+ *5009f0: 41a1 0002 lui at,0x2
+ *5009f4: 41a5 0078 lui a1,0x78
+ *5009f8: 3021 a5a5 addiu at,at,-23131
+ *5009fc: 5821 0008 dsll32 at,at,0x0
+ *500a00: 5825 2950 daddu a1,a1,at
+ *500a04: fc85 f9d5 lw a0,-1579\(a1\)
+ *500a08: 41a1 0002 lui at,0x2
+ *500a0c: 41a5 0078 lui a1,0x78
+ *500a10: 3021 a5a5 addiu at,at,-23131
+ *500a14: 5821 0008 dsll32 at,at,0x0
+ *500a18: 5825 2950 daddu a1,a1,at
+ *500a1c: fc85 01ae lw a0,430\(a1\)
+ \.\.\.
diff --git a/ld/testsuite/ld-mips-elf/micromips-hilo-srec-n32.d b/ld/testsuite/ld-mips-elf/micromips-hilo-srec-n32.d
new file mode 100644
index 0000000..1ea7daa
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/micromips-hilo-srec-n32.d
@@ -0,0 +1,8 @@
+#name: R_MICROMIPS_HI16 and R_MICROMIPS_LO16 relocs srec n32
+#source: ../../../gas/testsuite/gas/mips/mips-hilo.s
+#source: mips-hilo.s
+#as: -mmicromips -march=mips64r2
+#objdump: -m mips:micromips -j .sec1 -D
+#ld: --oformat=srec -Tmips-hilo.ld -e 0x500000 -N
+#notarget: mips*el-ps2-elf*
+#dump: micromips-hilo.d
diff --git a/ld/testsuite/ld-mips-elf/micromips-hilo-srec-n64.d b/ld/testsuite/ld-mips-elf/micromips-hilo-srec-n64.d
new file mode 100644
index 0000000..c25fbe8
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/micromips-hilo-srec-n64.d
@@ -0,0 +1,8 @@
+#name: R_MICROMIPS_HI16 and R_MICROMIPS_LO16 relocs srec n64
+#source: ../../../gas/testsuite/gas/mips/mips-hilo-n64.s
+#source: mips-hilo.s
+#as: -mmicromips -march=mips64r2
+#objdump: -m mips:micromips -j .sec1 -D
+#ld: --oformat=srec -Tmips-hilo.ld -e 0x500000 -N
+#notarget: mips*el-ps2-elf*
+#dump: micromips-hilo-n64.d
diff --git a/ld/testsuite/ld-mips-elf/micromips-hilo-srec.d b/ld/testsuite/ld-mips-elf/micromips-hilo-srec.d
new file mode 100644
index 0000000..e6b8459
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/micromips-hilo-srec.d
@@ -0,0 +1,8 @@
+#name: R_MICROMIPS_HI16 and R_MICROMIPS_LO16 relocs srec
+#source: ../../../gas/testsuite/gas/mips/mips-hilo.s
+#source: mips-hilo.s
+#as: -mmicromips -march=mips32r2
+#objdump: -m mips:micromips -j .sec1 -D
+#ld: --oformat=srec -Tmips-hilo.ld -e 0x500000 -N
+#notarget: mips*el-ps2-elf*
+#dump: micromips-hilo.d
diff --git a/ld/testsuite/ld-mips-elf/micromips-hilo.d b/ld/testsuite/ld-mips-elf/micromips-hilo.d
new file mode 100644
index 0000000..d518dfb
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/micromips-hilo.d
@@ -0,0 +1,230 @@
+#name: R_MICROMIPS_HI16 and R_MICROMIPS_LO16 relocs
+#source: ../../../gas/testsuite/gas/mips/mips-hilo.s
+#source: mips-hilo.s
+#as: -mmicromips -march=mips32r2
+#objdump: -d
+#ld: -Tmips-hilo.ld -e 0x500000 -N
+#notarget: mips*el-ps2-elf*
+
+.*: file format (:?elf.*mips.*|srec)
+
+Disassembly of section \.(:?text|sec1):
+
+0*500000 <[^>]*>:
+ *500000: 41a4 0000 lui a0,0x0
+ *500004: 3084 0000 addiu a0,a0,0
+ *500008: 41a4 0065 lui a0,0x65
+ *50000c: 3084 4320 addiu a0,a0,17184
+ *500010: 41a4 0065 lui a0,0x65
+ *500014: 3084 4324 addiu a0,a0,17188
+ *500018: 41a4 0065 lui a0,0x65
+ *50001c: 3084 4330 addiu a0,a0,17200
+ *500020: 41a4 0065 lui a0,0x65
+ *500024: 3084 4720 addiu a0,a0,18208
+ *500028: 41a4 0076 lui a0,0x76
+ *50002c: 3084 5820 addiu a0,a0,22560
+ *500030: 41a4 0076 lui a0,0x76
+ *500034: 3084 5c08 addiu a0,a0,23560
+ *500038: 41a4 0076 lui a0,0x76
+ *50003c: 3084 5430 addiu a0,a0,21552
+ *500040: 41a4 0076 lui a0,0x76
+ *500044: 3084 5c09 addiu a0,a0,23561
+ *500048: 41a4 0000 lui a0,0x0
+ *50004c: 3084 0001 addiu a0,a0,1
+ *500050: 41a4 0065 lui a0,0x65
+ *500054: 3084 4321 addiu a0,a0,17185
+ *500058: 41a4 0065 lui a0,0x65
+ *50005c: 3084 4325 addiu a0,a0,17189
+ *500060: 41a4 0065 lui a0,0x65
+ *500064: 3084 4331 addiu a0,a0,17201
+ *500068: 41a4 0065 lui a0,0x65
+ *50006c: 3084 4721 addiu a0,a0,18209
+ *500070: 41a4 0076 lui a0,0x76
+ *500074: 3084 5821 addiu a0,a0,22561
+ *500078: 41a4 0076 lui a0,0x76
+ *50007c: 3084 5c09 addiu a0,a0,23561
+ *500080: 41a4 0076 lui a0,0x76
+ *500084: 3084 5431 addiu a0,a0,21553
+ *500088: 41a4 0076 lui a0,0x76
+ *50008c: 3084 5c0a addiu a0,a0,23562
+ *500090: 41a4 0001 lui a0,0x1
+ *500094: 3084 8000 addiu a0,a0,-32768
+ *500098: 41a4 0066 lui a0,0x66
+ *50009c: 3084 c320 addiu a0,a0,-15584
+ *5000a0: 41a4 0066 lui a0,0x66
+ *5000a4: 3084 c324 addiu a0,a0,-15580
+ *5000a8: 41a4 0066 lui a0,0x66
+ *5000ac: 3084 c330 addiu a0,a0,-15568
+ *5000b0: 41a4 0066 lui a0,0x66
+ *5000b4: 3084 c720 addiu a0,a0,-14560
+ *5000b8: 41a4 0077 lui a0,0x77
+ *5000bc: 3084 d820 addiu a0,a0,-10208
+ *5000c0: 41a4 0077 lui a0,0x77
+ *5000c4: 3084 dc08 addiu a0,a0,-9208
+ *5000c8: 41a4 0077 lui a0,0x77
+ *5000cc: 3084 d430 addiu a0,a0,-11216
+ *5000d0: 41a4 0077 lui a0,0x77
+ *5000d4: 3084 dc09 addiu a0,a0,-9207
+ *5000d8: 41a4 0000 lui a0,0x0
+ *5000dc: 3084 8000 addiu a0,a0,-32768
+ *5000e0: 41a4 0065 lui a0,0x65
+ *5000e4: 3084 c320 addiu a0,a0,-15584
+ *5000e8: 41a4 0065 lui a0,0x65
+ *5000ec: 3084 c324 addiu a0,a0,-15580
+ *5000f0: 41a4 0065 lui a0,0x65
+ *5000f4: 3084 c330 addiu a0,a0,-15568
+ *5000f8: 41a4 0065 lui a0,0x65
+ *5000fc: 3084 c720 addiu a0,a0,-14560
+ *500100: 41a4 0076 lui a0,0x76
+ *500104: 3084 d820 addiu a0,a0,-10208
+ *500108: 41a4 0076 lui a0,0x76
+ *50010c: 3084 dc08 addiu a0,a0,-9208
+ *500110: 41a4 0076 lui a0,0x76
+ *500114: 3084 d430 addiu a0,a0,-11216
+ *500118: 41a4 0076 lui a0,0x76
+ *50011c: 3084 dc09 addiu a0,a0,-9207
+ *500120: 41a4 0001 lui a0,0x1
+ *500124: 3084 0000 addiu a0,a0,0
+ *500128: 41a4 0066 lui a0,0x66
+ *50012c: 3084 4320 addiu a0,a0,17184
+ *500130: 41a4 0066 lui a0,0x66
+ *500134: 3084 4324 addiu a0,a0,17188
+ *500138: 41a4 0066 lui a0,0x66
+ *50013c: 3084 4330 addiu a0,a0,17200
+ *500140: 41a4 0066 lui a0,0x66
+ *500144: 3084 4720 addiu a0,a0,18208
+ *500148: 41a4 0077 lui a0,0x77
+ *50014c: 3084 5820 addiu a0,a0,22560
+ *500150: 41a4 0077 lui a0,0x77
+ *500154: 3084 5c08 addiu a0,a0,23560
+ *500158: 41a4 0077 lui a0,0x77
+ *50015c: 3084 5430 addiu a0,a0,21552
+ *500160: 41a4 0077 lui a0,0x77
+ *500164: 3084 5c09 addiu a0,a0,23561
+ *500168: 41a4 0002 lui a0,0x2
+ *50016c: 3084 a5a5 addiu a0,a0,-23131
+ *500170: 41a4 0067 lui a0,0x67
+ *500174: 3084 e8c5 addiu a0,a0,-5947
+ *500178: 41a4 0067 lui a0,0x67
+ *50017c: 3084 e8c9 addiu a0,a0,-5943
+ *500180: 41a4 0067 lui a0,0x67
+ *500184: 3084 e8d5 addiu a0,a0,-5931
+ *500188: 41a4 0067 lui a0,0x67
+ *50018c: 3084 ecc5 addiu a0,a0,-4923
+ *500190: 41a4 0078 lui a0,0x78
+ *500194: 3084 fdc5 addiu a0,a0,-571
+ *500198: 41a4 0078 lui a0,0x78
+ *50019c: 3084 01ad addiu a0,a0,429
+ *5001a0: 41a4 0078 lui a0,0x78
+ *5001a4: 3084 f9d5 addiu a0,a0,-1579
+ *5001a8: 41a4 0078 lui a0,0x78
+ *5001ac: 3084 01ae addiu a0,a0,430
+ *5001b0: 41a5 0000 lui a1,0x0
+ *5001b4: fc85 0000 lw a0,0\(a1\)
+ *5001b8: 41a5 0065 lui a1,0x65
+ *5001bc: fc85 4320 lw a0,17184\(a1\)
+ *5001c0: 41a5 0065 lui a1,0x65
+ *5001c4: fc85 4324 lw a0,17188\(a1\)
+ *5001c8: 41a5 0065 lui a1,0x65
+ *5001cc: fc85 4330 lw a0,17200\(a1\)
+ *5001d0: 41a5 0065 lui a1,0x65
+ *5001d4: fc85 4720 lw a0,18208\(a1\)
+ *5001d8: 41a5 0076 lui a1,0x76
+ *5001dc: fc85 5820 lw a0,22560\(a1\)
+ *5001e0: 41a5 0076 lui a1,0x76
+ *5001e4: fc85 5c08 lw a0,23560\(a1\)
+ *5001e8: 41a5 0076 lui a1,0x76
+ *5001ec: fc85 5430 lw a0,21552\(a1\)
+ *5001f0: 41a5 0076 lui a1,0x76
+ *5001f4: fc85 5c09 lw a0,23561\(a1\)
+ *5001f8: 41a5 0000 lui a1,0x0
+ *5001fc: fc85 0001 lw a0,1\(a1\)
+ *500200: 41a5 0065 lui a1,0x65
+ *500204: fc85 4321 lw a0,17185\(a1\)
+ *500208: 41a5 0065 lui a1,0x65
+ *50020c: fc85 4325 lw a0,17189\(a1\)
+ *500210: 41a5 0065 lui a1,0x65
+ *500214: fc85 4331 lw a0,17201\(a1\)
+ *500218: 41a5 0065 lui a1,0x65
+ *50021c: fc85 4721 lw a0,18209\(a1\)
+ *500220: 41a5 0076 lui a1,0x76
+ *500224: fc85 5821 lw a0,22561\(a1\)
+ *500228: 41a5 0076 lui a1,0x76
+ *50022c: fc85 5c09 lw a0,23561\(a1\)
+ *500230: 41a5 0076 lui a1,0x76
+ *500234: fc85 5431 lw a0,21553\(a1\)
+ *500238: 41a5 0076 lui a1,0x76
+ *50023c: fc85 5c0a lw a0,23562\(a1\)
+ *500240: 41a5 0001 lui a1,0x1
+ *500244: fc85 8000 lw a0,-32768\(a1\)
+ *500248: 41a5 0066 lui a1,0x66
+ *50024c: fc85 c320 lw a0,-15584\(a1\)
+ *500250: 41a5 0066 lui a1,0x66
+ *500254: fc85 c324 lw a0,-15580\(a1\)
+ *500258: 41a5 0066 lui a1,0x66
+ *50025c: fc85 c330 lw a0,-15568\(a1\)
+ *500260: 41a5 0066 lui a1,0x66
+ *500264: fc85 c720 lw a0,-14560\(a1\)
+ *500268: 41a5 0077 lui a1,0x77
+ *50026c: fc85 d820 lw a0,-10208\(a1\)
+ *500270: 41a5 0077 lui a1,0x77
+ *500274: fc85 dc08 lw a0,-9208\(a1\)
+ *500278: 41a5 0077 lui a1,0x77
+ *50027c: fc85 d430 lw a0,-11216\(a1\)
+ *500280: 41a5 0077 lui a1,0x77
+ *500284: fc85 dc09 lw a0,-9207\(a1\)
+ *500288: 41a5 0000 lui a1,0x0
+ *50028c: fc85 8000 lw a0,-32768\(a1\)
+ *500290: 41a5 0065 lui a1,0x65
+ *500294: fc85 c320 lw a0,-15584\(a1\)
+ *500298: 41a5 0065 lui a1,0x65
+ *50029c: fc85 c324 lw a0,-15580\(a1\)
+ *5002a0: 41a5 0065 lui a1,0x65
+ *5002a4: fc85 c330 lw a0,-15568\(a1\)
+ *5002a8: 41a5 0065 lui a1,0x65
+ *5002ac: fc85 c720 lw a0,-14560\(a1\)
+ *5002b0: 41a5 0076 lui a1,0x76
+ *5002b4: fc85 d820 lw a0,-10208\(a1\)
+ *5002b8: 41a5 0076 lui a1,0x76
+ *5002bc: fc85 dc08 lw a0,-9208\(a1\)
+ *5002c0: 41a5 0076 lui a1,0x76
+ *5002c4: fc85 d430 lw a0,-11216\(a1\)
+ *5002c8: 41a5 0076 lui a1,0x76
+ *5002cc: fc85 dc09 lw a0,-9207\(a1\)
+ *5002d0: 41a5 0001 lui a1,0x1
+ *5002d4: fc85 0000 lw a0,0\(a1\)
+ *5002d8: 41a5 0066 lui a1,0x66
+ *5002dc: fc85 4320 lw a0,17184\(a1\)
+ *5002e0: 41a5 0066 lui a1,0x66
+ *5002e4: fc85 4324 lw a0,17188\(a1\)
+ *5002e8: 41a5 0066 lui a1,0x66
+ *5002ec: fc85 4330 lw a0,17200\(a1\)
+ *5002f0: 41a5 0066 lui a1,0x66
+ *5002f4: fc85 4720 lw a0,18208\(a1\)
+ *5002f8: 41a5 0077 lui a1,0x77
+ *5002fc: fc85 5820 lw a0,22560\(a1\)
+ *500300: 41a5 0077 lui a1,0x77
+ *500304: fc85 5c08 lw a0,23560\(a1\)
+ *500308: 41a5 0077 lui a1,0x77
+ *50030c: fc85 5430 lw a0,21552\(a1\)
+ *500310: 41a5 0077 lui a1,0x77
+ *500314: fc85 5c09 lw a0,23561\(a1\)
+ *500318: 41a5 0002 lui a1,0x2
+ *50031c: fc85 a5a5 lw a0,-23131\(a1\)
+ *500320: 41a5 0067 lui a1,0x67
+ *500324: fc85 e8c5 lw a0,-5947\(a1\)
+ *500328: 41a5 0067 lui a1,0x67
+ *50032c: fc85 e8c9 lw a0,-5943\(a1\)
+ *500330: 41a5 0067 lui a1,0x67
+ *500334: fc85 e8d5 lw a0,-5931\(a1\)
+ *500338: 41a5 0067 lui a1,0x67
+ *50033c: fc85 ecc5 lw a0,-4923\(a1\)
+ *500340: 41a5 0078 lui a1,0x78
+ *500344: fc85 fdc5 lw a0,-571\(a1\)
+ *500348: 41a5 0078 lui a1,0x78
+ *50034c: fc85 01ad lw a0,429\(a1\)
+ *500350: 41a5 0078 lui a1,0x78
+ *500354: fc85 f9d5 lw a0,-1579\(a1\)
+ *500358: 41a5 0078 lui a1,0x78
+ *50035c: fc85 01ae lw a0,430\(a1\)
+ \.\.\.
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index 6cb9088..d0919ea 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -814,8 +814,43 @@ run_dump_test_n32 "jalbal" noarch
run_dump_test "mode-change-error-1"
-run_dump_test_o32 "mips16-hilo"
-run_dump_test_n32 "mips16-hilo-n32"
+run_dump_test_o32 "mips16-hilo" noarch
+run_dump_test_n32 "mips16-hilo-n32" noarch
+run_dump_test_o32 "mips16-hilo-srec" \
+ [list noarch \
+ [list objdump [expr { [istarget *el-*-*] ? "-EL" : "-EB" }]]]
+run_dump_test_n32 "mips16-hilo-srec-n32" \
+ [list noarch \
+ [list objdump [expr { [istarget *el-*-*] ? "-EL" : "-EB" }]]]
+run_dump_test_o32 "mips16e2-hilo" noarch
+run_dump_test_n32 "mips16e2-hilo-n32" noarch
+run_dump_test_o32 "mips16e2-hilo-srec" \
+ [list noarch \
+ [list objdump [expr { [istarget *el-*-*] ? "-EL" : "-EB" }]]]
+run_dump_test_n32 "mips16e2-hilo-srec-n32" \
+ [list noarch \
+ [list objdump [expr { [istarget *el-*-*] ? "-EL" : "-EB" }]]]
+run_dump_test_o32 "mips-hilo"
+run_dump_test_n32 "mips-hilo-n32"
+run_dump_test_n64 "mips-hilo-n64"
+run_dump_test_o32 "mips-hilo-srec" \
+ [list [list objdump [expr { [istarget *el-*-*] ? "-EL" : "-EB" }]]]
+run_dump_test_n32 "mips-hilo-srec-n32" \
+ [list [list objdump [expr { [istarget *el-*-*] ? "-EL" : "-EB" }]]]
+run_dump_test_n64 "mips-hilo-srec-n64" \
+ [list [list objdump [expr { [istarget *el-*-*] ? "-EL" : "-EB" }]]]
+run_dump_test_o32 "micromips-hilo" noarch
+run_dump_test_n32 "micromips-hilo-n32" noarch
+run_dump_test_n64 "micromips-hilo-n64" noarch
+run_dump_test_o32 "micromips-hilo-srec" \
+ [list noarch \
+ [list objdump [expr { [istarget *el-*-*] ? "-EL" : "-EB" }]]]
+run_dump_test_n32 "micromips-hilo-srec-n32" \
+ [list noarch \
+ [list objdump [expr { [istarget *el-*-*] ? "-EL" : "-EB" }]]]
+run_dump_test_n64 "micromips-hilo-srec-n64" \
+ [list noarch \
+ [list objdump [expr { [istarget *el-*-*] ? "-EL" : "-EB" }]]]
if { $linux_gnu } {
run_dump_test_n32 "textrel-1"
diff --git a/ld/testsuite/ld-mips-elf/mips-hilo-n32.d b/ld/testsuite/ld-mips-elf/mips-hilo-n32.d
new file mode 100644
index 0000000..012e1f0
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips-hilo-n32.d
@@ -0,0 +1,6 @@
+#name: R_MIPS_HI16 and R_MIPS_LO16 relocs n32
+#source: ../../../gas/testsuite/gas/mips/mips-hilo.s
+#source: mips-hilo.s
+#objdump: -d
+#ld: -Tmips-hilo.ld -e 0x500000 -N
+#dump: mips-hilo.d
diff --git a/ld/testsuite/ld-mips-elf/mips-hilo-n64.d b/ld/testsuite/ld-mips-elf/mips-hilo-n64.d
new file mode 100644
index 0000000..5a3f919
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips-hilo-n64.d
@@ -0,0 +1,660 @@
+#name: R_MIPS_HI16 and R_MIPS_LO16 relocs n64
+#source: ../../../gas/testsuite/gas/mips/mips-hilo-n64.s
+#source: mips-hilo.s
+#objdump: -d
+#ld: -Tmips-hilo.ld -e 0x500000 -N
+
+.*: file format (:?elf.*mips.*|srec)
+
+Disassembly of section \.(:?text|sec1):
+
+0*500000 <[^>]*>:
+ *500000: 3c010000 lui at,0x0
+ *500004: 3c040000 lui a0,0x0
+ *500008: 24210000 addiu at,at,0
+ *50000c: 24840000 addiu a0,a0,0
+ *500010: 0001083c dsll32 at,at,0x0
+ *500014: 0081202d daddu a0,a0,at
+ *500018: 3c010000 lui at,0x0
+ *50001c: 3c040065 lui a0,0x65
+ *500020: 24210000 addiu at,at,0
+ *500024: 24844320 addiu a0,a0,17184
+ *500028: 0001083c dsll32 at,at,0x0
+ *50002c: 0081202d daddu a0,a0,at
+ *500030: 3c010000 lui at,0x0
+ *500034: 3c040065 lui a0,0x65
+ *500038: 24210000 addiu at,at,0
+ *50003c: 24844324 addiu a0,a0,17188
+ *500040: 0001083c dsll32 at,at,0x0
+ *500044: 0081202d daddu a0,a0,at
+ *500048: 3c010000 lui at,0x0
+ *50004c: 3c040065 lui a0,0x65
+ *500050: 24210000 addiu at,at,0
+ *500054: 24844330 addiu a0,a0,17200
+ *500058: 0001083c dsll32 at,at,0x0
+ *50005c: 0081202d daddu a0,a0,at
+ *500060: 3c010000 lui at,0x0
+ *500064: 3c040065 lui a0,0x65
+ *500068: 24210000 addiu at,at,0
+ *50006c: 24844720 addiu a0,a0,18208
+ *500070: 0001083c dsll32 at,at,0x0
+ *500074: 0081202d daddu a0,a0,at
+ *500078: 3c010000 lui at,0x0
+ *50007c: 3c040076 lui a0,0x76
+ *500080: 24210000 addiu at,at,0
+ *500084: 24845820 addiu a0,a0,22560
+ *500088: 0001083c dsll32 at,at,0x0
+ *50008c: 0081202d daddu a0,a0,at
+ *500090: 3c010000 lui at,0x0
+ *500094: 3c040076 lui a0,0x76
+ *500098: 24210000 addiu at,at,0
+ *50009c: 24845c08 addiu a0,a0,23560
+ *5000a0: 0001083c dsll32 at,at,0x0
+ *5000a4: 0081202d daddu a0,a0,at
+ *5000a8: 3c010000 lui at,0x0
+ *5000ac: 3c040076 lui a0,0x76
+ *5000b0: 24210000 addiu at,at,0
+ *5000b4: 24845430 addiu a0,a0,21552
+ *5000b8: 0001083c dsll32 at,at,0x0
+ *5000bc: 0081202d daddu a0,a0,at
+ *5000c0: 3c010000 lui at,0x0
+ *5000c4: 3c040076 lui a0,0x76
+ *5000c8: 24210000 addiu at,at,0
+ *5000cc: 24845c09 addiu a0,a0,23561
+ *5000d0: 0001083c dsll32 at,at,0x0
+ *5000d4: 0081202d daddu a0,a0,at
+ *5000d8: 3c010000 lui at,0x0
+ *5000dc: 3c040000 lui a0,0x0
+ *5000e0: 24210000 addiu at,at,0
+ *5000e4: 24840001 addiu a0,a0,1
+ *5000e8: 0001083c dsll32 at,at,0x0
+ *5000ec: 0081202d daddu a0,a0,at
+ *5000f0: 3c010000 lui at,0x0
+ *5000f4: 3c040065 lui a0,0x65
+ *5000f8: 24210000 addiu at,at,0
+ *5000fc: 24844321 addiu a0,a0,17185
+ *500100: 0001083c dsll32 at,at,0x0
+ *500104: 0081202d daddu a0,a0,at
+ *500108: 3c010000 lui at,0x0
+ *50010c: 3c040065 lui a0,0x65
+ *500110: 24210000 addiu at,at,0
+ *500114: 24844325 addiu a0,a0,17189
+ *500118: 0001083c dsll32 at,at,0x0
+ *50011c: 0081202d daddu a0,a0,at
+ *500120: 3c010000 lui at,0x0
+ *500124: 3c040065 lui a0,0x65
+ *500128: 24210000 addiu at,at,0
+ *50012c: 24844331 addiu a0,a0,17201
+ *500130: 0001083c dsll32 at,at,0x0
+ *500134: 0081202d daddu a0,a0,at
+ *500138: 3c010000 lui at,0x0
+ *50013c: 3c040065 lui a0,0x65
+ *500140: 24210000 addiu at,at,0
+ *500144: 24844721 addiu a0,a0,18209
+ *500148: 0001083c dsll32 at,at,0x0
+ *50014c: 0081202d daddu a0,a0,at
+ *500150: 3c010000 lui at,0x0
+ *500154: 3c040076 lui a0,0x76
+ *500158: 24210000 addiu at,at,0
+ *50015c: 24845821 addiu a0,a0,22561
+ *500160: 0001083c dsll32 at,at,0x0
+ *500164: 0081202d daddu a0,a0,at
+ *500168: 3c010000 lui at,0x0
+ *50016c: 3c040076 lui a0,0x76
+ *500170: 24210000 addiu at,at,0
+ *500174: 24845c09 addiu a0,a0,23561
+ *500178: 0001083c dsll32 at,at,0x0
+ *50017c: 0081202d daddu a0,a0,at
+ *500180: 3c010000 lui at,0x0
+ *500184: 3c040076 lui a0,0x76
+ *500188: 24210000 addiu at,at,0
+ *50018c: 24845431 addiu a0,a0,21553
+ *500190: 0001083c dsll32 at,at,0x0
+ *500194: 0081202d daddu a0,a0,at
+ *500198: 3c010000 lui at,0x0
+ *50019c: 3c040076 lui a0,0x76
+ *5001a0: 24210000 addiu at,at,0
+ *5001a4: 24845c0a addiu a0,a0,23562
+ *5001a8: 0001083c dsll32 at,at,0x0
+ *5001ac: 0081202d daddu a0,a0,at
+ *5001b0: 3c010001 lui at,0x1
+ *5001b4: 3c048001 lui a0,0x8001
+ *5001b8: 24218001 addiu at,at,-32767
+ *5001bc: 24848000 addiu a0,a0,-32768
+ *5001c0: 0001083c dsll32 at,at,0x0
+ *5001c4: 0081202d daddu a0,a0,at
+ *5001c8: 3c010001 lui at,0x1
+ *5001cc: 3c048066 lui a0,0x8066
+ *5001d0: 24218001 addiu at,at,-32767
+ *5001d4: 2484c320 addiu a0,a0,-15584
+ *5001d8: 0001083c dsll32 at,at,0x0
+ *5001dc: 0081202d daddu a0,a0,at
+ *5001e0: 3c010001 lui at,0x1
+ *5001e4: 3c048066 lui a0,0x8066
+ *5001e8: 24218001 addiu at,at,-32767
+ *5001ec: 2484c324 addiu a0,a0,-15580
+ *5001f0: 0001083c dsll32 at,at,0x0
+ *5001f4: 0081202d daddu a0,a0,at
+ *5001f8: 3c010001 lui at,0x1
+ *5001fc: 3c048066 lui a0,0x8066
+ *500200: 24218001 addiu at,at,-32767
+ *500204: 2484c330 addiu a0,a0,-15568
+ *500208: 0001083c dsll32 at,at,0x0
+ *50020c: 0081202d daddu a0,a0,at
+ *500210: 3c010001 lui at,0x1
+ *500214: 3c048066 lui a0,0x8066
+ *500218: 24218001 addiu at,at,-32767
+ *50021c: 2484c720 addiu a0,a0,-14560
+ *500220: 0001083c dsll32 at,at,0x0
+ *500224: 0081202d daddu a0,a0,at
+ *500228: 3c010001 lui at,0x1
+ *50022c: 3c048077 lui a0,0x8077
+ *500230: 24218001 addiu at,at,-32767
+ *500234: 2484d820 addiu a0,a0,-10208
+ *500238: 0001083c dsll32 at,at,0x0
+ *50023c: 0081202d daddu a0,a0,at
+ *500240: 3c010001 lui at,0x1
+ *500244: 3c048077 lui a0,0x8077
+ *500248: 24218001 addiu at,at,-32767
+ *50024c: 2484dc08 addiu a0,a0,-9208
+ *500250: 0001083c dsll32 at,at,0x0
+ *500254: 0081202d daddu a0,a0,at
+ *500258: 3c010001 lui at,0x1
+ *50025c: 3c048077 lui a0,0x8077
+ *500260: 24218001 addiu at,at,-32767
+ *500264: 2484d430 addiu a0,a0,-11216
+ *500268: 0001083c dsll32 at,at,0x0
+ *50026c: 0081202d daddu a0,a0,at
+ *500270: 3c010001 lui at,0x1
+ *500274: 3c048077 lui a0,0x8077
+ *500278: 24218001 addiu at,at,-32767
+ *50027c: 2484dc09 addiu a0,a0,-9207
+ *500280: 0001083c dsll32 at,at,0x0
+ *500284: 0081202d daddu a0,a0,at
+ *500288: 3c010000 lui at,0x0
+ *50028c: 3c048000 lui a0,0x8000
+ *500290: 24218000 addiu at,at,-32768
+ *500294: 24848000 addiu a0,a0,-32768
+ *500298: 0001083c dsll32 at,at,0x0
+ *50029c: 0081202d daddu a0,a0,at
+ *5002a0: 3c010000 lui at,0x0
+ *5002a4: 3c048065 lui a0,0x8065
+ *5002a8: 24218000 addiu at,at,-32768
+ *5002ac: 2484c320 addiu a0,a0,-15584
+ *5002b0: 0001083c dsll32 at,at,0x0
+ *5002b4: 0081202d daddu a0,a0,at
+ *5002b8: 3c010000 lui at,0x0
+ *5002bc: 3c048065 lui a0,0x8065
+ *5002c0: 24218000 addiu at,at,-32768
+ *5002c4: 2484c324 addiu a0,a0,-15580
+ *5002c8: 0001083c dsll32 at,at,0x0
+ *5002cc: 0081202d daddu a0,a0,at
+ *5002d0: 3c010000 lui at,0x0
+ *5002d4: 3c048065 lui a0,0x8065
+ *5002d8: 24218000 addiu at,at,-32768
+ *5002dc: 2484c330 addiu a0,a0,-15568
+ *5002e0: 0001083c dsll32 at,at,0x0
+ *5002e4: 0081202d daddu a0,a0,at
+ *5002e8: 3c010000 lui at,0x0
+ *5002ec: 3c048065 lui a0,0x8065
+ *5002f0: 24218000 addiu at,at,-32768
+ *5002f4: 2484c720 addiu a0,a0,-14560
+ *5002f8: 0001083c dsll32 at,at,0x0
+ *5002fc: 0081202d daddu a0,a0,at
+ *500300: 3c010000 lui at,0x0
+ *500304: 3c048076 lui a0,0x8076
+ *500308: 24218000 addiu at,at,-32768
+ *50030c: 2484d820 addiu a0,a0,-10208
+ *500310: 0001083c dsll32 at,at,0x0
+ *500314: 0081202d daddu a0,a0,at
+ *500318: 3c010000 lui at,0x0
+ *50031c: 3c048076 lui a0,0x8076
+ *500320: 24218000 addiu at,at,-32768
+ *500324: 2484dc08 addiu a0,a0,-9208
+ *500328: 0001083c dsll32 at,at,0x0
+ *50032c: 0081202d daddu a0,a0,at
+ *500330: 3c010000 lui at,0x0
+ *500334: 3c048076 lui a0,0x8076
+ *500338: 24218000 addiu at,at,-32768
+ *50033c: 2484d430 addiu a0,a0,-11216
+ *500340: 0001083c dsll32 at,at,0x0
+ *500344: 0081202d daddu a0,a0,at
+ *500348: 3c010000 lui at,0x0
+ *50034c: 3c048076 lui a0,0x8076
+ *500350: 24218000 addiu at,at,-32768
+ *500354: 2484dc09 addiu a0,a0,-9207
+ *500358: 0001083c dsll32 at,at,0x0
+ *50035c: 0081202d daddu a0,a0,at
+ *500360: 3c010001 lui at,0x1
+ *500364: 3c040001 lui a0,0x1
+ *500368: 24210001 addiu at,at,1
+ *50036c: 24840000 addiu a0,a0,0
+ *500370: 0001083c dsll32 at,at,0x0
+ *500374: 0081202d daddu a0,a0,at
+ *500378: 3c010001 lui at,0x1
+ *50037c: 3c040066 lui a0,0x66
+ *500380: 24210001 addiu at,at,1
+ *500384: 24844320 addiu a0,a0,17184
+ *500388: 0001083c dsll32 at,at,0x0
+ *50038c: 0081202d daddu a0,a0,at
+ *500390: 3c010001 lui at,0x1
+ *500394: 3c040066 lui a0,0x66
+ *500398: 24210001 addiu at,at,1
+ *50039c: 24844324 addiu a0,a0,17188
+ *5003a0: 0001083c dsll32 at,at,0x0
+ *5003a4: 0081202d daddu a0,a0,at
+ *5003a8: 3c010001 lui at,0x1
+ *5003ac: 3c040066 lui a0,0x66
+ *5003b0: 24210001 addiu at,at,1
+ *5003b4: 24844330 addiu a0,a0,17200
+ *5003b8: 0001083c dsll32 at,at,0x0
+ *5003bc: 0081202d daddu a0,a0,at
+ *5003c0: 3c010001 lui at,0x1
+ *5003c4: 3c040066 lui a0,0x66
+ *5003c8: 24210001 addiu at,at,1
+ *5003cc: 24844720 addiu a0,a0,18208
+ *5003d0: 0001083c dsll32 at,at,0x0
+ *5003d4: 0081202d daddu a0,a0,at
+ *5003d8: 3c010001 lui at,0x1
+ *5003dc: 3c040077 lui a0,0x77
+ *5003e0: 24210001 addiu at,at,1
+ *5003e4: 24845820 addiu a0,a0,22560
+ *5003e8: 0001083c dsll32 at,at,0x0
+ *5003ec: 0081202d daddu a0,a0,at
+ *5003f0: 3c010001 lui at,0x1
+ *5003f4: 3c040077 lui a0,0x77
+ *5003f8: 24210001 addiu at,at,1
+ *5003fc: 24845c08 addiu a0,a0,23560
+ *500400: 0001083c dsll32 at,at,0x0
+ *500404: 0081202d daddu a0,a0,at
+ *500408: 3c010001 lui at,0x1
+ *50040c: 3c040077 lui a0,0x77
+ *500410: 24210001 addiu at,at,1
+ *500414: 24845430 addiu a0,a0,21552
+ *500418: 0001083c dsll32 at,at,0x0
+ *50041c: 0081202d daddu a0,a0,at
+ *500420: 3c010001 lui at,0x1
+ *500424: 3c040077 lui a0,0x77
+ *500428: 24210001 addiu at,at,1
+ *50042c: 24845c09 addiu a0,a0,23561
+ *500430: 0001083c dsll32 at,at,0x0
+ *500434: 0081202d daddu a0,a0,at
+ *500438: 3c010002 lui at,0x2
+ *50043c: 3c040002 lui a0,0x2
+ *500440: 2421a5a5 addiu at,at,-23131
+ *500444: 2484a5a5 addiu a0,a0,-23131
+ *500448: 0001083c dsll32 at,at,0x0
+ *50044c: 0081202d daddu a0,a0,at
+ *500450: 3c010002 lui at,0x2
+ *500454: 3c040067 lui a0,0x67
+ *500458: 2421a5a5 addiu at,at,-23131
+ *50045c: 2484e8c5 addiu a0,a0,-5947
+ *500460: 0001083c dsll32 at,at,0x0
+ *500464: 0081202d daddu a0,a0,at
+ *500468: 3c010002 lui at,0x2
+ *50046c: 3c040067 lui a0,0x67
+ *500470: 2421a5a5 addiu at,at,-23131
+ *500474: 2484e8c9 addiu a0,a0,-5943
+ *500478: 0001083c dsll32 at,at,0x0
+ *50047c: 0081202d daddu a0,a0,at
+ *500480: 3c010002 lui at,0x2
+ *500484: 3c040067 lui a0,0x67
+ *500488: 2421a5a5 addiu at,at,-23131
+ *50048c: 2484e8d5 addiu a0,a0,-5931
+ *500490: 0001083c dsll32 at,at,0x0
+ *500494: 0081202d daddu a0,a0,at
+ *500498: 3c010002 lui at,0x2
+ *50049c: 3c040067 lui a0,0x67
+ *5004a0: 2421a5a5 addiu at,at,-23131
+ *5004a4: 2484ecc5 addiu a0,a0,-4923
+ *5004a8: 0001083c dsll32 at,at,0x0
+ *5004ac: 0081202d daddu a0,a0,at
+ *5004b0: 3c010002 lui at,0x2
+ *5004b4: 3c040078 lui a0,0x78
+ *5004b8: 2421a5a5 addiu at,at,-23131
+ *5004bc: 2484fdc5 addiu a0,a0,-571
+ *5004c0: 0001083c dsll32 at,at,0x0
+ *5004c4: 0081202d daddu a0,a0,at
+ *5004c8: 3c010002 lui at,0x2
+ *5004cc: 3c040078 lui a0,0x78
+ *5004d0: 2421a5a5 addiu at,at,-23131
+ *5004d4: 248401ad addiu a0,a0,429
+ *5004d8: 0001083c dsll32 at,at,0x0
+ *5004dc: 0081202d daddu a0,a0,at
+ *5004e0: 3c010002 lui at,0x2
+ *5004e4: 3c040078 lui a0,0x78
+ *5004e8: 2421a5a5 addiu at,at,-23131
+ *5004ec: 2484f9d5 addiu a0,a0,-1579
+ *5004f0: 0001083c dsll32 at,at,0x0
+ *5004f4: 0081202d daddu a0,a0,at
+ *5004f8: 3c010002 lui at,0x2
+ *5004fc: 3c040078 lui a0,0x78
+ *500500: 2421a5a5 addiu at,at,-23131
+ *500504: 248401ae addiu a0,a0,430
+ *500508: 0001083c dsll32 at,at,0x0
+ *50050c: 0081202d daddu a0,a0,at
+ *500510: 3c010000 lui at,0x0
+ *500514: 3c050000 lui a1,0x0
+ *500518: 24210000 addiu at,at,0
+ *50051c: 0001083c dsll32 at,at,0x0
+ *500520: 00a1282d daddu a1,a1,at
+ *500524: 8ca40000 lw a0,0\(a1\)
+ *500528: 3c010000 lui at,0x0
+ *50052c: 3c050065 lui a1,0x65
+ *500530: 24210000 addiu at,at,0
+ *500534: 0001083c dsll32 at,at,0x0
+ *500538: 00a1282d daddu a1,a1,at
+ *50053c: 8ca44320 lw a0,17184\(a1\)
+ *500540: 3c010000 lui at,0x0
+ *500544: 3c050065 lui a1,0x65
+ *500548: 24210000 addiu at,at,0
+ *50054c: 0001083c dsll32 at,at,0x0
+ *500550: 00a1282d daddu a1,a1,at
+ *500554: 8ca44324 lw a0,17188\(a1\)
+ *500558: 3c010000 lui at,0x0
+ *50055c: 3c050065 lui a1,0x65
+ *500560: 24210000 addiu at,at,0
+ *500564: 0001083c dsll32 at,at,0x0
+ *500568: 00a1282d daddu a1,a1,at
+ *50056c: 8ca44330 lw a0,17200\(a1\)
+ *500570: 3c010000 lui at,0x0
+ *500574: 3c050065 lui a1,0x65
+ *500578: 24210000 addiu at,at,0
+ *50057c: 0001083c dsll32 at,at,0x0
+ *500580: 00a1282d daddu a1,a1,at
+ *500584: 8ca44720 lw a0,18208\(a1\)
+ *500588: 3c010000 lui at,0x0
+ *50058c: 3c050076 lui a1,0x76
+ *500590: 24210000 addiu at,at,0
+ *500594: 0001083c dsll32 at,at,0x0
+ *500598: 00a1282d daddu a1,a1,at
+ *50059c: 8ca45820 lw a0,22560\(a1\)
+ *5005a0: 3c010000 lui at,0x0
+ *5005a4: 3c050076 lui a1,0x76
+ *5005a8: 24210000 addiu at,at,0
+ *5005ac: 0001083c dsll32 at,at,0x0
+ *5005b0: 00a1282d daddu a1,a1,at
+ *5005b4: 8ca45c08 lw a0,23560\(a1\)
+ *5005b8: 3c010000 lui at,0x0
+ *5005bc: 3c050076 lui a1,0x76
+ *5005c0: 24210000 addiu at,at,0
+ *5005c4: 0001083c dsll32 at,at,0x0
+ *5005c8: 00a1282d daddu a1,a1,at
+ *5005cc: 8ca45430 lw a0,21552\(a1\)
+ *5005d0: 3c010000 lui at,0x0
+ *5005d4: 3c050076 lui a1,0x76
+ *5005d8: 24210000 addiu at,at,0
+ *5005dc: 0001083c dsll32 at,at,0x0
+ *5005e0: 00a1282d daddu a1,a1,at
+ *5005e4: 8ca45c09 lw a0,23561\(a1\)
+ *5005e8: 3c010000 lui at,0x0
+ *5005ec: 3c050000 lui a1,0x0
+ *5005f0: 24210000 addiu at,at,0
+ *5005f4: 0001083c dsll32 at,at,0x0
+ *5005f8: 00a1282d daddu a1,a1,at
+ *5005fc: 8ca40001 lw a0,1\(a1\)
+ *500600: 3c010000 lui at,0x0
+ *500604: 3c050065 lui a1,0x65
+ *500608: 24210000 addiu at,at,0
+ *50060c: 0001083c dsll32 at,at,0x0
+ *500610: 00a1282d daddu a1,a1,at
+ *500614: 8ca44321 lw a0,17185\(a1\)
+ *500618: 3c010000 lui at,0x0
+ *50061c: 3c050065 lui a1,0x65
+ *500620: 24210000 addiu at,at,0
+ *500624: 0001083c dsll32 at,at,0x0
+ *500628: 00a1282d daddu a1,a1,at
+ *50062c: 8ca44325 lw a0,17189\(a1\)
+ *500630: 3c010000 lui at,0x0
+ *500634: 3c050065 lui a1,0x65
+ *500638: 24210000 addiu at,at,0
+ *50063c: 0001083c dsll32 at,at,0x0
+ *500640: 00a1282d daddu a1,a1,at
+ *500644: 8ca44331 lw a0,17201\(a1\)
+ *500648: 3c010000 lui at,0x0
+ *50064c: 3c050065 lui a1,0x65
+ *500650: 24210000 addiu at,at,0
+ *500654: 0001083c dsll32 at,at,0x0
+ *500658: 00a1282d daddu a1,a1,at
+ *50065c: 8ca44721 lw a0,18209\(a1\)
+ *500660: 3c010000 lui at,0x0
+ *500664: 3c050076 lui a1,0x76
+ *500668: 24210000 addiu at,at,0
+ *50066c: 0001083c dsll32 at,at,0x0
+ *500670: 00a1282d daddu a1,a1,at
+ *500674: 8ca45821 lw a0,22561\(a1\)
+ *500678: 3c010000 lui at,0x0
+ *50067c: 3c050076 lui a1,0x76
+ *500680: 24210000 addiu at,at,0
+ *500684: 0001083c dsll32 at,at,0x0
+ *500688: 00a1282d daddu a1,a1,at
+ *50068c: 8ca45c09 lw a0,23561\(a1\)
+ *500690: 3c010000 lui at,0x0
+ *500694: 3c050076 lui a1,0x76
+ *500698: 24210000 addiu at,at,0
+ *50069c: 0001083c dsll32 at,at,0x0
+ *5006a0: 00a1282d daddu a1,a1,at
+ *5006a4: 8ca45431 lw a0,21553\(a1\)
+ *5006a8: 3c010000 lui at,0x0
+ *5006ac: 3c050076 lui a1,0x76
+ *5006b0: 24210000 addiu at,at,0
+ *5006b4: 0001083c dsll32 at,at,0x0
+ *5006b8: 00a1282d daddu a1,a1,at
+ *5006bc: 8ca45c0a lw a0,23562\(a1\)
+ *5006c0: 3c010001 lui at,0x1
+ *5006c4: 3c058001 lui a1,0x8001
+ *5006c8: 24218001 addiu at,at,-32767
+ *5006cc: 0001083c dsll32 at,at,0x0
+ *5006d0: 00a1282d daddu a1,a1,at
+ *5006d4: 8ca48000 lw a0,-32768\(a1\)
+ *5006d8: 3c010001 lui at,0x1
+ *5006dc: 3c058066 lui a1,0x8066
+ *5006e0: 24218001 addiu at,at,-32767
+ *5006e4: 0001083c dsll32 at,at,0x0
+ *5006e8: 00a1282d daddu a1,a1,at
+ *5006ec: 8ca4c320 lw a0,-15584\(a1\)
+ *5006f0: 3c010001 lui at,0x1
+ *5006f4: 3c058066 lui a1,0x8066
+ *5006f8: 24218001 addiu at,at,-32767
+ *5006fc: 0001083c dsll32 at,at,0x0
+ *500700: 00a1282d daddu a1,a1,at
+ *500704: 8ca4c324 lw a0,-15580\(a1\)
+ *500708: 3c010001 lui at,0x1
+ *50070c: 3c058066 lui a1,0x8066
+ *500710: 24218001 addiu at,at,-32767
+ *500714: 0001083c dsll32 at,at,0x0
+ *500718: 00a1282d daddu a1,a1,at
+ *50071c: 8ca4c330 lw a0,-15568\(a1\)
+ *500720: 3c010001 lui at,0x1
+ *500724: 3c058066 lui a1,0x8066
+ *500728: 24218001 addiu at,at,-32767
+ *50072c: 0001083c dsll32 at,at,0x0
+ *500730: 00a1282d daddu a1,a1,at
+ *500734: 8ca4c720 lw a0,-14560\(a1\)
+ *500738: 3c010001 lui at,0x1
+ *50073c: 3c058077 lui a1,0x8077
+ *500740: 24218001 addiu at,at,-32767
+ *500744: 0001083c dsll32 at,at,0x0
+ *500748: 00a1282d daddu a1,a1,at
+ *50074c: 8ca4d820 lw a0,-10208\(a1\)
+ *500750: 3c010001 lui at,0x1
+ *500754: 3c058077 lui a1,0x8077
+ *500758: 24218001 addiu at,at,-32767
+ *50075c: 0001083c dsll32 at,at,0x0
+ *500760: 00a1282d daddu a1,a1,at
+ *500764: 8ca4dc08 lw a0,-9208\(a1\)
+ *500768: 3c010001 lui at,0x1
+ *50076c: 3c058077 lui a1,0x8077
+ *500770: 24218001 addiu at,at,-32767
+ *500774: 0001083c dsll32 at,at,0x0
+ *500778: 00a1282d daddu a1,a1,at
+ *50077c: 8ca4d430 lw a0,-11216\(a1\)
+ *500780: 3c010001 lui at,0x1
+ *500784: 3c058077 lui a1,0x8077
+ *500788: 24218001 addiu at,at,-32767
+ *50078c: 0001083c dsll32 at,at,0x0
+ *500790: 00a1282d daddu a1,a1,at
+ *500794: 8ca4dc09 lw a0,-9207\(a1\)
+ *500798: 3c010000 lui at,0x0
+ *50079c: 3c058000 lui a1,0x8000
+ *5007a0: 24218000 addiu at,at,-32768
+ *5007a4: 0001083c dsll32 at,at,0x0
+ *5007a8: 00a1282d daddu a1,a1,at
+ *5007ac: 8ca48000 lw a0,-32768\(a1\)
+ *5007b0: 3c010000 lui at,0x0
+ *5007b4: 3c058065 lui a1,0x8065
+ *5007b8: 24218000 addiu at,at,-32768
+ *5007bc: 0001083c dsll32 at,at,0x0
+ *5007c0: 00a1282d daddu a1,a1,at
+ *5007c4: 8ca4c320 lw a0,-15584\(a1\)
+ *5007c8: 3c010000 lui at,0x0
+ *5007cc: 3c058065 lui a1,0x8065
+ *5007d0: 24218000 addiu at,at,-32768
+ *5007d4: 0001083c dsll32 at,at,0x0
+ *5007d8: 00a1282d daddu a1,a1,at
+ *5007dc: 8ca4c324 lw a0,-15580\(a1\)
+ *5007e0: 3c010000 lui at,0x0
+ *5007e4: 3c058065 lui a1,0x8065
+ *5007e8: 24218000 addiu at,at,-32768
+ *5007ec: 0001083c dsll32 at,at,0x0
+ *5007f0: 00a1282d daddu a1,a1,at
+ *5007f4: 8ca4c330 lw a0,-15568\(a1\)
+ *5007f8: 3c010000 lui at,0x0
+ *5007fc: 3c058065 lui a1,0x8065
+ *500800: 24218000 addiu at,at,-32768
+ *500804: 0001083c dsll32 at,at,0x0
+ *500808: 00a1282d daddu a1,a1,at
+ *50080c: 8ca4c720 lw a0,-14560\(a1\)
+ *500810: 3c010000 lui at,0x0
+ *500814: 3c058076 lui a1,0x8076
+ *500818: 24218000 addiu at,at,-32768
+ *50081c: 0001083c dsll32 at,at,0x0
+ *500820: 00a1282d daddu a1,a1,at
+ *500824: 8ca4d820 lw a0,-10208\(a1\)
+ *500828: 3c010000 lui at,0x0
+ *50082c: 3c058076 lui a1,0x8076
+ *500830: 24218000 addiu at,at,-32768
+ *500834: 0001083c dsll32 at,at,0x0
+ *500838: 00a1282d daddu a1,a1,at
+ *50083c: 8ca4dc08 lw a0,-9208\(a1\)
+ *500840: 3c010000 lui at,0x0
+ *500844: 3c058076 lui a1,0x8076
+ *500848: 24218000 addiu at,at,-32768
+ *50084c: 0001083c dsll32 at,at,0x0
+ *500850: 00a1282d daddu a1,a1,at
+ *500854: 8ca4d430 lw a0,-11216\(a1\)
+ *500858: 3c010000 lui at,0x0
+ *50085c: 3c058076 lui a1,0x8076
+ *500860: 24218000 addiu at,at,-32768
+ *500864: 0001083c dsll32 at,at,0x0
+ *500868: 00a1282d daddu a1,a1,at
+ *50086c: 8ca4dc09 lw a0,-9207\(a1\)
+ *500870: 3c010001 lui at,0x1
+ *500874: 3c050001 lui a1,0x1
+ *500878: 24210001 addiu at,at,1
+ *50087c: 0001083c dsll32 at,at,0x0
+ *500880: 00a1282d daddu a1,a1,at
+ *500884: 8ca40000 lw a0,0\(a1\)
+ *500888: 3c010001 lui at,0x1
+ *50088c: 3c050066 lui a1,0x66
+ *500890: 24210001 addiu at,at,1
+ *500894: 0001083c dsll32 at,at,0x0
+ *500898: 00a1282d daddu a1,a1,at
+ *50089c: 8ca44320 lw a0,17184\(a1\)
+ *5008a0: 3c010001 lui at,0x1
+ *5008a4: 3c050066 lui a1,0x66
+ *5008a8: 24210001 addiu at,at,1
+ *5008ac: 0001083c dsll32 at,at,0x0
+ *5008b0: 00a1282d daddu a1,a1,at
+ *5008b4: 8ca44324 lw a0,17188\(a1\)
+ *5008b8: 3c010001 lui at,0x1
+ *5008bc: 3c050066 lui a1,0x66
+ *5008c0: 24210001 addiu at,at,1
+ *5008c4: 0001083c dsll32 at,at,0x0
+ *5008c8: 00a1282d daddu a1,a1,at
+ *5008cc: 8ca44330 lw a0,17200\(a1\)
+ *5008d0: 3c010001 lui at,0x1
+ *5008d4: 3c050066 lui a1,0x66
+ *5008d8: 24210001 addiu at,at,1
+ *5008dc: 0001083c dsll32 at,at,0x0
+ *5008e0: 00a1282d daddu a1,a1,at
+ *5008e4: 8ca44720 lw a0,18208\(a1\)
+ *5008e8: 3c010001 lui at,0x1
+ *5008ec: 3c050077 lui a1,0x77
+ *5008f0: 24210001 addiu at,at,1
+ *5008f4: 0001083c dsll32 at,at,0x0
+ *5008f8: 00a1282d daddu a1,a1,at
+ *5008fc: 8ca45820 lw a0,22560\(a1\)
+ *500900: 3c010001 lui at,0x1
+ *500904: 3c050077 lui a1,0x77
+ *500908: 24210001 addiu at,at,1
+ *50090c: 0001083c dsll32 at,at,0x0
+ *500910: 00a1282d daddu a1,a1,at
+ *500914: 8ca45c08 lw a0,23560\(a1\)
+ *500918: 3c010001 lui at,0x1
+ *50091c: 3c050077 lui a1,0x77
+ *500920: 24210001 addiu at,at,1
+ *500924: 0001083c dsll32 at,at,0x0
+ *500928: 00a1282d daddu a1,a1,at
+ *50092c: 8ca45430 lw a0,21552\(a1\)
+ *500930: 3c010001 lui at,0x1
+ *500934: 3c050077 lui a1,0x77
+ *500938: 24210001 addiu at,at,1
+ *50093c: 0001083c dsll32 at,at,0x0
+ *500940: 00a1282d daddu a1,a1,at
+ *500944: 8ca45c09 lw a0,23561\(a1\)
+ *500948: 3c010002 lui at,0x2
+ *50094c: 3c050002 lui a1,0x2
+ *500950: 2421a5a5 addiu at,at,-23131
+ *500954: 0001083c dsll32 at,at,0x0
+ *500958: 00a1282d daddu a1,a1,at
+ *50095c: 8ca4a5a5 lw a0,-23131\(a1\)
+ *500960: 3c010002 lui at,0x2
+ *500964: 3c050067 lui a1,0x67
+ *500968: 2421a5a5 addiu at,at,-23131
+ *50096c: 0001083c dsll32 at,at,0x0
+ *500970: 00a1282d daddu a1,a1,at
+ *500974: 8ca4e8c5 lw a0,-5947\(a1\)
+ *500978: 3c010002 lui at,0x2
+ *50097c: 3c050067 lui a1,0x67
+ *500980: 2421a5a5 addiu at,at,-23131
+ *500984: 0001083c dsll32 at,at,0x0
+ *500988: 00a1282d daddu a1,a1,at
+ *50098c: 8ca4e8c9 lw a0,-5943\(a1\)
+ *500990: 3c010002 lui at,0x2
+ *500994: 3c050067 lui a1,0x67
+ *500998: 2421a5a5 addiu at,at,-23131
+ *50099c: 0001083c dsll32 at,at,0x0
+ *5009a0: 00a1282d daddu a1,a1,at
+ *5009a4: 8ca4e8d5 lw a0,-5931\(a1\)
+ *5009a8: 3c010002 lui at,0x2
+ *5009ac: 3c050067 lui a1,0x67
+ *5009b0: 2421a5a5 addiu at,at,-23131
+ *5009b4: 0001083c dsll32 at,at,0x0
+ *5009b8: 00a1282d daddu a1,a1,at
+ *5009bc: 8ca4ecc5 lw a0,-4923\(a1\)
+ *5009c0: 3c010002 lui at,0x2
+ *5009c4: 3c050078 lui a1,0x78
+ *5009c8: 2421a5a5 addiu at,at,-23131
+ *5009cc: 0001083c dsll32 at,at,0x0
+ *5009d0: 00a1282d daddu a1,a1,at
+ *5009d4: 8ca4fdc5 lw a0,-571\(a1\)
+ *5009d8: 3c010002 lui at,0x2
+ *5009dc: 3c050078 lui a1,0x78
+ *5009e0: 2421a5a5 addiu at,at,-23131
+ *5009e4: 0001083c dsll32 at,at,0x0
+ *5009e8: 00a1282d daddu a1,a1,at
+ *5009ec: 8ca401ad lw a0,429\(a1\)
+ *5009f0: 3c010002 lui at,0x2
+ *5009f4: 3c050078 lui a1,0x78
+ *5009f8: 2421a5a5 addiu at,at,-23131
+ *5009fc: 0001083c dsll32 at,at,0x0
+ *500a00: 00a1282d daddu a1,a1,at
+ *500a04: 8ca4f9d5 lw a0,-1579\(a1\)
+ *500a08: 3c010002 lui at,0x2
+ *500a0c: 3c050078 lui a1,0x78
+ *500a10: 2421a5a5 addiu at,at,-23131
+ *500a14: 0001083c dsll32 at,at,0x0
+ *500a18: 00a1282d daddu a1,a1,at
+ *500a1c: 8ca401ae lw a0,430\(a1\)
+ \.\.\.
diff --git a/ld/testsuite/ld-mips-elf/mips-hilo-srec-n32.d b/ld/testsuite/ld-mips-elf/mips-hilo-srec-n32.d
new file mode 100644
index 0000000..ccd0195
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips-hilo-srec-n32.d
@@ -0,0 +1,6 @@
+#name: R_MIPS_HI16 and R_MIPS_LO16 relocs srec n32
+#source: ../../../gas/testsuite/gas/mips/mips-hilo.s
+#source: mips-hilo.s
+#objdump: -m mips:4000 -j .sec1 -D
+#ld: --oformat=srec -Tmips-hilo.ld -e 0x500000 -N
+#dump: mips-hilo.d
diff --git a/ld/testsuite/ld-mips-elf/mips-hilo-srec-n64.d b/ld/testsuite/ld-mips-elf/mips-hilo-srec-n64.d
new file mode 100644
index 0000000..b02983e
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips-hilo-srec-n64.d
@@ -0,0 +1,6 @@
+#name: R_MIPS_HI16 and R_MIPS_LO16 relocs srec n64
+#source: ../../../gas/testsuite/gas/mips/mips-hilo-n64.s
+#source: mips-hilo.s
+#objdump: -m mips:4000 -j .sec1 -D
+#ld: --oformat=srec -Tmips-hilo.ld -e 0x500000 -N
+#dump: mips-hilo-n64.d
diff --git a/ld/testsuite/ld-mips-elf/mips-hilo-srec.d b/ld/testsuite/ld-mips-elf/mips-hilo-srec.d
new file mode 100644
index 0000000..59e5717
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips-hilo-srec.d
@@ -0,0 +1,6 @@
+#name: R_MIPS_HI16 and R_MIPS_LO16 relocs srec
+#source: ../../../gas/testsuite/gas/mips/mips-hilo.s
+#source: mips-hilo.s
+#objdump: -m mips:3000 -j .sec1 -D
+#ld: --oformat=srec -Tmips-hilo.ld -e 0x500000 -N
+#dump: mips-hilo.d
diff --git a/ld/testsuite/ld-mips-elf/mips-hilo.d b/ld/testsuite/ld-mips-elf/mips-hilo.d
new file mode 100644
index 0000000..ae19f50
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips-hilo.d
@@ -0,0 +1,228 @@
+#name: R_MIPS_HI16 and R_MIPS_LO16 relocs
+#source: ../../../gas/testsuite/gas/mips/mips-hilo.s
+#source: mips-hilo.s
+#objdump: -d
+#ld: -Tmips-hilo.ld -e 0x500000 -N
+
+.*: file format (:?elf.*mips.*|srec)
+
+Disassembly of section \.(:?text|sec1):
+
+0*500000 <[^>]*>:
+ *500000: 3c040000 lui a0,0x0
+ *500004: 24840000 addiu a0,a0,0
+ *500008: 3c040065 lui a0,0x65
+ *50000c: 24844320 addiu a0,a0,17184
+ *500010: 3c040065 lui a0,0x65
+ *500014: 24844324 addiu a0,a0,17188
+ *500018: 3c040065 lui a0,0x65
+ *50001c: 24844330 addiu a0,a0,17200
+ *500020: 3c040065 lui a0,0x65
+ *500024: 24844720 addiu a0,a0,18208
+ *500028: 3c040076 lui a0,0x76
+ *50002c: 24845820 addiu a0,a0,22560
+ *500030: 3c040076 lui a0,0x76
+ *500034: 24845c08 addiu a0,a0,23560
+ *500038: 3c040076 lui a0,0x76
+ *50003c: 24845430 addiu a0,a0,21552
+ *500040: 3c040076 lui a0,0x76
+ *500044: 24845c09 addiu a0,a0,23561
+ *500048: 3c040000 lui a0,0x0
+ *50004c: 24840001 addiu a0,a0,1
+ *500050: 3c040065 lui a0,0x65
+ *500054: 24844321 addiu a0,a0,17185
+ *500058: 3c040065 lui a0,0x65
+ *50005c: 24844325 addiu a0,a0,17189
+ *500060: 3c040065 lui a0,0x65
+ *500064: 24844331 addiu a0,a0,17201
+ *500068: 3c040065 lui a0,0x65
+ *50006c: 24844721 addiu a0,a0,18209
+ *500070: 3c040076 lui a0,0x76
+ *500074: 24845821 addiu a0,a0,22561
+ *500078: 3c040076 lui a0,0x76
+ *50007c: 24845c09 addiu a0,a0,23561
+ *500080: 3c040076 lui a0,0x76
+ *500084: 24845431 addiu a0,a0,21553
+ *500088: 3c040076 lui a0,0x76
+ *50008c: 24845c0a addiu a0,a0,23562
+ *500090: 3c040001 lui a0,0x1
+ *500094: 24848000 addiu a0,a0,-32768
+ *500098: 3c040066 lui a0,0x66
+ *50009c: 2484c320 addiu a0,a0,-15584
+ *5000a0: 3c040066 lui a0,0x66
+ *5000a4: 2484c324 addiu a0,a0,-15580
+ *5000a8: 3c040066 lui a0,0x66
+ *5000ac: 2484c330 addiu a0,a0,-15568
+ *5000b0: 3c040066 lui a0,0x66
+ *5000b4: 2484c720 addiu a0,a0,-14560
+ *5000b8: 3c040077 lui a0,0x77
+ *5000bc: 2484d820 addiu a0,a0,-10208
+ *5000c0: 3c040077 lui a0,0x77
+ *5000c4: 2484dc08 addiu a0,a0,-9208
+ *5000c8: 3c040077 lui a0,0x77
+ *5000cc: 2484d430 addiu a0,a0,-11216
+ *5000d0: 3c040077 lui a0,0x77
+ *5000d4: 2484dc09 addiu a0,a0,-9207
+ *5000d8: 3c040000 lui a0,0x0
+ *5000dc: 24848000 addiu a0,a0,-32768
+ *5000e0: 3c040065 lui a0,0x65
+ *5000e4: 2484c320 addiu a0,a0,-15584
+ *5000e8: 3c040065 lui a0,0x65
+ *5000ec: 2484c324 addiu a0,a0,-15580
+ *5000f0: 3c040065 lui a0,0x65
+ *5000f4: 2484c330 addiu a0,a0,-15568
+ *5000f8: 3c040065 lui a0,0x65
+ *5000fc: 2484c720 addiu a0,a0,-14560
+ *500100: 3c040076 lui a0,0x76
+ *500104: 2484d820 addiu a0,a0,-10208
+ *500108: 3c040076 lui a0,0x76
+ *50010c: 2484dc08 addiu a0,a0,-9208
+ *500110: 3c040076 lui a0,0x76
+ *500114: 2484d430 addiu a0,a0,-11216
+ *500118: 3c040076 lui a0,0x76
+ *50011c: 2484dc09 addiu a0,a0,-9207
+ *500120: 3c040001 lui a0,0x1
+ *500124: 24840000 addiu a0,a0,0
+ *500128: 3c040066 lui a0,0x66
+ *50012c: 24844320 addiu a0,a0,17184
+ *500130: 3c040066 lui a0,0x66
+ *500134: 24844324 addiu a0,a0,17188
+ *500138: 3c040066 lui a0,0x66
+ *50013c: 24844330 addiu a0,a0,17200
+ *500140: 3c040066 lui a0,0x66
+ *500144: 24844720 addiu a0,a0,18208
+ *500148: 3c040077 lui a0,0x77
+ *50014c: 24845820 addiu a0,a0,22560
+ *500150: 3c040077 lui a0,0x77
+ *500154: 24845c08 addiu a0,a0,23560
+ *500158: 3c040077 lui a0,0x77
+ *50015c: 24845430 addiu a0,a0,21552
+ *500160: 3c040077 lui a0,0x77
+ *500164: 24845c09 addiu a0,a0,23561
+ *500168: 3c040002 lui a0,0x2
+ *50016c: 2484a5a5 addiu a0,a0,-23131
+ *500170: 3c040067 lui a0,0x67
+ *500174: 2484e8c5 addiu a0,a0,-5947
+ *500178: 3c040067 lui a0,0x67
+ *50017c: 2484e8c9 addiu a0,a0,-5943
+ *500180: 3c040067 lui a0,0x67
+ *500184: 2484e8d5 addiu a0,a0,-5931
+ *500188: 3c040067 lui a0,0x67
+ *50018c: 2484ecc5 addiu a0,a0,-4923
+ *500190: 3c040078 lui a0,0x78
+ *500194: 2484fdc5 addiu a0,a0,-571
+ *500198: 3c040078 lui a0,0x78
+ *50019c: 248401ad addiu a0,a0,429
+ *5001a0: 3c040078 lui a0,0x78
+ *5001a4: 2484f9d5 addiu a0,a0,-1579
+ *5001a8: 3c040078 lui a0,0x78
+ *5001ac: 248401ae addiu a0,a0,430
+ *5001b0: 3c050000 lui a1,0x0
+ *5001b4: 8ca40000 lw a0,0\(a1\)
+ *5001b8: 3c050065 lui a1,0x65
+ *5001bc: 8ca44320 lw a0,17184\(a1\)
+ *5001c0: 3c050065 lui a1,0x65
+ *5001c4: 8ca44324 lw a0,17188\(a1\)
+ *5001c8: 3c050065 lui a1,0x65
+ *5001cc: 8ca44330 lw a0,17200\(a1\)
+ *5001d0: 3c050065 lui a1,0x65
+ *5001d4: 8ca44720 lw a0,18208\(a1\)
+ *5001d8: 3c050076 lui a1,0x76
+ *5001dc: 8ca45820 lw a0,22560\(a1\)
+ *5001e0: 3c050076 lui a1,0x76
+ *5001e4: 8ca45c08 lw a0,23560\(a1\)
+ *5001e8: 3c050076 lui a1,0x76
+ *5001ec: 8ca45430 lw a0,21552\(a1\)
+ *5001f0: 3c050076 lui a1,0x76
+ *5001f4: 8ca45c09 lw a0,23561\(a1\)
+ *5001f8: 3c050000 lui a1,0x0
+ *5001fc: 8ca40001 lw a0,1\(a1\)
+ *500200: 3c050065 lui a1,0x65
+ *500204: 8ca44321 lw a0,17185\(a1\)
+ *500208: 3c050065 lui a1,0x65
+ *50020c: 8ca44325 lw a0,17189\(a1\)
+ *500210: 3c050065 lui a1,0x65
+ *500214: 8ca44331 lw a0,17201\(a1\)
+ *500218: 3c050065 lui a1,0x65
+ *50021c: 8ca44721 lw a0,18209\(a1\)
+ *500220: 3c050076 lui a1,0x76
+ *500224: 8ca45821 lw a0,22561\(a1\)
+ *500228: 3c050076 lui a1,0x76
+ *50022c: 8ca45c09 lw a0,23561\(a1\)
+ *500230: 3c050076 lui a1,0x76
+ *500234: 8ca45431 lw a0,21553\(a1\)
+ *500238: 3c050076 lui a1,0x76
+ *50023c: 8ca45c0a lw a0,23562\(a1\)
+ *500240: 3c050001 lui a1,0x1
+ *500244: 8ca48000 lw a0,-32768\(a1\)
+ *500248: 3c050066 lui a1,0x66
+ *50024c: 8ca4c320 lw a0,-15584\(a1\)
+ *500250: 3c050066 lui a1,0x66
+ *500254: 8ca4c324 lw a0,-15580\(a1\)
+ *500258: 3c050066 lui a1,0x66
+ *50025c: 8ca4c330 lw a0,-15568\(a1\)
+ *500260: 3c050066 lui a1,0x66
+ *500264: 8ca4c720 lw a0,-14560\(a1\)
+ *500268: 3c050077 lui a1,0x77
+ *50026c: 8ca4d820 lw a0,-10208\(a1\)
+ *500270: 3c050077 lui a1,0x77
+ *500274: 8ca4dc08 lw a0,-9208\(a1\)
+ *500278: 3c050077 lui a1,0x77
+ *50027c: 8ca4d430 lw a0,-11216\(a1\)
+ *500280: 3c050077 lui a1,0x77
+ *500284: 8ca4dc09 lw a0,-9207\(a1\)
+ *500288: 3c050000 lui a1,0x0
+ *50028c: 8ca48000 lw a0,-32768\(a1\)
+ *500290: 3c050065 lui a1,0x65
+ *500294: 8ca4c320 lw a0,-15584\(a1\)
+ *500298: 3c050065 lui a1,0x65
+ *50029c: 8ca4c324 lw a0,-15580\(a1\)
+ *5002a0: 3c050065 lui a1,0x65
+ *5002a4: 8ca4c330 lw a0,-15568\(a1\)
+ *5002a8: 3c050065 lui a1,0x65
+ *5002ac: 8ca4c720 lw a0,-14560\(a1\)
+ *5002b0: 3c050076 lui a1,0x76
+ *5002b4: 8ca4d820 lw a0,-10208\(a1\)
+ *5002b8: 3c050076 lui a1,0x76
+ *5002bc: 8ca4dc08 lw a0,-9208\(a1\)
+ *5002c0: 3c050076 lui a1,0x76
+ *5002c4: 8ca4d430 lw a0,-11216\(a1\)
+ *5002c8: 3c050076 lui a1,0x76
+ *5002cc: 8ca4dc09 lw a0,-9207\(a1\)
+ *5002d0: 3c050001 lui a1,0x1
+ *5002d4: 8ca40000 lw a0,0\(a1\)
+ *5002d8: 3c050066 lui a1,0x66
+ *5002dc: 8ca44320 lw a0,17184\(a1\)
+ *5002e0: 3c050066 lui a1,0x66
+ *5002e4: 8ca44324 lw a0,17188\(a1\)
+ *5002e8: 3c050066 lui a1,0x66
+ *5002ec: 8ca44330 lw a0,17200\(a1\)
+ *5002f0: 3c050066 lui a1,0x66
+ *5002f4: 8ca44720 lw a0,18208\(a1\)
+ *5002f8: 3c050077 lui a1,0x77
+ *5002fc: 8ca45820 lw a0,22560\(a1\)
+ *500300: 3c050077 lui a1,0x77
+ *500304: 8ca45c08 lw a0,23560\(a1\)
+ *500308: 3c050077 lui a1,0x77
+ *50030c: 8ca45430 lw a0,21552\(a1\)
+ *500310: 3c050077 lui a1,0x77
+ *500314: 8ca45c09 lw a0,23561\(a1\)
+ *500318: 3c050002 lui a1,0x2
+ *50031c: 8ca4a5a5 lw a0,-23131\(a1\)
+ *500320: 3c050067 lui a1,0x67
+ *500324: 8ca4e8c5 lw a0,-5947\(a1\)
+ *500328: 3c050067 lui a1,0x67
+ *50032c: 8ca4e8c9 lw a0,-5943\(a1\)
+ *500330: 3c050067 lui a1,0x67
+ *500334: 8ca4e8d5 lw a0,-5931\(a1\)
+ *500338: 3c050067 lui a1,0x67
+ *50033c: 8ca4ecc5 lw a0,-4923\(a1\)
+ *500340: 3c050078 lui a1,0x78
+ *500344: 8ca4fdc5 lw a0,-571\(a1\)
+ *500348: 3c050078 lui a1,0x78
+ *50034c: 8ca401ad lw a0,429\(a1\)
+ *500350: 3c050078 lui a1,0x78
+ *500354: 8ca4f9d5 lw a0,-1579\(a1\)
+ *500358: 3c050078 lui a1,0x78
+ *50035c: 8ca401ae lw a0,430\(a1\)
+ \.\.\.
diff --git a/ld/testsuite/ld-mips-elf/mips16-hilo.ld b/ld/testsuite/ld-mips-elf/mips-hilo.ld
index 1b54352..ce13411 100644
--- a/ld/testsuite/ld-mips-elf/mips16-hilo.ld
+++ b/ld/testsuite/ld-mips-elf/mips-hilo.ld
@@ -5,8 +5,9 @@ SECTIONS
. = 0x0654320;
.data : { *(.data) }
.sdata : { *(.sdata) }
+ .MIPS.abiflags : { *(.MIPS.abiflags) }
. = 0x0765430;
.bss : { *(.bss) *(COMMON) }
- .sbss : { *(.sbss) *(.scommon) }
+ .sbss : { *(.scommon) *(.sbss) }
/DISCARD/ : { *(*) }
}
diff --git a/ld/testsuite/ld-mips-elf/mips-hilo.s b/ld/testsuite/ld-mips-elf/mips-hilo.s
new file mode 100644
index 0000000..79ac2fb
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips-hilo.s
@@ -0,0 +1,14 @@
+ .data
+ .globl big_external_data_label
+big_external_data_label:
+ .fill 1000
+
+# align section end to 16-byte boundary for easier testing on multiple targets
+ .p2align 4
+
+ .globl small_external_data_label
+small_external_data_label:
+ .fill 1
+
+# align section end to 16-byte boundary for easier testing on multiple targets
+ .p2align 4
diff --git a/ld/testsuite/ld-mips-elf/mips16-hilo-n32.d b/ld/testsuite/ld-mips-elf/mips16-hilo-n32.d
index 8d70b35..08b591c 100644
--- a/ld/testsuite/ld-mips-elf/mips16-hilo-n32.d
+++ b/ld/testsuite/ld-mips-elf/mips16-hilo-n32.d
@@ -1,337 +1,7 @@
#name: R_MIPS16_HI16 and R_MIPS16_LO16 relocs n32
#source: ../../../gas/testsuite/gas/mips/mips16-hilo.s
-#source: mips16-hilo.s
-#objdump: -mmips:16 --prefix-addresses -tdr --show-raw-insn
-#ld: -Tmips16-hilo.ld -e 0x500000 -N
-
-.*: file format elf.*mips.*
-
-#...
-
-Disassembly of section .text:
-0+500000 <[^>]*> 6c00 li a0,0
-0+500002 <[^>]*> f400 3480 sll a0,16
-0+500006 <[^>]*> 4c00 addiu a0,0
-0+500008 <[^>]*> f060 6c05 li a0,101
-0+50000c <[^>]*> f400 3480 sll a0,16
-0+500010 <[^>]*> f328 4c00 addiu a0,17184
-0+500014 <[^>]*> f060 6c05 li a0,101
-0+500018 <[^>]*> f400 3480 sll a0,16
-0+50001c <[^>]*> f328 4c04 addiu a0,17188
-0+500020 <[^>]*> f060 6c05 li a0,101
-0+500024 <[^>]*> f400 3480 sll a0,16
-0+500028 <[^>]*> f328 4c10 addiu a0,17200
-0+50002c <[^>]*> f060 6c05 li a0,101
-0+500030 <[^>]*> f400 3480 sll a0,16
-0+500034 <[^>]*> f728 4c00 addiu a0,18208
-0+500038 <[^>]*> f060 6c16 li a0,118
-0+50003c <[^>]*> f400 3480 sll a0,16
-0+500040 <[^>]*> f02b 4c00 addiu a0,22560
-0+500044 <[^>]*> f060 6c16 li a0,118
-0+500048 <[^>]*> f400 3480 sll a0,16
-0+50004c <[^>]*> f40b 4c09 addiu a0,23561
-0+500050 <[^>]*> f060 6c16 li a0,118
-0+500054 <[^>]*> f400 3480 sll a0,16
-0+500058 <[^>]*> f42a 4c10 addiu a0,21552
-0+50005c <[^>]*> f060 6c16 li a0,118
-0+500060 <[^>]*> f400 3480 sll a0,16
-0+500064 <[^>]*> f40b 4c08 addiu a0,23560
-0+500068 <[^>]*> 6c00 li a0,0
-0+50006a <[^>]*> f400 3480 sll a0,16
-0+50006e <[^>]*> 4c01 addiu a0,1
-0+500070 <[^>]*> f060 6c05 li a0,101
-0+500074 <[^>]*> f400 3480 sll a0,16
-0+500078 <[^>]*> f328 4c01 addiu a0,17185
-0+50007c <[^>]*> f060 6c05 li a0,101
-0+500080 <[^>]*> f400 3480 sll a0,16
-0+500084 <[^>]*> f328 4c05 addiu a0,17189
-0+500088 <[^>]*> f060 6c05 li a0,101
-0+50008c <[^>]*> f400 3480 sll a0,16
-0+500090 <[^>]*> f328 4c11 addiu a0,17201
-0+500094 <[^>]*> f060 6c05 li a0,101
-0+500098 <[^>]*> f400 3480 sll a0,16
-0+50009c <[^>]*> f728 4c01 addiu a0,18209
-0+5000a0 <[^>]*> f060 6c16 li a0,118
-0+5000a4 <[^>]*> f400 3480 sll a0,16
-0+5000a8 <[^>]*> f02b 4c01 addiu a0,22561
-0+5000ac <[^>]*> f060 6c16 li a0,118
-0+5000b0 <[^>]*> f400 3480 sll a0,16
-0+5000b4 <[^>]*> f40b 4c0a addiu a0,23562
-0+5000b8 <[^>]*> f060 6c16 li a0,118
-0+5000bc <[^>]*> f400 3480 sll a0,16
-0+5000c0 <[^>]*> f42a 4c11 addiu a0,21553
-0+5000c4 <[^>]*> f060 6c16 li a0,118
-0+5000c8 <[^>]*> f400 3480 sll a0,16
-0+5000cc <[^>]*> f40b 4c09 addiu a0,23561
-0+5000d0 <[^>]*> 6c01 li a0,1
-0+5000d2 <[^>]*> f400 3480 sll a0,16
-0+5000d6 <[^>]*> f010 4c00 addiu a0,-32768
-0+5000da <[^>]*> f060 6c06 li a0,102
-0+5000de <[^>]*> f400 3480 sll a0,16
-0+5000e2 <[^>]*> f338 4c00 addiu a0,-15584
-0+5000e6 <[^>]*> f060 6c06 li a0,102
-0+5000ea <[^>]*> f400 3480 sll a0,16
-0+5000ee <[^>]*> f338 4c04 addiu a0,-15580
-0+5000f2 <[^>]*> f060 6c06 li a0,102
-0+5000f6 <[^>]*> f400 3480 sll a0,16
-0+5000fa <[^>]*> f338 4c10 addiu a0,-15568
-0+5000fe <[^>]*> f060 6c06 li a0,102
-0+500102 <[^>]*> f400 3480 sll a0,16
-0+500106 <[^>]*> f738 4c00 addiu a0,-14560
-0+50010a <[^>]*> f060 6c17 li a0,119
-0+50010e <[^>]*> f400 3480 sll a0,16
-0+500112 <[^>]*> f03b 4c00 addiu a0,-10208
-0+500116 <[^>]*> f060 6c17 li a0,119
-0+50011a <[^>]*> f400 3480 sll a0,16
-0+50011e <[^>]*> f41b 4c09 addiu a0,-9207
-0+500122 <[^>]*> f060 6c17 li a0,119
-0+500126 <[^>]*> f400 3480 sll a0,16
-0+50012a <[^>]*> f43a 4c10 addiu a0,-11216
-0+50012e <[^>]*> f060 6c17 li a0,119
-0+500132 <[^>]*> f400 3480 sll a0,16
-0+500136 <[^>]*> f41b 4c08 addiu a0,-9208
-0+50013a <[^>]*> 6c00 li a0,0
-0+50013c <[^>]*> f400 3480 sll a0,16
-0+500140 <[^>]*> f010 4c00 addiu a0,-32768
-0+500144 <[^>]*> f060 6c05 li a0,101
-0+500148 <[^>]*> f400 3480 sll a0,16
-0+50014c <[^>]*> f338 4c00 addiu a0,-15584
-0+500150 <[^>]*> f060 6c05 li a0,101
-0+500154 <[^>]*> f400 3480 sll a0,16
-0+500158 <[^>]*> f338 4c04 addiu a0,-15580
-0+50015c <[^>]*> f060 6c05 li a0,101
-0+500160 <[^>]*> f400 3480 sll a0,16
-0+500164 <[^>]*> f338 4c10 addiu a0,-15568
-0+500168 <[^>]*> f060 6c05 li a0,101
-0+50016c <[^>]*> f400 3480 sll a0,16
-0+500170 <[^>]*> f738 4c00 addiu a0,-14560
-0+500174 <[^>]*> f060 6c16 li a0,118
-0+500178 <[^>]*> f400 3480 sll a0,16
-0+50017c <[^>]*> f03b 4c00 addiu a0,-10208
-0+500180 <[^>]*> f060 6c16 li a0,118
-0+500184 <[^>]*> f400 3480 sll a0,16
-0+500188 <[^>]*> f41b 4c09 addiu a0,-9207
-0+50018c <[^>]*> f060 6c16 li a0,118
-0+500190 <[^>]*> f400 3480 sll a0,16
-0+500194 <[^>]*> f43a 4c10 addiu a0,-11216
-0+500198 <[^>]*> f060 6c16 li a0,118
-0+50019c <[^>]*> f400 3480 sll a0,16
-0+5001a0 <[^>]*> f41b 4c08 addiu a0,-9208
-0+5001a4 <[^>]*> 6c01 li a0,1
-0+5001a6 <[^>]*> f400 3480 sll a0,16
-0+5001aa <[^>]*> 4c00 addiu a0,0
-0+5001ac <[^>]*> f060 6c06 li a0,102
-0+5001b0 <[^>]*> f400 3480 sll a0,16
-0+5001b4 <[^>]*> f328 4c00 addiu a0,17184
-0+5001b8 <[^>]*> f060 6c06 li a0,102
-0+5001bc <[^>]*> f400 3480 sll a0,16
-0+5001c0 <[^>]*> f328 4c04 addiu a0,17188
-0+5001c4 <[^>]*> f060 6c06 li a0,102
-0+5001c8 <[^>]*> f400 3480 sll a0,16
-0+5001cc <[^>]*> f328 4c10 addiu a0,17200
-0+5001d0 <[^>]*> f060 6c06 li a0,102
-0+5001d4 <[^>]*> f400 3480 sll a0,16
-0+5001d8 <[^>]*> f728 4c00 addiu a0,18208
-0+5001dc <[^>]*> f060 6c17 li a0,119
-0+5001e0 <[^>]*> f400 3480 sll a0,16
-0+5001e4 <[^>]*> f02b 4c00 addiu a0,22560
-0+5001e8 <[^>]*> f060 6c17 li a0,119
-0+5001ec <[^>]*> f400 3480 sll a0,16
-0+5001f0 <[^>]*> f40b 4c09 addiu a0,23561
-0+5001f4 <[^>]*> f060 6c17 li a0,119
-0+5001f8 <[^>]*> f400 3480 sll a0,16
-0+5001fc <[^>]*> f42a 4c10 addiu a0,21552
-0+500200 <[^>]*> f060 6c17 li a0,119
-0+500204 <[^>]*> f400 3480 sll a0,16
-0+500208 <[^>]*> f40b 4c08 addiu a0,23560
-0+50020c <[^>]*> 6c02 li a0,2
-0+50020e <[^>]*> f400 3480 sll a0,16
-0+500212 <[^>]*> f5b4 4c05 addiu a0,-23131
-0+500216 <[^>]*> f060 6c07 li a0,103
-0+50021a <[^>]*> f400 3480 sll a0,16
-0+50021e <[^>]*> f0dd 4c05 addiu a0,-5947
-0+500222 <[^>]*> f060 6c07 li a0,103
-0+500226 <[^>]*> f400 3480 sll a0,16
-0+50022a <[^>]*> f0dd 4c09 addiu a0,-5943
-0+50022e <[^>]*> f060 6c07 li a0,103
-0+500232 <[^>]*> f400 3480 sll a0,16
-0+500236 <[^>]*> f0dd 4c15 addiu a0,-5931
-0+50023a <[^>]*> f060 6c07 li a0,103
-0+50023e <[^>]*> f400 3480 sll a0,16
-0+500242 <[^>]*> f4dd 4c05 addiu a0,-4923
-0+500246 <[^>]*> f060 6c18 li a0,120
-0+50024a <[^>]*> f400 3480 sll a0,16
-0+50024e <[^>]*> f5df 4c05 addiu a0,-571
-0+500252 <[^>]*> f060 6c18 li a0,120
-0+500256 <[^>]*> f400 3480 sll a0,16
-0+50025a <[^>]*> f1a0 4c0e addiu a0,430
-0+50025e <[^>]*> f060 6c18 li a0,120
-0+500262 <[^>]*> f400 3480 sll a0,16
-0+500266 <[^>]*> f1df 4c15 addiu a0,-1579
-0+50026a <[^>]*> f060 6c18 li a0,120
-0+50026e <[^>]*> f400 3480 sll a0,16
-0+500272 <[^>]*> f1a0 4c0d addiu a0,429
-0+500276 <[^>]*> 6d00 li a1,0
-0+500278 <[^>]*> f400 35a0 sll a1,16
-0+50027c <[^>]*> 9d80 lw a0,0\(a1\)
-0+50027e <[^>]*> f060 6d05 li a1,101
-0+500282 <[^>]*> f400 35a0 sll a1,16
-0+500286 <[^>]*> f060 9d85 lw a0,101\(a1\)
-0+50028a <[^>]*> f060 6d05 li a1,101
-0+50028e <[^>]*> f400 35a0 sll a1,16
-0+500292 <[^>]*> f060 9d85 lw a0,101\(a1\)
-0+500296 <[^>]*> f060 6d05 li a1,101
-0+50029a <[^>]*> f400 35a0 sll a1,16
-0+50029e <[^>]*> f328 9d90 lw a0,17200\(a1\)
-0+5002a2 <[^>]*> f060 6d05 li a1,101
-0+5002a6 <[^>]*> f400 35a0 sll a1,16
-0+5002aa <[^>]*> f728 9d80 lw a0,18208\(a1\)
-0+5002ae <[^>]*> f060 6d16 li a1,118
-0+5002b2 <[^>]*> f400 35a0 sll a1,16
-0+5002b6 <[^>]*> f02b 9d80 lw a0,22560\(a1\)
-0+5002ba <[^>]*> f060 6d16 li a1,118
-0+5002be <[^>]*> f400 35a0 sll a1,16
-0+5002c2 <[^>]*> f40b 9d89 lw a0,23561\(a1\)
-0+5002c6 <[^>]*> f060 6d16 li a1,118
-0+5002ca <[^>]*> f400 35a0 sll a1,16
-0+5002ce <[^>]*> f42a 9d90 lw a0,21552\(a1\)
-0+5002d2 <[^>]*> f060 6d16 li a1,118
-0+5002d6 <[^>]*> f400 35a0 sll a1,16
-0+5002da <[^>]*> f40b 9d88 lw a0,23560\(a1\)
-0+5002de <[^>]*> 6d00 li a1,0
-0+5002e0 <[^>]*> f400 35a0 sll a1,16
-0+5002e4 <[^>]*> f000 9d81 lw a0,1\(a1\)
-0+5002e8 <[^>]*> f060 6d05 li a1,101
-0+5002ec <[^>]*> f400 35a0 sll a1,16
-0+5002f0 <[^>]*> f328 9d81 lw a0,17185\(a1\)
-0+5002f4 <[^>]*> f060 6d05 li a1,101
-0+5002f8 <[^>]*> f400 35a0 sll a1,16
-0+5002fc <[^>]*> f328 9d85 lw a0,17189\(a1\)
-0+500300 <[^>]*> f060 6d05 li a1,101
-0+500304 <[^>]*> f400 35a0 sll a1,16
-0+500308 <[^>]*> f328 9d91 lw a0,17201\(a1\)
-0+50030c <[^>]*> f060 6d05 li a1,101
-0+500310 <[^>]*> f400 35a0 sll a1,16
-0+500314 <[^>]*> f728 9d81 lw a0,18209\(a1\)
-0+500318 <[^>]*> f060 6d16 li a1,118
-0+50031c <[^>]*> f400 35a0 sll a1,16
-0+500320 <[^>]*> f02b 9d81 lw a0,22561\(a1\)
-0+500324 <[^>]*> f060 6d16 li a1,118
-0+500328 <[^>]*> f400 35a0 sll a1,16
-0+50032c <[^>]*> f40b 9d8a lw a0,23562\(a1\)
-0+500330 <[^>]*> f060 6d16 li a1,118
-0+500334 <[^>]*> f400 35a0 sll a1,16
-0+500338 <[^>]*> f42a 9d91 lw a0,21553\(a1\)
-0+50033c <[^>]*> f060 6d16 li a1,118
-0+500340 <[^>]*> f400 35a0 sll a1,16
-0+500344 <[^>]*> f40b 9d89 lw a0,23561\(a1\)
-0+500348 <[^>]*> 6d01 li a1,1
-0+50034a <[^>]*> f400 35a0 sll a1,16
-0+50034e <[^>]*> f010 9d80 lw a0,-32768\(a1\)
-0+500352 <[^>]*> f060 6d06 li a1,102
-0+500356 <[^>]*> f400 35a0 sll a1,16
-0+50035a <[^>]*> f338 9d80 lw a0,-15584\(a1\)
-0+50035e <[^>]*> f060 6d06 li a1,102
-0+500362 <[^>]*> f400 35a0 sll a1,16
-0+500366 <[^>]*> f338 9d84 lw a0,-15580\(a1\)
-0+50036a <[^>]*> f060 6d06 li a1,102
-0+50036e <[^>]*> f400 35a0 sll a1,16
-0+500372 <[^>]*> f338 9d90 lw a0,-15568\(a1\)
-0+500376 <[^>]*> f060 6d06 li a1,102
-0+50037a <[^>]*> f400 35a0 sll a1,16
-0+50037e <[^>]*> f738 9d80 lw a0,-14560\(a1\)
-0+500382 <[^>]*> f060 6d17 li a1,119
-0+500386 <[^>]*> f400 35a0 sll a1,16
-0+50038a <[^>]*> f03b 9d80 lw a0,-10208\(a1\)
-0+50038e <[^>]*> f060 6d17 li a1,119
-0+500392 <[^>]*> f400 35a0 sll a1,16
-0+500396 <[^>]*> f41b 9d89 lw a0,-9207\(a1\)
-0+50039a <[^>]*> f060 6d17 li a1,119
-0+50039e <[^>]*> f400 35a0 sll a1,16
-0+5003a2 <[^>]*> f43a 9d90 lw a0,-11216\(a1\)
-0+5003a6 <[^>]*> f060 6d17 li a1,119
-0+5003aa <[^>]*> f400 35a0 sll a1,16
-0+5003ae <[^>]*> f41b 9d88 lw a0,-9208\(a1\)
-0+5003b2 <[^>]*> 6d00 li a1,0
-0+5003b4 <[^>]*> f400 35a0 sll a1,16
-0+5003b8 <[^>]*> f010 9d80 lw a0,-32768\(a1\)
-0+5003bc <[^>]*> f060 6d05 li a1,101
-0+5003c0 <[^>]*> f400 35a0 sll a1,16
-0+5003c4 <[^>]*> f338 9d80 lw a0,-15584\(a1\)
-0+5003c8 <[^>]*> f060 6d05 li a1,101
-0+5003cc <[^>]*> f400 35a0 sll a1,16
-0+5003d0 <[^>]*> f338 9d84 lw a0,-15580\(a1\)
-0+5003d4 <[^>]*> f060 6d05 li a1,101
-0+5003d8 <[^>]*> f400 35a0 sll a1,16
-0+5003dc <[^>]*> f338 9d90 lw a0,-15568\(a1\)
-0+5003e0 <[^>]*> f060 6d05 li a1,101
-0+5003e4 <[^>]*> f400 35a0 sll a1,16
-0+5003e8 <[^>]*> f738 9d80 lw a0,-14560\(a1\)
-0+5003ec <[^>]*> f060 6d16 li a1,118
-0+5003f0 <[^>]*> f400 35a0 sll a1,16
-0+5003f4 <[^>]*> f03b 9d80 lw a0,-10208\(a1\)
-0+5003f8 <[^>]*> f060 6d16 li a1,118
-0+5003fc <[^>]*> f400 35a0 sll a1,16
-0+500400 <[^>]*> f41b 9d89 lw a0,-9207\(a1\)
-0+500404 <[^>]*> f060 6d16 li a1,118
-0+500408 <[^>]*> f400 35a0 sll a1,16
-0+50040c <[^>]*> f43a 9d90 lw a0,-11216\(a1\)
-0+500410 <[^>]*> f060 6d16 li a1,118
-0+500414 <[^>]*> f400 35a0 sll a1,16
-0+500418 <[^>]*> f41b 9d88 lw a0,-9208\(a1\)
-0+50041c <[^>]*> 6d01 li a1,1
-0+50041e <[^>]*> f400 35a0 sll a1,16
-0+500422 <[^>]*> 9d80 lw a0,0\(a1\)
-0+500424 <[^>]*> f060 6d06 li a1,102
-0+500428 <[^>]*> f400 35a0 sll a1,16
-0+50042c <[^>]*> f328 9d80 lw a0,17184\(a1\)
-0+500430 <[^>]*> f060 6d06 li a1,102
-0+500434 <[^>]*> f400 35a0 sll a1,16
-0+500438 <[^>]*> f328 9d84 lw a0,17188\(a1\)
-0+50043c <[^>]*> f060 6d06 li a1,102
-0+500440 <[^>]*> f400 35a0 sll a1,16
-0+500444 <[^>]*> f328 9d90 lw a0,17200\(a1\)
-0+500448 <[^>]*> f060 6d06 li a1,102
-0+50044c <[^>]*> f400 35a0 sll a1,16
-0+500450 <[^>]*> f728 9d80 lw a0,18208\(a1\)
-0+500454 <[^>]*> f060 6d17 li a1,119
-0+500458 <[^>]*> f400 35a0 sll a1,16
-0+50045c <[^>]*> f02b 9d80 lw a0,22560\(a1\)
-0+500460 <[^>]*> f060 6d17 li a1,119
-0+500464 <[^>]*> f400 35a0 sll a1,16
-0+500468 <[^>]*> f40b 9d89 lw a0,23561\(a1\)
-0+50046c <[^>]*> f060 6d17 li a1,119
-0+500470 <[^>]*> f400 35a0 sll a1,16
-0+500474 <[^>]*> f42a 9d90 lw a0,21552\(a1\)
-0+500478 <[^>]*> f060 6d17 li a1,119
-0+50047c <[^>]*> f400 35a0 sll a1,16
-0+500480 <[^>]*> f40b 9d88 lw a0,23560\(a1\)
-0+500484 <[^>]*> 6d02 li a1,2
-0+500486 <[^>]*> f400 35a0 sll a1,16
-0+50048a <[^>]*> f5b4 9d85 lw a0,-23131\(a1\)
-0+50048e <[^>]*> f060 6d07 li a1,103
-0+500492 <[^>]*> f400 35a0 sll a1,16
-0+500496 <[^>]*> f0dd 9d85 lw a0,-5947\(a1\)
-0+50049a <[^>]*> f060 6d07 li a1,103
-0+50049e <[^>]*> f400 35a0 sll a1,16
-0+5004a2 <[^>]*> f0dd 9d89 lw a0,-5943\(a1\)
-0+5004a6 <[^>]*> f060 6d07 li a1,103
-0+5004aa <[^>]*> f400 35a0 sll a1,16
-0+5004ae <[^>]*> f0dd 9d95 lw a0,-5931\(a1\)
-0+5004b2 <[^>]*> f060 6d07 li a1,103
-0+5004b6 <[^>]*> f400 35a0 sll a1,16
-0+5004ba <[^>]*> f4dd 9d85 lw a0,-4923\(a1\)
-0+5004be <[^>]*> f060 6d18 li a1,120
-0+5004c2 <[^>]*> f400 35a0 sll a1,16
-0+5004c6 <[^>]*> f5df 9d85 lw a0,-571\(a1\)
-0+5004ca <[^>]*> f060 6d18 li a1,120
-0+5004ce <[^>]*> f400 35a0 sll a1,16
-0+5004d2 <[^>]*> f1a0 9d8e lw a0,430\(a1\)
-0+5004d6 <[^>]*> f060 6d18 li a1,120
-0+5004da <[^>]*> f400 35a0 sll a1,16
-0+5004de <[^>]*> f1df 9d95 lw a0,-1579\(a1\)
-0+5004e2 <[^>]*> f060 6d18 li a1,120
-0+5004e6 <[^>]*> f400 35a0 sll a1,16
-0+5004ea <[^>]*> f1a0 9d8d lw a0,429\(a1\)
-0+5004ee <[^>]*> 6500 nop
-#pass
+#source: mips-hilo.s
+#as: -march=mips3
+#objdump: -mmips:16 -dr
+#ld: -Tmips-hilo.ld -e 0x500000 -N
+#dump: mips16-hilo.d
diff --git a/ld/testsuite/ld-mips-elf/mips16-hilo-srec-n32.d b/ld/testsuite/ld-mips-elf/mips16-hilo-srec-n32.d
new file mode 100644
index 0000000..724adcb
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16-hilo-srec-n32.d
@@ -0,0 +1,7 @@
+#name: R_MIPS16_HI16 and R_MIPS16_LO16 relocs srec n32
+#source: ../../../gas/testsuite/gas/mips/mips16-hilo.s
+#source: mips-hilo.s
+#as: -march=mips3
+#objdump: -mmips:16 -j .sec1 -D
+#ld: --oformat=srec -Tmips-hilo.ld -e 0x500000 -N
+#dump: mips16-hilo.d
diff --git a/ld/testsuite/ld-mips-elf/mips16-hilo-srec.d b/ld/testsuite/ld-mips-elf/mips16-hilo-srec.d
new file mode 100644
index 0000000..9c41d9a
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16-hilo-srec.d
@@ -0,0 +1,7 @@
+#name: R_MIPS16_HI16 and R_MIPS16_LO16 relocs srec
+#source: ../../../gas/testsuite/gas/mips/mips16-hilo.s
+#source: mips-hilo.s
+#as: -march=mips1
+#objdump: -mmips:16 -j .sec1 -D
+#ld: --oformat=srec -Tmips-hilo.ld -e 0x500000 -N
+#dump: mips16-hilo.d
diff --git a/ld/testsuite/ld-mips-elf/mips16-hilo.d b/ld/testsuite/ld-mips-elf/mips16-hilo.d
index 5600983..1f01ca2 100644
--- a/ld/testsuite/ld-mips-elf/mips16-hilo.d
+++ b/ld/testsuite/ld-mips-elf/mips16-hilo.d
@@ -1,337 +1,338 @@
#name: R_MIPS16_HI16 and R_MIPS16_LO16 relocs
#source: ../../../gas/testsuite/gas/mips/mips16-hilo.s
-#source: mips16-hilo.s
-#objdump: -mmips:16 --prefix-addresses -tdr --show-raw-insn
-#ld: -Tmips16-hilo.ld -e 0x500000 -N
+#source: mips-hilo.s
+#as: -march=mips1
+#objdump: -mmips:16 -dr
+#ld: -Tmips-hilo.ld -e 0x500000 -N
-.*: file format elf.*mips.*
+.*: file format (:?elf.*mips.*|srec)
-#...
+Disassembly of section \.(:?text|sec1):
-Disassembly of section .text:
-0+500000 <[^>]*> 6c00 li a0,0
-0+500002 <[^>]*> f400 3480 sll a0,16
-0+500006 <[^>]*> 4c00 addiu a0,0
-0+500008 <[^>]*> f060 6c05 li a0,101
-0+50000c <[^>]*> f400 3480 sll a0,16
-0+500010 <[^>]*> f328 4c00 addiu a0,17184
-0+500014 <[^>]*> f060 6c05 li a0,101
-0+500018 <[^>]*> f400 3480 sll a0,16
-0+50001c <[^>]*> f328 4c04 addiu a0,17188
-0+500020 <[^>]*> f060 6c05 li a0,101
-0+500024 <[^>]*> f400 3480 sll a0,16
-0+500028 <[^>]*> f328 4c10 addiu a0,17200
-0+50002c <[^>]*> f060 6c05 li a0,101
-0+500030 <[^>]*> f400 3480 sll a0,16
-0+500034 <[^>]*> f728 4c00 addiu a0,18208
-0+500038 <[^>]*> f060 6c16 li a0,118
-0+50003c <[^>]*> f400 3480 sll a0,16
-0+500040 <[^>]*> f02b 4c00 addiu a0,22560
-0+500044 <[^>]*> f060 6c16 li a0,118
-0+500048 <[^>]*> f400 3480 sll a0,16
-0+50004c <[^>]*> f40b 4c09 addiu a0,23561
-0+500050 <[^>]*> f060 6c16 li a0,118
-0+500054 <[^>]*> f400 3480 sll a0,16
-0+500058 <[^>]*> f42a 4c10 addiu a0,21552
-0+50005c <[^>]*> f060 6c16 li a0,118
-0+500060 <[^>]*> f400 3480 sll a0,16
-0+500064 <[^>]*> f40b 4c08 addiu a0,23560
-0+500068 <[^>]*> 6c00 li a0,0
-0+50006a <[^>]*> f400 3480 sll a0,16
-0+50006e <[^>]*> 4c01 addiu a0,1
-0+500070 <[^>]*> f060 6c05 li a0,101
-0+500074 <[^>]*> f400 3480 sll a0,16
-0+500078 <[^>]*> f328 4c01 addiu a0,17185
-0+50007c <[^>]*> f060 6c05 li a0,101
-0+500080 <[^>]*> f400 3480 sll a0,16
-0+500084 <[^>]*> f328 4c05 addiu a0,17189
-0+500088 <[^>]*> f060 6c05 li a0,101
-0+50008c <[^>]*> f400 3480 sll a0,16
-0+500090 <[^>]*> f328 4c11 addiu a0,17201
-0+500094 <[^>]*> f060 6c05 li a0,101
-0+500098 <[^>]*> f400 3480 sll a0,16
-0+50009c <[^>]*> f728 4c01 addiu a0,18209
-0+5000a0 <[^>]*> f060 6c16 li a0,118
-0+5000a4 <[^>]*> f400 3480 sll a0,16
-0+5000a8 <[^>]*> f02b 4c01 addiu a0,22561
-0+5000ac <[^>]*> f060 6c16 li a0,118
-0+5000b0 <[^>]*> f400 3480 sll a0,16
-0+5000b4 <[^>]*> f40b 4c0a addiu a0,23562
-0+5000b8 <[^>]*> f060 6c16 li a0,118
-0+5000bc <[^>]*> f400 3480 sll a0,16
-0+5000c0 <[^>]*> f42a 4c11 addiu a0,21553
-0+5000c4 <[^>]*> f060 6c16 li a0,118
-0+5000c8 <[^>]*> f400 3480 sll a0,16
-0+5000cc <[^>]*> f40b 4c09 addiu a0,23561
-0+5000d0 <[^>]*> 6c01 li a0,1
-0+5000d2 <[^>]*> f400 3480 sll a0,16
-0+5000d6 <[^>]*> f010 4c00 addiu a0,-32768
-0+5000da <[^>]*> f060 6c06 li a0,102
-0+5000de <[^>]*> f400 3480 sll a0,16
-0+5000e2 <[^>]*> f338 4c00 addiu a0,-15584
-0+5000e6 <[^>]*> f060 6c06 li a0,102
-0+5000ea <[^>]*> f400 3480 sll a0,16
-0+5000ee <[^>]*> f338 4c04 addiu a0,-15580
-0+5000f2 <[^>]*> f060 6c06 li a0,102
-0+5000f6 <[^>]*> f400 3480 sll a0,16
-0+5000fa <[^>]*> f338 4c10 addiu a0,-15568
-0+5000fe <[^>]*> f060 6c06 li a0,102
-0+500102 <[^>]*> f400 3480 sll a0,16
-0+500106 <[^>]*> f738 4c00 addiu a0,-14560
-0+50010a <[^>]*> f060 6c17 li a0,119
-0+50010e <[^>]*> f400 3480 sll a0,16
-0+500112 <[^>]*> f03b 4c00 addiu a0,-10208
-0+500116 <[^>]*> f060 6c17 li a0,119
-0+50011a <[^>]*> f400 3480 sll a0,16
-0+50011e <[^>]*> f41b 4c09 addiu a0,-9207
-0+500122 <[^>]*> f060 6c17 li a0,119
-0+500126 <[^>]*> f400 3480 sll a0,16
-0+50012a <[^>]*> f43a 4c10 addiu a0,-11216
-0+50012e <[^>]*> f060 6c17 li a0,119
-0+500132 <[^>]*> f400 3480 sll a0,16
-0+500136 <[^>]*> f41b 4c08 addiu a0,-9208
-0+50013a <[^>]*> 6c00 li a0,0
-0+50013c <[^>]*> f400 3480 sll a0,16
-0+500140 <[^>]*> f010 4c00 addiu a0,-32768
-0+500144 <[^>]*> f060 6c05 li a0,101
-0+500148 <[^>]*> f400 3480 sll a0,16
-0+50014c <[^>]*> f338 4c00 addiu a0,-15584
-0+500150 <[^>]*> f060 6c05 li a0,101
-0+500154 <[^>]*> f400 3480 sll a0,16
-0+500158 <[^>]*> f338 4c04 addiu a0,-15580
-0+50015c <[^>]*> f060 6c05 li a0,101
-0+500160 <[^>]*> f400 3480 sll a0,16
-0+500164 <[^>]*> f338 4c10 addiu a0,-15568
-0+500168 <[^>]*> f060 6c05 li a0,101
-0+50016c <[^>]*> f400 3480 sll a0,16
-0+500170 <[^>]*> f738 4c00 addiu a0,-14560
-0+500174 <[^>]*> f060 6c16 li a0,118
-0+500178 <[^>]*> f400 3480 sll a0,16
-0+50017c <[^>]*> f03b 4c00 addiu a0,-10208
-0+500180 <[^>]*> f060 6c16 li a0,118
-0+500184 <[^>]*> f400 3480 sll a0,16
-0+500188 <[^>]*> f41b 4c09 addiu a0,-9207
-0+50018c <[^>]*> f060 6c16 li a0,118
-0+500190 <[^>]*> f400 3480 sll a0,16
-0+500194 <[^>]*> f43a 4c10 addiu a0,-11216
-0+500198 <[^>]*> f060 6c16 li a0,118
-0+50019c <[^>]*> f400 3480 sll a0,16
-0+5001a0 <[^>]*> f41b 4c08 addiu a0,-9208
-0+5001a4 <[^>]*> 6c01 li a0,1
-0+5001a6 <[^>]*> f400 3480 sll a0,16
-0+5001aa <[^>]*> 4c00 addiu a0,0
-0+5001ac <[^>]*> f060 6c06 li a0,102
-0+5001b0 <[^>]*> f400 3480 sll a0,16
-0+5001b4 <[^>]*> f328 4c00 addiu a0,17184
-0+5001b8 <[^>]*> f060 6c06 li a0,102
-0+5001bc <[^>]*> f400 3480 sll a0,16
-0+5001c0 <[^>]*> f328 4c04 addiu a0,17188
-0+5001c4 <[^>]*> f060 6c06 li a0,102
-0+5001c8 <[^>]*> f400 3480 sll a0,16
-0+5001cc <[^>]*> f328 4c10 addiu a0,17200
-0+5001d0 <[^>]*> f060 6c06 li a0,102
-0+5001d4 <[^>]*> f400 3480 sll a0,16
-0+5001d8 <[^>]*> f728 4c00 addiu a0,18208
-0+5001dc <[^>]*> f060 6c17 li a0,119
-0+5001e0 <[^>]*> f400 3480 sll a0,16
-0+5001e4 <[^>]*> f02b 4c00 addiu a0,22560
-0+5001e8 <[^>]*> f060 6c17 li a0,119
-0+5001ec <[^>]*> f400 3480 sll a0,16
-0+5001f0 <[^>]*> f40b 4c09 addiu a0,23561
-0+5001f4 <[^>]*> f060 6c17 li a0,119
-0+5001f8 <[^>]*> f400 3480 sll a0,16
-0+5001fc <[^>]*> f42a 4c10 addiu a0,21552
-0+500200 <[^>]*> f060 6c17 li a0,119
-0+500204 <[^>]*> f400 3480 sll a0,16
-0+500208 <[^>]*> f40b 4c08 addiu a0,23560
-0+50020c <[^>]*> 6c02 li a0,2
-0+50020e <[^>]*> f400 3480 sll a0,16
-0+500212 <[^>]*> f5b4 4c05 addiu a0,-23131
-0+500216 <[^>]*> f060 6c07 li a0,103
-0+50021a <[^>]*> f400 3480 sll a0,16
-0+50021e <[^>]*> f0dd 4c05 addiu a0,-5947
-0+500222 <[^>]*> f060 6c07 li a0,103
-0+500226 <[^>]*> f400 3480 sll a0,16
-0+50022a <[^>]*> f0dd 4c09 addiu a0,-5943
-0+50022e <[^>]*> f060 6c07 li a0,103
-0+500232 <[^>]*> f400 3480 sll a0,16
-0+500236 <[^>]*> f0dd 4c15 addiu a0,-5931
-0+50023a <[^>]*> f060 6c07 li a0,103
-0+50023e <[^>]*> f400 3480 sll a0,16
-0+500242 <[^>]*> f4dd 4c05 addiu a0,-4923
-0+500246 <[^>]*> f060 6c18 li a0,120
-0+50024a <[^>]*> f400 3480 sll a0,16
-0+50024e <[^>]*> f5df 4c05 addiu a0,-571
-0+500252 <[^>]*> f060 6c18 li a0,120
-0+500256 <[^>]*> f400 3480 sll a0,16
-0+50025a <[^>]*> f1a0 4c0e addiu a0,430
-0+50025e <[^>]*> f060 6c18 li a0,120
-0+500262 <[^>]*> f400 3480 sll a0,16
-0+500266 <[^>]*> f1df 4c15 addiu a0,-1579
-0+50026a <[^>]*> f060 6c18 li a0,120
-0+50026e <[^>]*> f400 3480 sll a0,16
-0+500272 <[^>]*> f1a0 4c0d addiu a0,429
-0+500276 <[^>]*> 6d00 li a1,0
-0+500278 <[^>]*> f400 35a0 sll a1,16
-0+50027c <[^>]*> 9d80 lw a0,0\(a1\)
-0+50027e <[^>]*> f060 6d05 li a1,101
-0+500282 <[^>]*> f400 35a0 sll a1,16
-0+500286 <[^>]*> f060 9d85 lw a0,101\(a1\)
-0+50028a <[^>]*> f060 6d05 li a1,101
-0+50028e <[^>]*> f400 35a0 sll a1,16
-0+500292 <[^>]*> f060 9d85 lw a0,101\(a1\)
-0+500296 <[^>]*> f060 6d05 li a1,101
-0+50029a <[^>]*> f400 35a0 sll a1,16
-0+50029e <[^>]*> f328 9d90 lw a0,17200\(a1\)
-0+5002a2 <[^>]*> f060 6d05 li a1,101
-0+5002a6 <[^>]*> f400 35a0 sll a1,16
-0+5002aa <[^>]*> f728 9d80 lw a0,18208\(a1\)
-0+5002ae <[^>]*> f060 6d16 li a1,118
-0+5002b2 <[^>]*> f400 35a0 sll a1,16
-0+5002b6 <[^>]*> f02b 9d80 lw a0,22560\(a1\)
-0+5002ba <[^>]*> f060 6d16 li a1,118
-0+5002be <[^>]*> f400 35a0 sll a1,16
-0+5002c2 <[^>]*> f40b 9d89 lw a0,23561\(a1\)
-0+5002c6 <[^>]*> f060 6d16 li a1,118
-0+5002ca <[^>]*> f400 35a0 sll a1,16
-0+5002ce <[^>]*> f42a 9d90 lw a0,21552\(a1\)
-0+5002d2 <[^>]*> f060 6d16 li a1,118
-0+5002d6 <[^>]*> f400 35a0 sll a1,16
-0+5002da <[^>]*> f40b 9d88 lw a0,23560\(a1\)
-0+5002de <[^>]*> 6d00 li a1,0
-0+5002e0 <[^>]*> f400 35a0 sll a1,16
-0+5002e4 <[^>]*> f000 9d81 lw a0,1\(a1\)
-0+5002e8 <[^>]*> f060 6d05 li a1,101
-0+5002ec <[^>]*> f400 35a0 sll a1,16
-0+5002f0 <[^>]*> f328 9d81 lw a0,17185\(a1\)
-0+5002f4 <[^>]*> f060 6d05 li a1,101
-0+5002f8 <[^>]*> f400 35a0 sll a1,16
-0+5002fc <[^>]*> f328 9d85 lw a0,17189\(a1\)
-0+500300 <[^>]*> f060 6d05 li a1,101
-0+500304 <[^>]*> f400 35a0 sll a1,16
-0+500308 <[^>]*> f328 9d91 lw a0,17201\(a1\)
-0+50030c <[^>]*> f060 6d05 li a1,101
-0+500310 <[^>]*> f400 35a0 sll a1,16
-0+500314 <[^>]*> f728 9d81 lw a0,18209\(a1\)
-0+500318 <[^>]*> f060 6d16 li a1,118
-0+50031c <[^>]*> f400 35a0 sll a1,16
-0+500320 <[^>]*> f02b 9d81 lw a0,22561\(a1\)
-0+500324 <[^>]*> f060 6d16 li a1,118
-0+500328 <[^>]*> f400 35a0 sll a1,16
-0+50032c <[^>]*> f40b 9d8a lw a0,23562\(a1\)
-0+500330 <[^>]*> f060 6d16 li a1,118
-0+500334 <[^>]*> f400 35a0 sll a1,16
-0+500338 <[^>]*> f42a 9d91 lw a0,21553\(a1\)
-0+50033c <[^>]*> f060 6d16 li a1,118
-0+500340 <[^>]*> f400 35a0 sll a1,16
-0+500344 <[^>]*> f40b 9d89 lw a0,23561\(a1\)
-0+500348 <[^>]*> 6d01 li a1,1
-0+50034a <[^>]*> f400 35a0 sll a1,16
-0+50034e <[^>]*> f010 9d80 lw a0,-32768\(a1\)
-0+500352 <[^>]*> f060 6d06 li a1,102
-0+500356 <[^>]*> f400 35a0 sll a1,16
-0+50035a <[^>]*> f338 9d80 lw a0,-15584\(a1\)
-0+50035e <[^>]*> f060 6d06 li a1,102
-0+500362 <[^>]*> f400 35a0 sll a1,16
-0+500366 <[^>]*> f338 9d84 lw a0,-15580\(a1\)
-0+50036a <[^>]*> f060 6d06 li a1,102
-0+50036e <[^>]*> f400 35a0 sll a1,16
-0+500372 <[^>]*> f338 9d90 lw a0,-15568\(a1\)
-0+500376 <[^>]*> f060 6d06 li a1,102
-0+50037a <[^>]*> f400 35a0 sll a1,16
-0+50037e <[^>]*> f738 9d80 lw a0,-14560\(a1\)
-0+500382 <[^>]*> f060 6d17 li a1,119
-0+500386 <[^>]*> f400 35a0 sll a1,16
-0+50038a <[^>]*> f03b 9d80 lw a0,-10208\(a1\)
-0+50038e <[^>]*> f060 6d17 li a1,119
-0+500392 <[^>]*> f400 35a0 sll a1,16
-0+500396 <[^>]*> f41b 9d89 lw a0,-9207\(a1\)
-0+50039a <[^>]*> f060 6d17 li a1,119
-0+50039e <[^>]*> f400 35a0 sll a1,16
-0+5003a2 <[^>]*> f43a 9d90 lw a0,-11216\(a1\)
-0+5003a6 <[^>]*> f060 6d17 li a1,119
-0+5003aa <[^>]*> f400 35a0 sll a1,16
-0+5003ae <[^>]*> f41b 9d88 lw a0,-9208\(a1\)
-0+5003b2 <[^>]*> 6d00 li a1,0
-0+5003b4 <[^>]*> f400 35a0 sll a1,16
-0+5003b8 <[^>]*> f010 9d80 lw a0,-32768\(a1\)
-0+5003bc <[^>]*> f060 6d05 li a1,101
-0+5003c0 <[^>]*> f400 35a0 sll a1,16
-0+5003c4 <[^>]*> f338 9d80 lw a0,-15584\(a1\)
-0+5003c8 <[^>]*> f060 6d05 li a1,101
-0+5003cc <[^>]*> f400 35a0 sll a1,16
-0+5003d0 <[^>]*> f338 9d84 lw a0,-15580\(a1\)
-0+5003d4 <[^>]*> f060 6d05 li a1,101
-0+5003d8 <[^>]*> f400 35a0 sll a1,16
-0+5003dc <[^>]*> f338 9d90 lw a0,-15568\(a1\)
-0+5003e0 <[^>]*> f060 6d05 li a1,101
-0+5003e4 <[^>]*> f400 35a0 sll a1,16
-0+5003e8 <[^>]*> f738 9d80 lw a0,-14560\(a1\)
-0+5003ec <[^>]*> f060 6d16 li a1,118
-0+5003f0 <[^>]*> f400 35a0 sll a1,16
-0+5003f4 <[^>]*> f03b 9d80 lw a0,-10208\(a1\)
-0+5003f8 <[^>]*> f060 6d16 li a1,118
-0+5003fc <[^>]*> f400 35a0 sll a1,16
-0+500400 <[^>]*> f41b 9d89 lw a0,-9207\(a1\)
-0+500404 <[^>]*> f060 6d16 li a1,118
-0+500408 <[^>]*> f400 35a0 sll a1,16
-0+50040c <[^>]*> f43a 9d90 lw a0,-11216\(a1\)
-0+500410 <[^>]*> f060 6d16 li a1,118
-0+500414 <[^>]*> f400 35a0 sll a1,16
-0+500418 <[^>]*> f41b 9d88 lw a0,-9208\(a1\)
-0+50041c <[^>]*> 6d01 li a1,1
-0+50041e <[^>]*> f400 35a0 sll a1,16
-0+500422 <[^>]*> 9d80 lw a0,0\(a1\)
-0+500424 <[^>]*> f060 6d06 li a1,102
-0+500428 <[^>]*> f400 35a0 sll a1,16
-0+50042c <[^>]*> f328 9d80 lw a0,17184\(a1\)
-0+500430 <[^>]*> f060 6d06 li a1,102
-0+500434 <[^>]*> f400 35a0 sll a1,16
-0+500438 <[^>]*> f328 9d84 lw a0,17188\(a1\)
-0+50043c <[^>]*> f060 6d06 li a1,102
-0+500440 <[^>]*> f400 35a0 sll a1,16
-0+500444 <[^>]*> f328 9d90 lw a0,17200\(a1\)
-0+500448 <[^>]*> f060 6d06 li a1,102
-0+50044c <[^>]*> f400 35a0 sll a1,16
-0+500450 <[^>]*> f728 9d80 lw a0,18208\(a1\)
-0+500454 <[^>]*> f060 6d17 li a1,119
-0+500458 <[^>]*> f400 35a0 sll a1,16
-0+50045c <[^>]*> f02b 9d80 lw a0,22560\(a1\)
-0+500460 <[^>]*> f060 6d17 li a1,119
-0+500464 <[^>]*> f400 35a0 sll a1,16
-0+500468 <[^>]*> f40b 9d89 lw a0,23561\(a1\)
-0+50046c <[^>]*> f060 6d17 li a1,119
-0+500470 <[^>]*> f400 35a0 sll a1,16
-0+500474 <[^>]*> f42a 9d90 lw a0,21552\(a1\)
-0+500478 <[^>]*> f060 6d17 li a1,119
-0+50047c <[^>]*> f400 35a0 sll a1,16
-0+500480 <[^>]*> f40b 9d88 lw a0,23560\(a1\)
-0+500484 <[^>]*> 6d02 li a1,2
-0+500486 <[^>]*> f400 35a0 sll a1,16
-0+50048a <[^>]*> f5b4 9d85 lw a0,-23131\(a1\)
-0+50048e <[^>]*> f060 6d07 li a1,103
-0+500492 <[^>]*> f400 35a0 sll a1,16
-0+500496 <[^>]*> f0dd 9d85 lw a0,-5947\(a1\)
-0+50049a <[^>]*> f060 6d07 li a1,103
-0+50049e <[^>]*> f400 35a0 sll a1,16
-0+5004a2 <[^>]*> f0dd 9d89 lw a0,-5943\(a1\)
-0+5004a6 <[^>]*> f060 6d07 li a1,103
-0+5004aa <[^>]*> f400 35a0 sll a1,16
-0+5004ae <[^>]*> f0dd 9d95 lw a0,-5931\(a1\)
-0+5004b2 <[^>]*> f060 6d07 li a1,103
-0+5004b6 <[^>]*> f400 35a0 sll a1,16
-0+5004ba <[^>]*> f4dd 9d85 lw a0,-4923\(a1\)
-0+5004be <[^>]*> f060 6d18 li a1,120
-0+5004c2 <[^>]*> f400 35a0 sll a1,16
-0+5004c6 <[^>]*> f5df 9d85 lw a0,-571\(a1\)
-0+5004ca <[^>]*> f060 6d18 li a1,120
-0+5004ce <[^>]*> f400 35a0 sll a1,16
-0+5004d2 <[^>]*> f1a0 9d8e lw a0,430\(a1\)
-0+5004d6 <[^>]*> f060 6d18 li a1,120
-0+5004da <[^>]*> f400 35a0 sll a1,16
-0+5004de <[^>]*> f1df 9d95 lw a0,-1579\(a1\)
-0+5004e2 <[^>]*> f060 6d18 li a1,120
-0+5004e6 <[^>]*> f400 35a0 sll a1,16
-0+5004ea <[^>]*> f1a0 9d8d lw a0,429\(a1\)
-0+5004ee <[^>]*> 6500 nop
+0*500000 <[^>]*>:
+ *500000: 6c00 li a0,0
+ *500002: f400 3480 sll a0,16
+ *500006: 4c00 addiu a0,0
+ *500008: f060 6c05 li a0,101
+ *50000c: f400 3480 sll a0,16
+ *500010: f328 4c00 addiu a0,17184
+ *500014: f060 6c05 li a0,101
+ *500018: f400 3480 sll a0,16
+ *50001c: f328 4c04 addiu a0,17188
+ *500020: f060 6c05 li a0,101
+ *500024: f400 3480 sll a0,16
+ *500028: f328 4c10 addiu a0,17200
+ *50002c: f060 6c05 li a0,101
+ *500030: f400 3480 sll a0,16
+ *500034: f728 4c00 addiu a0,18208
+ *500038: f060 6c16 li a0,118
+ *50003c: f400 3480 sll a0,16
+ *500040: f02b 4c00 addiu a0,22560
+ *500044: f060 6c16 li a0,118
+ *500048: f400 3480 sll a0,16
+ *50004c: f40b 4c08 addiu a0,23560
+ *500050: f060 6c16 li a0,118
+ *500054: f400 3480 sll a0,16
+ *500058: f42a 4c10 addiu a0,21552
+ *50005c: f060 6c16 li a0,118
+ *500060: f400 3480 sll a0,16
+ *500064: f40b 4c09 addiu a0,23561
+ *500068: 6c00 li a0,0
+ *50006a: f400 3480 sll a0,16
+ *50006e: 4c01 addiu a0,1
+ *500070: f060 6c05 li a0,101
+ *500074: f400 3480 sll a0,16
+ *500078: f328 4c01 addiu a0,17185
+ *50007c: f060 6c05 li a0,101
+ *500080: f400 3480 sll a0,16
+ *500084: f328 4c05 addiu a0,17189
+ *500088: f060 6c05 li a0,101
+ *50008c: f400 3480 sll a0,16
+ *500090: f328 4c11 addiu a0,17201
+ *500094: f060 6c05 li a0,101
+ *500098: f400 3480 sll a0,16
+ *50009c: f728 4c01 addiu a0,18209
+ *5000a0: f060 6c16 li a0,118
+ *5000a4: f400 3480 sll a0,16
+ *5000a8: f02b 4c01 addiu a0,22561
+ *5000ac: f060 6c16 li a0,118
+ *5000b0: f400 3480 sll a0,16
+ *5000b4: f40b 4c09 addiu a0,23561
+ *5000b8: f060 6c16 li a0,118
+ *5000bc: f400 3480 sll a0,16
+ *5000c0: f42a 4c11 addiu a0,21553
+ *5000c4: f060 6c16 li a0,118
+ *5000c8: f400 3480 sll a0,16
+ *5000cc: f40b 4c0a addiu a0,23562
+ *5000d0: 6c01 li a0,1
+ *5000d2: f400 3480 sll a0,16
+ *5000d6: f010 4c00 addiu a0,-32768
+ *5000da: f060 6c06 li a0,102
+ *5000de: f400 3480 sll a0,16
+ *5000e2: f338 4c00 addiu a0,-15584
+ *5000e6: f060 6c06 li a0,102
+ *5000ea: f400 3480 sll a0,16
+ *5000ee: f338 4c04 addiu a0,-15580
+ *5000f2: f060 6c06 li a0,102
+ *5000f6: f400 3480 sll a0,16
+ *5000fa: f338 4c10 addiu a0,-15568
+ *5000fe: f060 6c06 li a0,102
+ *500102: f400 3480 sll a0,16
+ *500106: f738 4c00 addiu a0,-14560
+ *50010a: f060 6c17 li a0,119
+ *50010e: f400 3480 sll a0,16
+ *500112: f03b 4c00 addiu a0,-10208
+ *500116: f060 6c17 li a0,119
+ *50011a: f400 3480 sll a0,16
+ *50011e: f41b 4c08 addiu a0,-9208
+ *500122: f060 6c17 li a0,119
+ *500126: f400 3480 sll a0,16
+ *50012a: f43a 4c10 addiu a0,-11216
+ *50012e: f060 6c17 li a0,119
+ *500132: f400 3480 sll a0,16
+ *500136: f41b 4c09 addiu a0,-9207
+ *50013a: 6c00 li a0,0
+ *50013c: f400 3480 sll a0,16
+ *500140: f010 4c00 addiu a0,-32768
+ *500144: f060 6c05 li a0,101
+ *500148: f400 3480 sll a0,16
+ *50014c: f338 4c00 addiu a0,-15584
+ *500150: f060 6c05 li a0,101
+ *500154: f400 3480 sll a0,16
+ *500158: f338 4c04 addiu a0,-15580
+ *50015c: f060 6c05 li a0,101
+ *500160: f400 3480 sll a0,16
+ *500164: f338 4c10 addiu a0,-15568
+ *500168: f060 6c05 li a0,101
+ *50016c: f400 3480 sll a0,16
+ *500170: f738 4c00 addiu a0,-14560
+ *500174: f060 6c16 li a0,118
+ *500178: f400 3480 sll a0,16
+ *50017c: f03b 4c00 addiu a0,-10208
+ *500180: f060 6c16 li a0,118
+ *500184: f400 3480 sll a0,16
+ *500188: f41b 4c08 addiu a0,-9208
+ *50018c: f060 6c16 li a0,118
+ *500190: f400 3480 sll a0,16
+ *500194: f43a 4c10 addiu a0,-11216
+ *500198: f060 6c16 li a0,118
+ *50019c: f400 3480 sll a0,16
+ *5001a0: f41b 4c09 addiu a0,-9207
+ *5001a4: 6c01 li a0,1
+ *5001a6: f400 3480 sll a0,16
+ *5001aa: 4c00 addiu a0,0
+ *5001ac: f060 6c06 li a0,102
+ *5001b0: f400 3480 sll a0,16
+ *5001b4: f328 4c00 addiu a0,17184
+ *5001b8: f060 6c06 li a0,102
+ *5001bc: f400 3480 sll a0,16
+ *5001c0: f328 4c04 addiu a0,17188
+ *5001c4: f060 6c06 li a0,102
+ *5001c8: f400 3480 sll a0,16
+ *5001cc: f328 4c10 addiu a0,17200
+ *5001d0: f060 6c06 li a0,102
+ *5001d4: f400 3480 sll a0,16
+ *5001d8: f728 4c00 addiu a0,18208
+ *5001dc: f060 6c17 li a0,119
+ *5001e0: f400 3480 sll a0,16
+ *5001e4: f02b 4c00 addiu a0,22560
+ *5001e8: f060 6c17 li a0,119
+ *5001ec: f400 3480 sll a0,16
+ *5001f0: f40b 4c08 addiu a0,23560
+ *5001f4: f060 6c17 li a0,119
+ *5001f8: f400 3480 sll a0,16
+ *5001fc: f42a 4c10 addiu a0,21552
+ *500200: f060 6c17 li a0,119
+ *500204: f400 3480 sll a0,16
+ *500208: f40b 4c09 addiu a0,23561
+ *50020c: 6c02 li a0,2
+ *50020e: f400 3480 sll a0,16
+ *500212: f5b4 4c05 addiu a0,-23131
+ *500216: f060 6c07 li a0,103
+ *50021a: f400 3480 sll a0,16
+ *50021e: f0dd 4c05 addiu a0,-5947
+ *500222: f060 6c07 li a0,103
+ *500226: f400 3480 sll a0,16
+ *50022a: f0dd 4c09 addiu a0,-5943
+ *50022e: f060 6c07 li a0,103
+ *500232: f400 3480 sll a0,16
+ *500236: f0dd 4c15 addiu a0,-5931
+ *50023a: f060 6c07 li a0,103
+ *50023e: f400 3480 sll a0,16
+ *500242: f4dd 4c05 addiu a0,-4923
+ *500246: f060 6c18 li a0,120
+ *50024a: f400 3480 sll a0,16
+ *50024e: f5df 4c05 addiu a0,-571
+ *500252: f060 6c18 li a0,120
+ *500256: f400 3480 sll a0,16
+ *50025a: f1a0 4c0d addiu a0,429
+ *50025e: f060 6c18 li a0,120
+ *500262: f400 3480 sll a0,16
+ *500266: f1df 4c15 addiu a0,-1579
+ *50026a: f060 6c18 li a0,120
+ *50026e: f400 3480 sll a0,16
+ *500272: f1a0 4c0e addiu a0,430
+ *500276: 6d00 li a1,0
+ *500278: f400 35a0 sll a1,16
+ *50027c: 9d80 lw a0,0\(a1\)
+ *50027e: f060 6d05 li a1,101
+ *500282: f400 35a0 sll a1,16
+ *500286: f328 9d80 lw a0,17184\(a1\)
+ *50028a: f060 6d05 li a1,101
+ *50028e: f400 35a0 sll a1,16
+ *500292: f328 9d84 lw a0,17188\(a1\)
+ *500296: f060 6d05 li a1,101
+ *50029a: f400 35a0 sll a1,16
+ *50029e: f328 9d90 lw a0,17200\(a1\)
+ *5002a2: f060 6d05 li a1,101
+ *5002a6: f400 35a0 sll a1,16
+ *5002aa: f728 9d80 lw a0,18208\(a1\)
+ *5002ae: f060 6d16 li a1,118
+ *5002b2: f400 35a0 sll a1,16
+ *5002b6: f02b 9d80 lw a0,22560\(a1\)
+ *5002ba: f060 6d16 li a1,118
+ *5002be: f400 35a0 sll a1,16
+ *5002c2: f40b 9d88 lw a0,23560\(a1\)
+ *5002c6: f060 6d16 li a1,118
+ *5002ca: f400 35a0 sll a1,16
+ *5002ce: f42a 9d90 lw a0,21552\(a1\)
+ *5002d2: f060 6d16 li a1,118
+ *5002d6: f400 35a0 sll a1,16
+ *5002da: f40b 9d89 lw a0,23561\(a1\)
+ *5002de: 6d00 li a1,0
+ *5002e0: f400 35a0 sll a1,16
+ *5002e4: f000 9d81 lw a0,1\(a1\)
+ *5002e8: f060 6d05 li a1,101
+ *5002ec: f400 35a0 sll a1,16
+ *5002f0: f328 9d81 lw a0,17185\(a1\)
+ *5002f4: f060 6d05 li a1,101
+ *5002f8: f400 35a0 sll a1,16
+ *5002fc: f328 9d85 lw a0,17189\(a1\)
+ *500300: f060 6d05 li a1,101
+ *500304: f400 35a0 sll a1,16
+ *500308: f328 9d91 lw a0,17201\(a1\)
+ *50030c: f060 6d05 li a1,101
+ *500310: f400 35a0 sll a1,16
+ *500314: f728 9d81 lw a0,18209\(a1\)
+ *500318: f060 6d16 li a1,118
+ *50031c: f400 35a0 sll a1,16
+ *500320: f02b 9d81 lw a0,22561\(a1\)
+ *500324: f060 6d16 li a1,118
+ *500328: f400 35a0 sll a1,16
+ *50032c: f40b 9d89 lw a0,23561\(a1\)
+ *500330: f060 6d16 li a1,118
+ *500334: f400 35a0 sll a1,16
+ *500338: f42a 9d91 lw a0,21553\(a1\)
+ *50033c: f060 6d16 li a1,118
+ *500340: f400 35a0 sll a1,16
+ *500344: f40b 9d8a lw a0,23562\(a1\)
+ *500348: 6d01 li a1,1
+ *50034a: f400 35a0 sll a1,16
+ *50034e: f010 9d80 lw a0,-32768\(a1\)
+ *500352: f060 6d06 li a1,102
+ *500356: f400 35a0 sll a1,16
+ *50035a: f338 9d80 lw a0,-15584\(a1\)
+ *50035e: f060 6d06 li a1,102
+ *500362: f400 35a0 sll a1,16
+ *500366: f338 9d84 lw a0,-15580\(a1\)
+ *50036a: f060 6d06 li a1,102
+ *50036e: f400 35a0 sll a1,16
+ *500372: f338 9d90 lw a0,-15568\(a1\)
+ *500376: f060 6d06 li a1,102
+ *50037a: f400 35a0 sll a1,16
+ *50037e: f738 9d80 lw a0,-14560\(a1\)
+ *500382: f060 6d17 li a1,119
+ *500386: f400 35a0 sll a1,16
+ *50038a: f03b 9d80 lw a0,-10208\(a1\)
+ *50038e: f060 6d17 li a1,119
+ *500392: f400 35a0 sll a1,16
+ *500396: f41b 9d88 lw a0,-9208\(a1\)
+ *50039a: f060 6d17 li a1,119
+ *50039e: f400 35a0 sll a1,16
+ *5003a2: f43a 9d90 lw a0,-11216\(a1\)
+ *5003a6: f060 6d17 li a1,119
+ *5003aa: f400 35a0 sll a1,16
+ *5003ae: f41b 9d89 lw a0,-9207\(a1\)
+ *5003b2: 6d00 li a1,0
+ *5003b4: f400 35a0 sll a1,16
+ *5003b8: f010 9d80 lw a0,-32768\(a1\)
+ *5003bc: f060 6d05 li a1,101
+ *5003c0: f400 35a0 sll a1,16
+ *5003c4: f338 9d80 lw a0,-15584\(a1\)
+ *5003c8: f060 6d05 li a1,101
+ *5003cc: f400 35a0 sll a1,16
+ *5003d0: f338 9d84 lw a0,-15580\(a1\)
+ *5003d4: f060 6d05 li a1,101
+ *5003d8: f400 35a0 sll a1,16
+ *5003dc: f338 9d90 lw a0,-15568\(a1\)
+ *5003e0: f060 6d05 li a1,101
+ *5003e4: f400 35a0 sll a1,16
+ *5003e8: f738 9d80 lw a0,-14560\(a1\)
+ *5003ec: f060 6d16 li a1,118
+ *5003f0: f400 35a0 sll a1,16
+ *5003f4: f03b 9d80 lw a0,-10208\(a1\)
+ *5003f8: f060 6d16 li a1,118
+ *5003fc: f400 35a0 sll a1,16
+ *500400: f41b 9d88 lw a0,-9208\(a1\)
+ *500404: f060 6d16 li a1,118
+ *500408: f400 35a0 sll a1,16
+ *50040c: f43a 9d90 lw a0,-11216\(a1\)
+ *500410: f060 6d16 li a1,118
+ *500414: f400 35a0 sll a1,16
+ *500418: f41b 9d89 lw a0,-9207\(a1\)
+ *50041c: 6d01 li a1,1
+ *50041e: f400 35a0 sll a1,16
+ *500422: 9d80 lw a0,0\(a1\)
+ *500424: f060 6d06 li a1,102
+ *500428: f400 35a0 sll a1,16
+ *50042c: f328 9d80 lw a0,17184\(a1\)
+ *500430: f060 6d06 li a1,102
+ *500434: f400 35a0 sll a1,16
+ *500438: f328 9d84 lw a0,17188\(a1\)
+ *50043c: f060 6d06 li a1,102
+ *500440: f400 35a0 sll a1,16
+ *500444: f328 9d90 lw a0,17200\(a1\)
+ *500448: f060 6d06 li a1,102
+ *50044c: f400 35a0 sll a1,16
+ *500450: f728 9d80 lw a0,18208\(a1\)
+ *500454: f060 6d17 li a1,119
+ *500458: f400 35a0 sll a1,16
+ *50045c: f02b 9d80 lw a0,22560\(a1\)
+ *500460: f060 6d17 li a1,119
+ *500464: f400 35a0 sll a1,16
+ *500468: f40b 9d88 lw a0,23560\(a1\)
+ *50046c: f060 6d17 li a1,119
+ *500470: f400 35a0 sll a1,16
+ *500474: f42a 9d90 lw a0,21552\(a1\)
+ *500478: f060 6d17 li a1,119
+ *50047c: f400 35a0 sll a1,16
+ *500480: f40b 9d89 lw a0,23561\(a1\)
+ *500484: 6d02 li a1,2
+ *500486: f400 35a0 sll a1,16
+ *50048a: f5b4 9d85 lw a0,-23131\(a1\)
+ *50048e: f060 6d07 li a1,103
+ *500492: f400 35a0 sll a1,16
+ *500496: f0dd 9d85 lw a0,-5947\(a1\)
+ *50049a: f060 6d07 li a1,103
+ *50049e: f400 35a0 sll a1,16
+ *5004a2: f0dd 9d89 lw a0,-5943\(a1\)
+ *5004a6: f060 6d07 li a1,103
+ *5004aa: f400 35a0 sll a1,16
+ *5004ae: f0dd 9d95 lw a0,-5931\(a1\)
+ *5004b2: f060 6d07 li a1,103
+ *5004b6: f400 35a0 sll a1,16
+ *5004ba: f4dd 9d85 lw a0,-4923\(a1\)
+ *5004be: f060 6d18 li a1,120
+ *5004c2: f400 35a0 sll a1,16
+ *5004c6: f5df 9d85 lw a0,-571\(a1\)
+ *5004ca: f060 6d18 li a1,120
+ *5004ce: f400 35a0 sll a1,16
+ *5004d2: f1a0 9d8d lw a0,429\(a1\)
+ *5004d6: f060 6d18 li a1,120
+ *5004da: f400 35a0 sll a1,16
+ *5004de: f1df 9d95 lw a0,-1579\(a1\)
+ *5004e2: f060 6d18 li a1,120
+ *5004e6: f400 35a0 sll a1,16
+ *5004ea: f1a0 9d8e lw a0,430\(a1\)
+ *5004ee: 6500 nop
#pass
diff --git a/ld/testsuite/ld-mips-elf/mips16-hilo.s b/ld/testsuite/ld-mips-elf/mips16-hilo.s
index 79ac2fb..8b13789 100644
--- a/ld/testsuite/ld-mips-elf/mips16-hilo.s
+++ b/ld/testsuite/ld-mips-elf/mips16-hilo.s
@@ -1,14 +1 @@
- .data
- .globl big_external_data_label
-big_external_data_label:
- .fill 1000
-# align section end to 16-byte boundary for easier testing on multiple targets
- .p2align 4
-
- .globl small_external_data_label
-small_external_data_label:
- .fill 1
-
-# align section end to 16-byte boundary for easier testing on multiple targets
- .p2align 4
diff --git a/ld/testsuite/ld-mips-elf/mips16e2-hilo-n32.d b/ld/testsuite/ld-mips-elf/mips16e2-hilo-n32.d
new file mode 100644
index 0000000..e900e87
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16e2-hilo-n32.d
@@ -0,0 +1,8 @@
+#name: MIPS16e2 R_MIPS16_HI16 and R_MIPS16_LO16 relocs n32
+#source: ../../../gas/testsuite/gas/mips/mips-hilo.s
+#source: mips-hilo.s
+#as: -mips16 -mmips16e2 -march=mips64r2
+#objdump: -d
+#ld: -Tmips-hilo.ld -e 0x500000 -N
+#notarget: mips*el-ps2-elf*
+#dump: mips16e2-hilo.d
diff --git a/ld/testsuite/ld-mips-elf/mips16e2-hilo-srec-n32.d b/ld/testsuite/ld-mips-elf/mips16e2-hilo-srec-n32.d
new file mode 100644
index 0000000..0132fa8
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16e2-hilo-srec-n32.d
@@ -0,0 +1,8 @@
+#name: MIPS16e2 R_MIPS16_HI16 and R_MIPS16_LO16 relocs srec n32
+#source: ../../../gas/testsuite/gas/mips/mips-hilo.s
+#source: mips-hilo.s
+#as: -mips16 -mmips16e2 -march=mips64r2
+#objdump: -mmips:16 -j .sec1 -D
+#ld: --oformat=srec -Tmips-hilo.ld -e 0x500000 -N
+#notarget: mips*el-ps2-elf*
+#dump: mips16e2-hilo.d
diff --git a/ld/testsuite/ld-mips-elf/mips16e2-hilo-srec.d b/ld/testsuite/ld-mips-elf/mips16e2-hilo-srec.d
new file mode 100644
index 0000000..e46708b
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16e2-hilo-srec.d
@@ -0,0 +1,8 @@
+#name: MIPS16e2 R_MIPS16_HI16 and R_MIPS16_LO16 relocs srec
+#source: ../../../gas/testsuite/gas/mips/mips-hilo.s
+#source: mips-hilo.s
+#as: -mips16 -mmips16e2 -march=mips32r2
+#objdump: -mmips:16 -j .sec1 -D
+#ld: --oformat=srec -Tmips-hilo.ld -e 0x500000 -N
+#notarget: mips*el-ps2-elf*
+#dump: mips16e2-hilo.d
diff --git a/ld/testsuite/ld-mips-elf/mips16e2-hilo.d b/ld/testsuite/ld-mips-elf/mips16e2-hilo.d
new file mode 100644
index 0000000..eb93873
--- /dev/null
+++ b/ld/testsuite/ld-mips-elf/mips16e2-hilo.d
@@ -0,0 +1,230 @@
+#name: MIPS16e2 R_MIPS16_HI16 and R_MIPS16_LO16 relocs
+#source: ../../../gas/testsuite/gas/mips/mips-hilo.s
+#source: mips-hilo.s
+#as: -mips16 -mmips16e2 -march=mips32r2
+#objdump: -d
+#ld: -Tmips-hilo.ld -e 0x500000 -N
+#notarget: mips*el-ps2-elf*
+
+.*: file format (:?elf.*mips.*|srec)
+
+Disassembly of section \.(:?text|sec1):
+
+0*500000 <[^>]*>:
+ *500000: f000 6c20 lui a0,0x0
+ *500004: 4c00 addiu a0,0
+ *500006: f060 6c25 lui a0,0x65
+ *50000a: f328 4c00 addiu a0,17184
+ *50000e: f060 6c25 lui a0,0x65
+ *500012: f328 4c04 addiu a0,17188
+ *500016: f060 6c25 lui a0,0x65
+ *50001a: f328 4c10 addiu a0,17200
+ *50001e: f060 6c25 lui a0,0x65
+ *500022: f728 4c00 addiu a0,18208
+ *500026: f060 6c36 lui a0,0x76
+ *50002a: f02b 4c00 addiu a0,22560
+ *50002e: f060 6c36 lui a0,0x76
+ *500032: f40b 4c08 addiu a0,23560
+ *500036: f060 6c36 lui a0,0x76
+ *50003a: f42a 4c10 addiu a0,21552
+ *50003e: f060 6c36 lui a0,0x76
+ *500042: f40b 4c09 addiu a0,23561
+ *500046: f000 6c20 lui a0,0x0
+ *50004a: 4c01 addiu a0,1
+ *50004c: f060 6c25 lui a0,0x65
+ *500050: f328 4c01 addiu a0,17185
+ *500054: f060 6c25 lui a0,0x65
+ *500058: f328 4c05 addiu a0,17189
+ *50005c: f060 6c25 lui a0,0x65
+ *500060: f328 4c11 addiu a0,17201
+ *500064: f060 6c25 lui a0,0x65
+ *500068: f728 4c01 addiu a0,18209
+ *50006c: f060 6c36 lui a0,0x76
+ *500070: f02b 4c01 addiu a0,22561
+ *500074: f060 6c36 lui a0,0x76
+ *500078: f40b 4c09 addiu a0,23561
+ *50007c: f060 6c36 lui a0,0x76
+ *500080: f42a 4c11 addiu a0,21553
+ *500084: f060 6c36 lui a0,0x76
+ *500088: f40b 4c0a addiu a0,23562
+ *50008c: f000 6c21 lui a0,0x1
+ *500090: f010 4c00 addiu a0,-32768
+ *500094: f060 6c26 lui a0,0x66
+ *500098: f338 4c00 addiu a0,-15584
+ *50009c: f060 6c26 lui a0,0x66
+ *5000a0: f338 4c04 addiu a0,-15580
+ *5000a4: f060 6c26 lui a0,0x66
+ *5000a8: f338 4c10 addiu a0,-15568
+ *5000ac: f060 6c26 lui a0,0x66
+ *5000b0: f738 4c00 addiu a0,-14560
+ *5000b4: f060 6c37 lui a0,0x77
+ *5000b8: f03b 4c00 addiu a0,-10208
+ *5000bc: f060 6c37 lui a0,0x77
+ *5000c0: f41b 4c08 addiu a0,-9208
+ *5000c4: f060 6c37 lui a0,0x77
+ *5000c8: f43a 4c10 addiu a0,-11216
+ *5000cc: f060 6c37 lui a0,0x77
+ *5000d0: f41b 4c09 addiu a0,-9207
+ *5000d4: f000 6c20 lui a0,0x0
+ *5000d8: f010 4c00 addiu a0,-32768
+ *5000dc: f060 6c25 lui a0,0x65
+ *5000e0: f338 4c00 addiu a0,-15584
+ *5000e4: f060 6c25 lui a0,0x65
+ *5000e8: f338 4c04 addiu a0,-15580
+ *5000ec: f060 6c25 lui a0,0x65
+ *5000f0: f338 4c10 addiu a0,-15568
+ *5000f4: f060 6c25 lui a0,0x65
+ *5000f8: f738 4c00 addiu a0,-14560
+ *5000fc: f060 6c36 lui a0,0x76
+ *500100: f03b 4c00 addiu a0,-10208
+ *500104: f060 6c36 lui a0,0x76
+ *500108: f41b 4c08 addiu a0,-9208
+ *50010c: f060 6c36 lui a0,0x76
+ *500110: f43a 4c10 addiu a0,-11216
+ *500114: f060 6c36 lui a0,0x76
+ *500118: f41b 4c09 addiu a0,-9207
+ *50011c: f000 6c21 lui a0,0x1
+ *500120: 4c00 addiu a0,0
+ *500122: f060 6c26 lui a0,0x66
+ *500126: f328 4c00 addiu a0,17184
+ *50012a: f060 6c26 lui a0,0x66
+ *50012e: f328 4c04 addiu a0,17188
+ *500132: f060 6c26 lui a0,0x66
+ *500136: f328 4c10 addiu a0,17200
+ *50013a: f060 6c26 lui a0,0x66
+ *50013e: f728 4c00 addiu a0,18208
+ *500142: f060 6c37 lui a0,0x77
+ *500146: f02b 4c00 addiu a0,22560
+ *50014a: f060 6c37 lui a0,0x77
+ *50014e: f40b 4c08 addiu a0,23560
+ *500152: f060 6c37 lui a0,0x77
+ *500156: f42a 4c10 addiu a0,21552
+ *50015a: f060 6c37 lui a0,0x77
+ *50015e: f40b 4c09 addiu a0,23561
+ *500162: f000 6c22 lui a0,0x2
+ *500166: f5b4 4c05 addiu a0,-23131
+ *50016a: f060 6c27 lui a0,0x67
+ *50016e: f0dd 4c05 addiu a0,-5947
+ *500172: f060 6c27 lui a0,0x67
+ *500176: f0dd 4c09 addiu a0,-5943
+ *50017a: f060 6c27 lui a0,0x67
+ *50017e: f0dd 4c15 addiu a0,-5931
+ *500182: f060 6c27 lui a0,0x67
+ *500186: f4dd 4c05 addiu a0,-4923
+ *50018a: f060 6c38 lui a0,0x78
+ *50018e: f5df 4c05 addiu a0,-571
+ *500192: f060 6c38 lui a0,0x78
+ *500196: f1a0 4c0d addiu a0,429
+ *50019a: f060 6c38 lui a0,0x78
+ *50019e: f1df 4c15 addiu a0,-1579
+ *5001a2: f060 6c38 lui a0,0x78
+ *5001a6: f1a0 4c0e addiu a0,430
+ *5001aa: f000 6d20 lui a1,0x0
+ *5001ae: 9d80 lw a0,0\(a1\)
+ *5001b0: f060 6d25 lui a1,0x65
+ *5001b4: f328 9d80 lw a0,17184\(a1\)
+ *5001b8: f060 6d25 lui a1,0x65
+ *5001bc: f328 9d84 lw a0,17188\(a1\)
+ *5001c0: f060 6d25 lui a1,0x65
+ *5001c4: f328 9d90 lw a0,17200\(a1\)
+ *5001c8: f060 6d25 lui a1,0x65
+ *5001cc: f728 9d80 lw a0,18208\(a1\)
+ *5001d0: f060 6d36 lui a1,0x76
+ *5001d4: f02b 9d80 lw a0,22560\(a1\)
+ *5001d8: f060 6d36 lui a1,0x76
+ *5001dc: f40b 9d88 lw a0,23560\(a1\)
+ *5001e0: f060 6d36 lui a1,0x76
+ *5001e4: f42a 9d90 lw a0,21552\(a1\)
+ *5001e8: f060 6d36 lui a1,0x76
+ *5001ec: f40b 9d89 lw a0,23561\(a1\)
+ *5001f0: f000 6d20 lui a1,0x0
+ *5001f4: f000 9d81 lw a0,1\(a1\)
+ *5001f8: f060 6d25 lui a1,0x65
+ *5001fc: f328 9d81 lw a0,17185\(a1\)
+ *500200: f060 6d25 lui a1,0x65
+ *500204: f328 9d85 lw a0,17189\(a1\)
+ *500208: f060 6d25 lui a1,0x65
+ *50020c: f328 9d91 lw a0,17201\(a1\)
+ *500210: f060 6d25 lui a1,0x65
+ *500214: f728 9d81 lw a0,18209\(a1\)
+ *500218: f060 6d36 lui a1,0x76
+ *50021c: f02b 9d81 lw a0,22561\(a1\)
+ *500220: f060 6d36 lui a1,0x76
+ *500224: f40b 9d89 lw a0,23561\(a1\)
+ *500228: f060 6d36 lui a1,0x76
+ *50022c: f42a 9d91 lw a0,21553\(a1\)
+ *500230: f060 6d36 lui a1,0x76
+ *500234: f40b 9d8a lw a0,23562\(a1\)
+ *500238: f000 6d21 lui a1,0x1
+ *50023c: f010 9d80 lw a0,-32768\(a1\)
+ *500240: f060 6d26 lui a1,0x66
+ *500244: f338 9d80 lw a0,-15584\(a1\)
+ *500248: f060 6d26 lui a1,0x66
+ *50024c: f338 9d84 lw a0,-15580\(a1\)
+ *500250: f060 6d26 lui a1,0x66
+ *500254: f338 9d90 lw a0,-15568\(a1\)
+ *500258: f060 6d26 lui a1,0x66
+ *50025c: f738 9d80 lw a0,-14560\(a1\)
+ *500260: f060 6d37 lui a1,0x77
+ *500264: f03b 9d80 lw a0,-10208\(a1\)
+ *500268: f060 6d37 lui a1,0x77
+ *50026c: f41b 9d88 lw a0,-9208\(a1\)
+ *500270: f060 6d37 lui a1,0x77
+ *500274: f43a 9d90 lw a0,-11216\(a1\)
+ *500278: f060 6d37 lui a1,0x77
+ *50027c: f41b 9d89 lw a0,-9207\(a1\)
+ *500280: f000 6d20 lui a1,0x0
+ *500284: f010 9d80 lw a0,-32768\(a1\)
+ *500288: f060 6d25 lui a1,0x65
+ *50028c: f338 9d80 lw a0,-15584\(a1\)
+ *500290: f060 6d25 lui a1,0x65
+ *500294: f338 9d84 lw a0,-15580\(a1\)
+ *500298: f060 6d25 lui a1,0x65
+ *50029c: f338 9d90 lw a0,-15568\(a1\)
+ *5002a0: f060 6d25 lui a1,0x65
+ *5002a4: f738 9d80 lw a0,-14560\(a1\)
+ *5002a8: f060 6d36 lui a1,0x76
+ *5002ac: f03b 9d80 lw a0,-10208\(a1\)
+ *5002b0: f060 6d36 lui a1,0x76
+ *5002b4: f41b 9d88 lw a0,-9208\(a1\)
+ *5002b8: f060 6d36 lui a1,0x76
+ *5002bc: f43a 9d90 lw a0,-11216\(a1\)
+ *5002c0: f060 6d36 lui a1,0x76
+ *5002c4: f41b 9d89 lw a0,-9207\(a1\)
+ *5002c8: f000 6d21 lui a1,0x1
+ *5002cc: 9d80 lw a0,0\(a1\)
+ *5002ce: f060 6d26 lui a1,0x66
+ *5002d2: f328 9d80 lw a0,17184\(a1\)
+ *5002d6: f060 6d26 lui a1,0x66
+ *5002da: f328 9d84 lw a0,17188\(a1\)
+ *5002de: f060 6d26 lui a1,0x66
+ *5002e2: f328 9d90 lw a0,17200\(a1\)
+ *5002e6: f060 6d26 lui a1,0x66
+ *5002ea: f728 9d80 lw a0,18208\(a1\)
+ *5002ee: f060 6d37 lui a1,0x77
+ *5002f2: f02b 9d80 lw a0,22560\(a1\)
+ *5002f6: f060 6d37 lui a1,0x77
+ *5002fa: f40b 9d88 lw a0,23560\(a1\)
+ *5002fe: f060 6d37 lui a1,0x77
+ *500302: f42a 9d90 lw a0,21552\(a1\)
+ *500306: f060 6d37 lui a1,0x77
+ *50030a: f40b 9d89 lw a0,23561\(a1\)
+ *50030e: f000 6d22 lui a1,0x2
+ *500312: f5b4 9d85 lw a0,-23131\(a1\)
+ *500316: f060 6d27 lui a1,0x67
+ *50031a: f0dd 9d85 lw a0,-5947\(a1\)
+ *50031e: f060 6d27 lui a1,0x67
+ *500322: f0dd 9d89 lw a0,-5943\(a1\)
+ *500326: f060 6d27 lui a1,0x67
+ *50032a: f0dd 9d95 lw a0,-5931\(a1\)
+ *50032e: f060 6d27 lui a1,0x67
+ *500332: f4dd 9d85 lw a0,-4923\(a1\)
+ *500336: f060 6d38 lui a1,0x78
+ *50033a: f5df 9d85 lw a0,-571\(a1\)
+ *50033e: f060 6d38 lui a1,0x78
+ *500342: f1a0 9d8d lw a0,429\(a1\)
+ *500346: f060 6d38 lui a1,0x78
+ *50034a: f1df 9d95 lw a0,-1579\(a1\)
+ *50034e: f060 6d38 lui a1,0x78
+ *500352: f1a0 9d8e lw a0,430\(a1\)
+ \.\.\.
diff --git a/ld/testsuite/ld-mips-elf/pic-and-nonpic-1-r6.s b/ld/testsuite/ld-mips-elf/pic-and-nonpic-1-r6.s
deleted file mode 100644
index e69de29..0000000
--- a/ld/testsuite/ld-mips-elf/pic-and-nonpic-1-r6.s
+++ /dev/null
diff --git a/ld/testsuite/ld-plugin/lto-binutils.exp b/ld/testsuite/ld-plugin/lto-binutils.exp
new file mode 100644
index 0000000..5b4e0a1
--- /dev/null
+++ b/ld/testsuite/ld-plugin/lto-binutils.exp
@@ -0,0 +1,358 @@
+# Expect script for binutils tests with LTO
+# Copyright (C) 2025 Free Software Foundation, Inc.
+#
+# This file is part of the GNU Binutils.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+# MA 02110-1301, USA.
+#
+
+# Make sure that binutils can correctly handle LTO IR in ELF.
+
+if { !([istarget *-*-linux*]
+ || [istarget arm*-*-uclinuxfdpiceabi]
+ || [istarget *-*-nacl*]
+ || [istarget *-*-gnu*]) || [istarget *ecoff] } then {
+ return
+}
+
+# Check to see if the C and C++ compilers work
+if { ![check_compiler_available] || [which $CXX_FOR_TARGET] == 0 } {
+ return
+}
+
+# These tests require plugin and LTO.
+if { ![check_plugin_api_available]
+ || ![check_lto_available] } {
+ return
+}
+
+set lto_fat ""
+set lto_no_fat ""
+if { [check_lto_fat_available] } {
+ set lto_fat "-ffat-lto-objects"
+ set lto_no_fat "-fno-fat-lto-objects"
+ set no_lto "-fno-lto"
+}
+
+# List contains test-items:
+# 0:program name
+# 1:program options
+# 2:input file
+# 3:output file
+# 4:action list (optional)
+#
+proc run_lto_binutils_test { lto_tests } {
+ global srcdir
+ global subdir
+ global nm
+ global objcopy
+ global objdump
+ global READELF
+ global strip
+ global plug_opt
+
+ foreach testitem $lto_tests {
+ set prog_name [lindex $testitem 0]
+ set prog_options [lindex $testitem 1]
+ set input tmpdir/[lindex $testitem 2]
+ set output tmpdir/[lindex $testitem 3]
+ set actions [lindex $testitem 4]
+ set objfiles {}
+ set is_unresolved 0
+ set failed 0
+
+# eval set prog \$$prog_name
+ switch -- $prog_name {
+ objcopy
+ {
+ set prog $objcopy
+ set prog_output "$output"
+ }
+ strip
+ {
+ set prog $strip
+ set prog_output "-o $output"
+ }
+ default
+ {
+ perror "Unrecognized action $action"
+ set is_unresolved 1
+ break
+ }
+ }
+
+ # Don't leave previous output around
+ if { $output ne "tmpdir/" } {
+ remote_file host delete $output
+ }
+
+ append prog_options " $plug_opt"
+
+ set cmd_options "$prog_options $prog_output $input"
+ set test_name "$prog_name $cmd_options"
+
+ set cmd "$prog $cmd_options"
+ send_log "$cmd\n"
+ set got [remote_exec host "$cmd"]
+ if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
+ send_log "$got\n"
+ fail "$test_name"
+ continue
+ }
+
+ if { $failed == 0 } {
+ foreach actionlist $actions {
+ set action [lindex $actionlist 0]
+ set progopts [lindex $actionlist 1]
+
+ # There are actions where we run regexp_diff on the
+ # output, and there are other actions (presumably).
+ # Handling of the former look the same.
+ set dump_prog ""
+ switch -- $action {
+ objdump
+ { set dump_prog $objdump }
+ nm
+ { set dump_prog $nm }
+ readelf
+ { set dump_prog $READELF }
+ default
+ {
+ perror "Unrecognized action $action"
+ set is_unresolved 1
+ break
+ }
+ }
+
+ if { $dump_prog != "" } {
+ set dumpfile [lindex $actionlist 2]
+ set binary $dump_prog
+
+ # Ensure consistent sorting of symbols
+ if {[info exists env(LC_ALL)]} {
+ set old_lc_all $env(LC_ALL)
+ }
+ set env(LC_ALL) "C"
+ set cmd "$binary $progopts $output > tmpdir/dump.out"
+ send_log "$cmd\n"
+ catch "exec $cmd" comp_output
+ if {[info exists old_lc_all]} {
+ set env(LC_ALL) $old_lc_all
+ } else {
+ unset env(LC_ALL)
+ }
+ set comp_output [prune_warnings $comp_output]
+
+ if ![string match "" $comp_output] then {
+ send_log "$comp_output\n"
+ set failed 1
+ break
+ }
+
+ if { [regexp_diff "tmpdir/dump.out" "$srcdir/$subdir/$dumpfile"] } then {
+ verbose -log "output is [file_contents "tmpdir/dump.out"]" 2
+ set failed 1
+ break
+ }
+ }
+ }
+ }
+
+ if { $failed } {
+ fail $test_name
+ } elseif { $is_unresolved } {
+ unresolved $test_name
+ } else {
+ pass $test_name
+ }
+ }
+}
+
+run_cc_link_tests [list \
+ [list \
+ "Build strip-1a.o" \
+ "" \
+ "-O2 -flto $lto_no_fat" \
+ { strip-1a.c } \
+ ] \
+ [list \
+ "Build libstrip-1a.a" \
+ "$plug_opt" \
+ "-O2 -flto $lto_no_fat" \
+ { strip-1a.c } \
+ {} \
+ "libstrip-1a.a" \
+ ] \
+ [list \
+ "Build strip-1a-fat.o" \
+ "" \
+ "-O2 -flto $lto_fat" \
+ { strip-1a-fat.c } \
+ ] \
+ [list \
+ "Build libstrip-1a-fat.a" \
+ "$plug_opt" \
+ "-O2 -flto $lto_fat" \
+ { strip-1a-fat.c } \
+ {} \
+ "libstrip-1a-fat.a" \
+ ] \
+]
+
+run_lto_binutils_test [list \
+ [list \
+ "strip" \
+ "--strip-unneeded" \
+ "libstrip-1a.a" \
+ "libstrip-1a-s.a" \
+ ] \
+ [list \
+ "strip" \
+ "--strip-unneeded" \
+ "strip-1a.o" \
+ "strip-1a-s.o" \
+ ] \
+ [list \
+ "strip" \
+ "--strip-unneeded -R .gnu.*lto_* -N __gnu_lto_v1" \
+ "libstrip-1a-fat.a" \
+ "libstrip-1a-fat-s.a" \
+ {{readelf -SW strip-1a-fat.rd}} \
+ ] \
+ [list \
+ "strip" \
+ "--strip-unneeded -R .gnu.*lto_* -N __gnu_lto_v1" \
+ "strip-1a-fat.o" \
+ "strip-1a-fat-s.o" \
+ {{readelf -SW strip-1a-fat.rd}} \
+ ] \
+ [list \
+ "strip" \
+ "--strip-unneeded -R .gnu.debuglto_*" \
+ "libstrip-1a-fat.a" \
+ "libstrip-1b-fat-s.a" \
+ {{readelf -SW strip-1b-fat.rd}} \
+ ] \
+ [list \
+ "strip" \
+ "--strip-unneeded -R .gnu.debuglto_*" \
+ "strip-1a-fat.o" \
+ "strip-1b-fat-s.o" \
+ {{readelf -SW strip-1b-fat.rd}} \
+ ] \
+]
+
+if { [check_lto_fat_available] } {
+ run_lto_binutils_test [list \
+ [list \
+ "strip" \
+ "-R .gnu.*lto_* -N __gnu_lto_v1" \
+ "strip-1a.o" \
+ "strip-1a-s-all.o" \
+ {{nm -n strip-1a-s-all.nd}} \
+ ] \
+ [list \
+ "strip" \
+ "-R .gnu.*lto_* -N __gnu_lto_v1" \
+ "libstrip-1a.a" \
+ "libstrip-1a-s-all.a" \
+ {{nm -n strip-1a-s-all.nd}} \
+ ] \
+ ]
+}
+
+run_cc_link_tests [list \
+ [list \
+ "Build strip-1a (strip-1a.o)" \
+ "" \
+ "-O2 -flto $lto_no_fat" \
+ { strip-1b.c } \
+ {} \
+ "libstrip-1a" \
+ "C" \
+ "tmpdir/strip-1a.o" \
+ ] \
+ [list \
+ "Build strip-1b (strip-1a-s.o)" \
+ "" \
+ "-O2 -flto $lto_no_fat" \
+ { strip-1b.c } \
+ {} \
+ "libstrip-1b" \
+ "C" \
+ "tmpdir/strip-1a-s.o" \
+ ] \
+ [list \
+ "Build strip-1c (libstrip-1a.a)" \
+ "" \
+ "-O2 -flto $lto_no_fat" \
+ { strip-1b.c } \
+ {} \
+ "libstrip-1c" \
+ "C" \
+ "tmpdir/libstrip-1a.a" \
+ ] \
+ [list \
+ "Build strip-1d (libstrip-1a-s.a)" \
+ "" \
+ "-O2 -flto $lto_no_fat" \
+ { strip-1b.c } \
+ {} \
+ "libstrip-1d" \
+ "C" \
+ "tmpdir/libstrip-1a-s.a" \
+ ] \
+ [list \
+ "Build strip-1e (strip-1a-fat-s.o)" \
+ "" \
+ "-O2 -flto $lto_fat" \
+ { strip-1b-fat.c } \
+ {} \
+ "libstrip-1e" \
+ "C" \
+ "tmpdir/strip-1a-fat-s.o" \
+ ] \
+ [list \
+ "Build strip-1f (libstrip-1a-fat-s.a)" \
+ "" \
+ "-O2 -flto $lto_fat" \
+ { strip-1b-fat.c } \
+ {} \
+ "libstrip-1f" \
+ "C" \
+ "tmpdir/libstrip-1a-fat-s.a" \
+ ] \
+ [list \
+ "Build strip-1g (strip-1b-fat-s.o)" \
+ "" \
+ "-O2 -flto $lto_fat" \
+ { strip-1b-fat.c } \
+ {} \
+ "libstrip-1g" \
+ "C" \
+ "tmpdir/strip-1b-fat-s.o" \
+ ] \
+ [list \
+ "Build strip-1h (libstrip-1b-fat-s.a)" \
+ "" \
+ "-O2 -flto $lto_fat" \
+ { strip-1b-fat.c } \
+ {} \
+ "libstrip-1h" \
+ "C" \
+ "tmpdir/libstrip-1b-fat-s.a" \
+ ] \
+]
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 3a56fb5..f0d0954 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -1158,9 +1158,8 @@ remote_exec host "mv" "tmpdir/dump tmpdir/lto-5.o"
run_dump_test "lto-10r"
remote_exec host "mv" "tmpdir/dump tmpdir/lto-10.o"
set testname "nm mixed object"
-set lto_plugin [string trim [run_host_cmd "$CC_FOR_TARGET" "-print-prog-name=liblto_plugin.so"]]
-if { [ regexp "liblto_plugin.so" $lto_plugin ] } {
- set exec_output [run_host_cmd "$NM" "--plugin $lto_plugin tmpdir/lto-10.o"]
+if { $plug_opt != "" } {
+ set exec_output [run_host_cmd "$NM" "$plug_opt tmpdir/lto-10.o"]
if { [ regexp "(D|T) main" $exec_output ] } {
pass $testname
} else {
diff --git a/ld/testsuite/ld-plugin/pr25618a.h b/ld/testsuite/ld-plugin/pr25618a.h
index 9bf857c..04be194 100644
--- a/ld/testsuite/ld-plugin/pr25618a.h
+++ b/ld/testsuite/ld-plugin/pr25618a.h
@@ -1,2 +1 @@
-#pragma once
__attribute__((visibility("default"))) int bar();
diff --git a/ld/testsuite/ld-plugin/pr25618b.h b/ld/testsuite/ld-plugin/pr25618b.h
index cd80074..65e72a0 100644
--- a/ld/testsuite/ld-plugin/pr25618b.h
+++ b/ld/testsuite/ld-plugin/pr25618b.h
@@ -1,2 +1 @@
-#pragma once
__attribute__((visibility("default"))) int foo();
diff --git a/ld/testsuite/ld-plugin/strip-1a-fat.c b/ld/testsuite/ld-plugin/strip-1a-fat.c
new file mode 100644
index 0000000..03b2a5c
--- /dev/null
+++ b/ld/testsuite/ld-plugin/strip-1a-fat.c
@@ -0,0 +1 @@
+#include "strip-1a.c"
diff --git a/ld/testsuite/ld-plugin/strip-1a-fat.rd b/ld/testsuite/ld-plugin/strip-1a-fat.rd
new file mode 100644
index 0000000..aefe1c5
--- /dev/null
+++ b/ld/testsuite/ld-plugin/strip-1a-fat.rd
@@ -0,0 +1,6 @@
+#failif
+#...
+Section Headers:
+#...
+ \[[ 0-9]+\] \.gnu.lto_.*
+#...
diff --git a/ld/testsuite/ld-plugin/strip-1a-s-all.nd b/ld/testsuite/ld-plugin/strip-1a-s-all.nd
new file mode 100644
index 0000000..612ba6a
--- /dev/null
+++ b/ld/testsuite/ld-plugin/strip-1a-s-all.nd
@@ -0,0 +1,3 @@
+#...
+[0-9a-f]* C _?__gnu_lto_slim
+#pass
diff --git a/ld/testsuite/ld-plugin/strip-1a.c b/ld/testsuite/ld-plugin/strip-1a.c
new file mode 100644
index 0000000..d84af20
--- /dev/null
+++ b/ld/testsuite/ld-plugin/strip-1a.c
@@ -0,0 +1,4 @@
+extern void foo2(void);
+extern void foo3(void);
+void foo1(void) { foo3(); }
+int main(void) { foo2(); }
diff --git a/ld/testsuite/ld-plugin/strip-1b-fat.c b/ld/testsuite/ld-plugin/strip-1b-fat.c
new file mode 100644
index 0000000..1a2e4d2
--- /dev/null
+++ b/ld/testsuite/ld-plugin/strip-1b-fat.c
@@ -0,0 +1 @@
+#include "strip-1b.c"
diff --git a/ld/testsuite/ld-plugin/strip-1b-fat.rd b/ld/testsuite/ld-plugin/strip-1b-fat.rd
new file mode 100644
index 0000000..e3a266f
--- /dev/null
+++ b/ld/testsuite/ld-plugin/strip-1b-fat.rd
@@ -0,0 +1,5 @@
+#...
+Section Headers:
+#...
+ \[[ 0-9]+\] \.gnu.lto_.*
+#pass
diff --git a/ld/testsuite/ld-plugin/strip-1b.c b/ld/testsuite/ld-plugin/strip-1b.c
new file mode 100644
index 0000000..967872a
--- /dev/null
+++ b/ld/testsuite/ld-plugin/strip-1b.c
@@ -0,0 +1,3 @@
+extern void foo1(void);
+void foo2(void) { foo1(); }
+void foo3(void) {}
diff --git a/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp b/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp
index 9cb847d..e103df6 100644
--- a/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp
+++ b/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp
@@ -227,6 +227,14 @@ if [istarget "riscv*-*-*"] {
run_dump_test "data-reloc-rv64-addr32-pic"
run_dump_test "data-reloc-rv64-undef32-pic"
+ run_dump_test "property-zicfilp-unlabeled"
+ run_dump_test "property-zicfiss"
+ run_dump_test "property-combine-and-1"
+ run_dump_test "property-combine-and-2"
+ run_dump_test "property-combine-and-3"
+
+ run_dump_test "zicfilp-unlabeled-plt"
+
# IFUNC testcases.
# Check IFUNC by single type relocs.
run_dump_test_ifunc "ifunc-reloc-call-01" rv32 exe
diff --git a/ld/testsuite/ld-riscv-elf/property-combine-and-1.d b/ld/testsuite/ld-riscv-elf/property-combine-and-1.d
new file mode 100644
index 0000000..571620f
--- /dev/null
+++ b/ld/testsuite/ld-riscv-elf/property-combine-and-1.d
@@ -0,0 +1,6 @@
+#name: RISC-V GNU Property (multiple inputs, combine section) - 1
+#source: property1.s
+#source: property2.s
+#as: -march=rv64g
+#ld: -shared -melf64lriscv
+#readelf: -n
diff --git a/ld/testsuite/ld-riscv-elf/property-combine-and-2.d b/ld/testsuite/ld-riscv-elf/property-combine-and-2.d
new file mode 100644
index 0000000..23482af
--- /dev/null
+++ b/ld/testsuite/ld-riscv-elf/property-combine-and-2.d
@@ -0,0 +1,11 @@
+#name: RISC-V GNU Property (multiple inputs, combine section) - 2
+#source: property1.s
+#source: property3.s
+#as: -march=rv64g
+#ld: -shared -melf64lriscv
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+[ ]+Owner[ ]+Data size[ ]+Description
+[ ]+GNU[ ]+0x00000010[ ]+NT_GNU_PROPERTY_TYPE_0
+[ ]+Properties: RISC-V AND feature: CFI_LP_UNLABELED
diff --git a/ld/testsuite/ld-riscv-elf/property-combine-and-3.d b/ld/testsuite/ld-riscv-elf/property-combine-and-3.d
new file mode 100644
index 0000000..b57a0f7
--- /dev/null
+++ b/ld/testsuite/ld-riscv-elf/property-combine-and-3.d
@@ -0,0 +1,11 @@
+#name: RISC-V GNU Property (multiple inputs, combine section) - 3
+#source: property1.s
+#source: property4.s
+#as: -march=rv64g
+#ld: -shared -melf64lriscv
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+[ ]+Owner[ ]+Data size[ ]+Description
+[ ]+GNU[ ]+0x00000010[ ]+NT_GNU_PROPERTY_TYPE_0
+[ ]+Properties: RISC-V AND feature: CFI_SS
diff --git a/ld/testsuite/ld-riscv-elf/property-zicfilp-unlabeled.d b/ld/testsuite/ld-riscv-elf/property-zicfilp-unlabeled.d
new file mode 100644
index 0000000..48d60d6
--- /dev/null
+++ b/ld/testsuite/ld-riscv-elf/property-zicfilp-unlabeled.d
@@ -0,0 +1,10 @@
+#name: GNU Property (single input, CFI_LP_UNLABELED)
+#source: property-zicfilp-unlabeled.s
+#as: -march=rv64g
+#ld: -shared -melf64lriscv
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+[ ]+Owner[ ]+Data size[ ]+Description
+[ ]+GNU[ ]+0x00000010[ ]+NT_GNU_PROPERTY_TYPE_0
+[ ]+Properties: RISC-V AND feature: CFI_LP_UNLABELED
diff --git a/ld/testsuite/ld-riscv-elf/property-zicfilp-unlabeled.s b/ld/testsuite/ld-riscv-elf/property-zicfilp-unlabeled.s
new file mode 100644
index 0000000..b0192c0
--- /dev/null
+++ b/ld/testsuite/ld-riscv-elf/property-zicfilp-unlabeled.s
@@ -0,0 +1,21 @@
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ ret
+
+ .section ".note.gnu.property", "a"
+ .p2align 3
+ .long 1f - 0f /* name length */
+ .long 5f - 2f /* data length */
+ .long 5 /* note type */
+0: .asciz "GNU" /* vendor name */
+1:
+ .p2align 3
+2: .long 0xc0000000 /* pr_type. */
+ .long 4f - 3f /* pr_datasz. */
+3:
+ .long 0x1 /* GNU_PROPERTY_RISCV_FEATURE_1_CFI_LP_UNLABELED. */
+4:
+ .p2align 3
+5:
diff --git a/ld/testsuite/ld-riscv-elf/property-zicfiss.d b/ld/testsuite/ld-riscv-elf/property-zicfiss.d
new file mode 100644
index 0000000..0dec1a1
--- /dev/null
+++ b/ld/testsuite/ld-riscv-elf/property-zicfiss.d
@@ -0,0 +1,10 @@
+#name: GNU Property (single input, CFI_SS)
+#source: property-zicfiss.s
+#as: -march=rv64g
+#ld: -shared -melf64lriscv
+#readelf: -n
+
+Displaying notes found in: .note.gnu.property
+[ ]+Owner[ ]+Data size[ ]+Description
+[ ]+GNU[ ]+0x00000010[ ]+NT_GNU_PROPERTY_TYPE_0
+[ ]+Properties: RISC-V AND feature: CFI_SS
diff --git a/ld/testsuite/ld-riscv-elf/property-zicfiss.s b/ld/testsuite/ld-riscv-elf/property-zicfiss.s
new file mode 100644
index 0000000..21342ef
--- /dev/null
+++ b/ld/testsuite/ld-riscv-elf/property-zicfiss.s
@@ -0,0 +1,21 @@
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ ret
+
+ .section ".note.gnu.property", "a"
+ .p2align 3
+ .long 1f - 0f /* name length */
+ .long 5f - 2f /* data length */
+ .long 5 /* note type */
+0: .asciz "GNU" /* vendor name */
+1:
+ .p2align 3
+2: .long 0xc0000000 /* pr_type. */
+ .long 4f - 3f /* pr_datasz. */
+3:
+ .long 0x2 /* GNU_PROPERTY_RISCV_FEATURE_1_CFI_SS. */
+4:
+ .p2align 3
+5:
diff --git a/ld/testsuite/ld-riscv-elf/property1.s b/ld/testsuite/ld-riscv-elf/property1.s
new file mode 100644
index 0000000..622bbcb
--- /dev/null
+++ b/ld/testsuite/ld-riscv-elf/property1.s
@@ -0,0 +1,21 @@
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ ret
+
+ .section ".note.gnu.property", "a"
+ .p2align 3
+ .long 1f - 0f /* name length */
+ .long 5f - 2f /* data length */
+ .long 5 /* note type */
+0: .asciz "GNU" /* vendor name */
+1:
+ .p2align 3
+2: .long 0xc0000000 /* pr_type. */
+ .long 4f - 3f /* pr_datasz. */
+3:
+ .long 0x3 /* CFI_LP_UNLABELED and CFI_SS. */
+4:
+ .p2align 3
+5:
diff --git a/ld/testsuite/ld-riscv-elf/property2.s b/ld/testsuite/ld-riscv-elf/property2.s
new file mode 100644
index 0000000..4d1610c
--- /dev/null
+++ b/ld/testsuite/ld-riscv-elf/property2.s
@@ -0,0 +1,5 @@
+ .text
+ .globl foo
+ .type foo,@function
+foo:
+ ret
diff --git a/ld/testsuite/ld-riscv-elf/property3.s b/ld/testsuite/ld-riscv-elf/property3.s
new file mode 100644
index 0000000..61518fb
--- /dev/null
+++ b/ld/testsuite/ld-riscv-elf/property3.s
@@ -0,0 +1,21 @@
+ .text
+ .globl _start
+ .type _start,@function
+bar:
+ ret
+
+ .section ".note.gnu.property", "a"
+ .p2align 3
+ .long 1f - 0f /* name length */
+ .long 5f - 2f /* data length */
+ .long 5 /* note type */
+0: .asciz "GNU" /* vendor name */
+1:
+ .p2align 3
+2: .long 0xc0000000 /* pr_type. */
+ .long 4f - 3f /* pr_datasz. */
+3:
+ .long 0x1 /* CFI_LP_UNLABELED. */
+4:
+ .p2align 3
+5:
diff --git a/ld/testsuite/ld-riscv-elf/property4.s b/ld/testsuite/ld-riscv-elf/property4.s
new file mode 100644
index 0000000..54098a5
--- /dev/null
+++ b/ld/testsuite/ld-riscv-elf/property4.s
@@ -0,0 +1,21 @@
+ .text
+ .globl _start
+ .type _start,@function
+zoo:
+ ret
+
+ .section ".note.gnu.property", "a"
+ .p2align 3
+ .long 1f - 0f /* name length */
+ .long 5f - 2f /* data length */
+ .long 5 /* note type */
+0: .asciz "GNU" /* vendor name */
+1:
+ .p2align 3
+2: .long 0xc0000000 /* pr_type. */
+ .long 4f - 3f /* pr_datasz. */
+3:
+ .long 0x2 /* CFI_LP_SS. */
+4:
+ .p2align 3
+5:
diff --git a/ld/testsuite/ld-riscv-elf/zicfilp-unlabeled-plt.d b/ld/testsuite/ld-riscv-elf/zicfilp-unlabeled-plt.d
new file mode 100644
index 0000000..bb888d1
--- /dev/null
+++ b/ld/testsuite/ld-riscv-elf/zicfilp-unlabeled-plt.d
@@ -0,0 +1,35 @@
+#name: Unlabled landing pad PLT
+#source: zicfilp-unlabeled-plt.s
+#ld: -shared -melf64lriscv
+#objdump: -dr -j .plt
+#as: -march=rv64gc_zicfilp
+
+[^:]*: *file format elf64-.*riscv
+
+Disassembly of section \.plt:
+
+[0-9a-f]+ <\.plt>:
+.*:[ ]+[0-9a-f]+[ ]+lpad[ ]+0x0
+.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+t2,0x[0-9a-f]+
+.*:[ ]+[0-9a-f]+[ ]+sub[ ]+t1,t1,t3
+.*:[ ]+[0-9a-f]+[ ]+ld[ ]+t3,[0-9]+\(t2\) # [0-9a-f]+ <\.got\.plt>
+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+t1,t1,-64
+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+t0,t2,[0-9]+
+.*:[ ]+[0-9a-f]+[ ]+srli[ ]+t1,t1,0x1
+.*:[ ]+[0-9a-f]+[ ]+ld[ ]+t0,8\(t0\)
+.*:[ ]+[0-9a-f]+[ ]+jr[ ]+t3
+.*:[ ]+[0-9a-f]+[ ]+nop
+.*:[ ]+[0-9a-f]+[ ]+nop
+.*:[ ]+[0-9a-f]+[ ]+nop
+
+[0-9a-f]+ <foo@plt>:
+.*:[ ]+[0-9a-f]+[ ]+lpad[ ]+0x0
+.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+t3,0x[0-9a-f]+
+.*:[ ]+[0-9a-f]+[ ]+ld[ ]+t3,[0-9]+\(t3\) # [0-9a-f]+ <foo>
+.*:[ ]+[0-9a-f]+[ ]+jalr[ ]+t1,t3
+
+[0-9a-f]+ <bar@plt>:
+.*:[ ]+[0-9a-f]+[ ]+lpad[ ]+0x0
+.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+t3,0x1
+.*:[ ]+[0-9a-f]+[ ]+ld[ ]+t3,[0-9]+\(t3\) # [0-9a-f]+ <bar>
+.*:[ ]+[0-9a-f]+[ ]+jalr[ ]+t1,t3
diff --git a/ld/testsuite/ld-riscv-elf/zicfilp-unlabeled-plt.s b/ld/testsuite/ld-riscv-elf/zicfilp-unlabeled-plt.s
new file mode 100644
index 0000000..628fca8
--- /dev/null
+++ b/ld/testsuite/ld-riscv-elf/zicfilp-unlabeled-plt.s
@@ -0,0 +1,21 @@
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ call foo
+ call bar
+ .section ".note.gnu.property", "a"
+ .p2align 3
+ .long 1f - 0f /* name length */
+ .long 5f - 2f /* data length */
+ .long 5 /* note type */
+0: .asciz "GNU" /* vendor name */
+1:
+ .p2align 3
+2: .long 0xc0000000 /* pr_type. */
+ .long 4f - 3f /* pr_datasz. */
+3:
+ .long 0x1 /* CFI_LP. */
+4:
+ .p2align 3
+5:
diff --git a/ld/testsuite/ld-s390/pr32969_64-1.dd b/ld/testsuite/ld-s390/pr32969_64-1.dd
new file mode 100644
index 0000000..fce262f
--- /dev/null
+++ b/ld/testsuite/ld-s390/pr32969_64-1.dd
@@ -0,0 +1,15 @@
+tmpdir/pr32969_64-1: file format elf64-s390
+
+Disassembly of section .text:
+
+.* <_start>:
+.*: c0 10 00 00 00 0e [ ]*larl %r1,10000cc <foo>
+.*: c4 18 00 00 08 1d [ ]*lgrl %r1,10010f0 <_GLOBAL_OFFSET_TABLE_\+0x20>
+
+.* <b>:
+.*: c4 18 00 00 08 1a [ ]*lgrl %r1,10010f0 <_GLOBAL_OFFSET_TABLE_\+0x20>
+#?.* 07 07 [ ]*nopr %r7
+
+.* <c>:
+.* c4 18 00 00 08 16 [ ]*lgrl %r1,10010f0 <_GLOBAL_OFFSET_TABLE_\+0x20>
+#?.* 07 07 [ ]*nopr %r7
diff --git a/ld/testsuite/ld-s390/pr32969_64-2.dd b/ld/testsuite/ld-s390/pr32969_64-2.dd
new file mode 100644
index 0000000..88c770e
--- /dev/null
+++ b/ld/testsuite/ld-s390/pr32969_64-2.dd
@@ -0,0 +1,15 @@
+tmpdir/pr32969_64-2: file format elf64-s390
+
+Disassembly of section .text:
+
+.* <_start>:
+.*: c0 10 00 00 00 0e [ ]*larl %r1,10000cc <foo>
+.*: c0 10 00 00 00 0c [ ]*larl %r1,10000ce <bar>
+
+.* <c>:
+.*: c0 10 00 00 00 09 [ ]*larl %r1,10000ce <bar>
+#?.* 07 07 [ ]*nopr %r7
+
+.* <b>:
+.* c0 10 00 00 00 05 [ ]*larl %r1,10000ce <bar>
+#?.* 07 07 [ ]*nopr %r7
diff --git a/ld/testsuite/ld-s390/pr32969a.s b/ld/testsuite/ld-s390/pr32969a.s
new file mode 100644
index 0000000..baee6ca
--- /dev/null
+++ b/ld/testsuite/ld-s390/pr32969a.s
@@ -0,0 +1,14 @@
+ .text
+ .globl _start
+ .type _start,@function
+_start:
+ lgrl %r1,foo@GOTENT
+ lgrl %r1,bar@GOTENT
+
+ .section .rodata,"a",@progbits
+ .align 1
+ .globl foo
+ .type foo,@object
+foo:
+ .byte 0xa
+ .size foo, .-foo
diff --git a/ld/testsuite/ld-s390/pr32969b.s b/ld/testsuite/ld-s390/pr32969b.s
new file mode 100644
index 0000000..54ee369
--- /dev/null
+++ b/ld/testsuite/ld-s390/pr32969b.s
@@ -0,0 +1,10 @@
+b:
+ lgrl %r1,bar@GOTENT
+
+ .section .rodata,"aG",@progbits,bar_group,comdat
+ .align 1
+ .globl bar
+ .type bar,@object
+bar:
+ .byte 0xb
+ .size bar, .-bar
diff --git a/ld/testsuite/ld-s390/pr32969c.s b/ld/testsuite/ld-s390/pr32969c.s
new file mode 100644
index 0000000..02cf584
--- /dev/null
+++ b/ld/testsuite/ld-s390/pr32969c.s
@@ -0,0 +1,10 @@
+c:
+ lgrl %r1,bar@GOTENT
+
+ .section .rodata,"aG",@progbits,bar_group,comdat
+ .align 2
+ .globl bar
+ .type bar,@object
+bar:
+ .byte 0xc
+ .size bar, .-bar
diff --git a/ld/testsuite/ld-s390/s390.exp b/ld/testsuite/ld-s390/s390.exp
index d91eeac..aaba88d 100644
--- a/ld/testsuite/ld-s390/s390.exp
+++ b/ld/testsuite/ld-s390/s390.exp
@@ -125,6 +125,14 @@ set s390xtests {
"-m elf64_s390 tmpdir/libpltlib_64.so" "" "-m64" {plt_64-1.s}
{{objdump "-dzrj.plt" plt_64-1.pd} {readelf "-wf" plt_64-1_eh.wf}}
"plt_64-1_eh"}
+ {"PR32969-1: do not rewrite load of misaligned COMDAT symbol address"
+ "-m elf64_s390" "" "-m64" {pr32969a.s pr32969b.s pr32969c.s}
+ {{objdump "-dzrj.text" pr32969_64-1.dd}}
+ "pr32969_64-1"}
+ {"PR32969-2: rewrite load of aligned COMDAT symbol address"
+ "-m elf64_s390" "" "-m64" {pr32969a.s pr32969c.s pr32969b.s}
+ {{objdump "-dzrj.text" pr32969_64-2.dd}}
+ "pr32969_64-2"}
}
if [istarget "s390-*-*"] {
diff --git a/ld/testsuite/ld-tic6x/discard-unwind.ld b/ld/testsuite/ld-tic6x/discard-unwind.ld
index 00582c1..172e2a8 100644
--- a/ld/testsuite/ld-tic6x/discard-unwind.ld
+++ b/ld/testsuite/ld-tic6x/discard-unwind.ld
@@ -11,5 +11,5 @@ SECTIONS
*(.c6xabi.extab*)
} =0
/DISCARD/ : { *(.c6xabi.exidx*) }
- .c6xabi.attribues 0 : { *(.c6xabi.atttributes) }
+ .c6xabi.attributes 0 : { *(.c6xabi.attributes) }
}
diff --git a/ld/testsuite/ld-tic6x/unwind.ld b/ld/testsuite/ld-tic6x/unwind.ld
index a4f8722..01ba9b6 100644
--- a/ld/testsuite/ld-tic6x/unwind.ld
+++ b/ld/testsuite/ld-tic6x/unwind.ld
@@ -16,5 +16,5 @@ SECTIONS
.got : { *(.got) *(.got.plt)}
. = 0x12340000;
.far : { *(.far) }
- .c6xabi.attribues 0 : { *(.c6xabi.atttributes) }
+ .c6xabi.attributes 0 : { *(.c6xabi.attributes) }
}
diff --git a/ld/testsuite/ld-x86-64/dwarf4.s b/ld/testsuite/ld-x86-64/dwarf4.s
new file mode 100644
index 0000000..7f1a90d
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/dwarf4.s
@@ -0,0 +1,346 @@
+/* Assembly outputs of
+
+extern void bar();
+
+void foo(int p) {
+ int local = p;
+ bar();
+ local = 123;
+ bar();
+ local = 456;
+}
+
+compiled by GCC 14.2.1 with -O2 -g -dA -gdwarf-4. */
+
+ .file "dwarf4.c"
+ .text
+.Ltext0:
+ .file 1 "dwarf4.c"
+ .p2align 4
+ .globl foo
+ .type foo, @function
+foo:
+.LVL0:
+ # DEBUG p => di
+.LFB0:
+ # dwarf4.c:3:17
+ .loc 1 3 17 view -0
+ .cfi_startproc
+# BLOCK 2, count:1073741824 (estimated locally) seq:0
+# PRED: ENTRY [always] count:1073741824 (estimated locally, freq 1.0000) (FALLTHRU)
+ # dwarf4.c:4:3
+ .loc 1 4 3 view .LVU1
+ # DEBUG local => di
+ # dwarf4.c:5:3
+ .loc 1 5 3 view .LVU2
+ # dwarf4.c:3:17
+ .loc 1 3 17 is_stmt 0 view .LVU3
+ subq $8, %rsp
+ .cfi_def_cfa_offset 16
+ # dwarf4.c:5:3
+ .loc 1 5 3 view .LVU4
+ xorl %eax, %eax
+ call bar
+.LVL1:
+ # DEBUG local => entry_value#0
+ # DEBUG p => entry_value#0
+ # dwarf4.c:6:3
+ .loc 1 6 3 is_stmt 1 view .LVU5
+ # DEBUG local => 0x7b
+ # dwarf4.c:7:3
+ .loc 1 7 3 view .LVU6
+ xorl %eax, %eax
+ # dwarf4.c:9:1
+ .loc 1 9 1 is_stmt 0 view .LVU7
+ addq $8, %rsp
+ .cfi_def_cfa_offset 8
+# SUCC: EXIT [always] count:1073741824 (estimated locally, freq 1.0000) (ABNORMAL,SIBCALL)
+ # dwarf4.c:7:3
+ .loc 1 7 3 view .LVU8
+ jmp bar
+.LVL2:
+ .cfi_endproc
+.LFE0:
+ .size foo, .-foo
+.Letext0:
+ .section .debug_info,"",@progbits
+.Ldebug_info0:
+ .long 0x9e # Length of Compilation Unit Info
+ .value 0x4 # DWARF version number
+ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section
+ .byte 0x8 # Pointer Size (in bytes)
+ .uleb128 0x1 # (DIE (0xb) DW_TAG_compile_unit)
+ .long .LASF0 # DW_AT_producer: "GNU C17 14.2.1 20240906 [releases/gcc-14 r14-10649-gaedf6f810ee] -mtune=generic -march=x86-64 -g -gdwarf-4 -O2"
+ .byte 0xc # DW_AT_language
+ .long .LASF1 # DW_AT_name: "dwarf4.c"
+ .long .LASF2 # DW_AT_comp_dir: "."
+ .quad .Ltext0 # DW_AT_low_pc
+ .quad .Letext0-.Ltext0 # DW_AT_high_pc
+ .long .Ldebug_line0 # DW_AT_stmt_list
+ .uleb128 0x2 # (DIE (0x2d) DW_TAG_subprogram)
+ # DW_AT_external
+ .ascii "bar\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (dwarf4.c)
+ .byte 0x1 # DW_AT_decl_line
+ .byte 0xd # DW_AT_decl_column
+ # DW_AT_declaration
+ .long 0x3b # DW_AT_sibling
+ .uleb128 0x3 # (DIE (0x39) DW_TAG_unspecified_parameters)
+ .byte 0 # end of children of DIE 0x2d
+ .uleb128 0x4 # (DIE (0x3b) DW_TAG_subprogram)
+ # DW_AT_external
+ .ascii "foo\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (dwarf4.c)
+ .byte 0x3 # DW_AT_decl_line
+ .byte 0x6 # DW_AT_decl_column
+ # DW_AT_prototyped
+ .quad .LFB0 # DW_AT_low_pc
+ .quad .LFE0-.LFB0 # DW_AT_high_pc
+ .uleb128 0x1 # DW_AT_frame_base
+ .byte 0x9c # DW_OP_call_frame_cfa
+ # DW_AT_GNU_all_call_sites
+ .long 0x9a # DW_AT_sibling
+ .uleb128 0x5 # (DIE (0x59) DW_TAG_formal_parameter)
+ .ascii "p\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (dwarf4.c)
+ .byte 0x3 # DW_AT_decl_line
+ .byte 0xe # DW_AT_decl_column
+ .long 0x9a # DW_AT_type
+ .long .LLST0 # DW_AT_location
+ .long .LVUS0 # DW_AT_GNU_locviews
+ .uleb128 0x6 # (DIE (0x6b) DW_TAG_variable)
+ .long .LASF3 # DW_AT_name: "local"
+ .byte 0x1 # DW_AT_decl_file (dwarf4.c)
+ .byte 0x4 # DW_AT_decl_line
+ .byte 0x7 # DW_AT_decl_column
+ .long 0x9a # DW_AT_type
+ .long .LLST1 # DW_AT_location
+ .long .LVUS1 # DW_AT_GNU_locviews
+ .uleb128 0x7 # (DIE (0x7f) DW_TAG_GNU_call_site)
+ .quad .LVL1 # DW_AT_low_pc
+ .long 0x2d # DW_AT_abstract_origin
+ .uleb128 0x8 # (DIE (0x8c) DW_TAG_GNU_call_site)
+ .quad .LVL2 # DW_AT_low_pc
+ # DW_AT_GNU_tail_call
+ .long 0x2d # DW_AT_abstract_origin
+ .byte 0 # end of children of DIE 0x3b
+ .uleb128 0x9 # (DIE (0x9a) DW_TAG_base_type)
+ .byte 0x4 # DW_AT_byte_size
+ .byte 0x5 # DW_AT_encoding
+ .ascii "int\0" # DW_AT_name
+ .byte 0 # end of children of DIE 0xb
+ .section .debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+ .uleb128 0x1 # (abbrev code)
+ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x25 # (DW_AT_producer)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x13 # (DW_AT_language)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x1b # (DW_AT_comp_dir)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x12 # (DW_AT_high_pc)
+ .uleb128 0x7 # (DW_FORM_data8)
+ .uleb128 0x10 # (DW_AT_stmt_list)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .byte 0
+ .byte 0
+ .uleb128 0x2 # (abbrev code)
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x3f # (DW_AT_external)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x39 # (DW_AT_decl_column)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3c # (DW_AT_declaration)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x1 # (DW_AT_sibling)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0x3 # (abbrev code)
+ .uleb128 0x18 # (TAG: DW_TAG_unspecified_parameters)
+ .byte 0 # DW_children_no
+ .byte 0
+ .byte 0
+ .uleb128 0x4 # (abbrev code)
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x3f # (DW_AT_external)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x39 # (DW_AT_decl_column)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x27 # (DW_AT_prototyped)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x12 # (DW_AT_high_pc)
+ .uleb128 0x7 # (DW_FORM_data8)
+ .uleb128 0x40 # (DW_AT_frame_base)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .uleb128 0x2117 # (DW_AT_GNU_all_call_sites)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x1 # (DW_AT_sibling)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0x5 # (abbrev code)
+ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
+ .byte 0 # DW_children_no
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x39 # (DW_AT_decl_column)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x2 # (DW_AT_location)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .uleb128 0x2137 # (DW_AT_GNU_locviews)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .byte 0
+ .byte 0
+ .uleb128 0x6 # (abbrev code)
+ .uleb128 0x34 # (TAG: DW_TAG_variable)
+ .byte 0 # DW_children_no
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x39 # (DW_AT_decl_column)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x2 # (DW_AT_location)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .uleb128 0x2137 # (DW_AT_GNU_locviews)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .byte 0
+ .byte 0
+ .uleb128 0x7 # (abbrev code)
+ .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site)
+ .byte 0 # DW_children_no
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x31 # (DW_AT_abstract_origin)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0x8 # (abbrev code)
+ .uleb128 0x4109 # (TAG: DW_TAG_GNU_call_site)
+ .byte 0 # DW_children_no
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x2115 # (DW_AT_GNU_tail_call)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x31 # (DW_AT_abstract_origin)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0x9 # (abbrev code)
+ .uleb128 0x24 # (TAG: DW_TAG_base_type)
+ .byte 0 # DW_children_no
+ .uleb128 0xb # (DW_AT_byte_size)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3e # (DW_AT_encoding)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .byte 0
+ .byte 0
+ .byte 0
+ .section .debug_loc,"",@progbits
+.Ldebug_loc0:
+.LVUS0:
+ .uleb128 0 # View list begin (*.LVUS0)
+ .uleb128 .LVU5 # View list end (*.LVUS0)
+ .uleb128 .LVU5 # View list begin (*.LVUS0)
+ .uleb128 0 # View list end (*.LVUS0)
+.LLST0:
+ .quad .LVL0-.Ltext0 # Location list begin address (*.LLST0)
+ .quad .LVL1-1-.Ltext0 # Location list end address (*.LLST0)
+ .value 0x1 # Location expression size
+ .byte 0x55 # DW_OP_reg5
+ .quad .LVL1-1-.Ltext0 # Location list begin address (*.LLST0)
+ .quad .LFE0-.Ltext0 # Location list end address (*.LLST0)
+ .value 0x4 # Location expression size
+ .byte 0xf3 # DW_OP_GNU_entry_value
+ .uleb128 0x1
+ .byte 0x55 # DW_OP_reg5
+ .byte 0x9f # DW_OP_stack_value
+ .quad 0 # Location list terminator begin (*.LLST0)
+ .quad 0 # Location list terminator end (*.LLST0)
+.LVUS1:
+ .uleb128 .LVU2 # View list begin (*.LVUS1)
+ .uleb128 .LVU5 # View list end (*.LVUS1)
+ .uleb128 .LVU5 # View list begin (*.LVUS1)
+ .uleb128 .LVU6 # View list end (*.LVUS1)
+ .uleb128 .LVU6 # View list begin (*.LVUS1)
+ .uleb128 0 # View list end (*.LVUS1)
+.LLST1:
+ .quad .LVL0-.Ltext0 # Location list begin address (*.LLST1)
+ .quad .LVL1-1-.Ltext0 # Location list end address (*.LLST1)
+ .value 0x1 # Location expression size
+ .byte 0x55 # DW_OP_reg5
+ .quad .LVL1-1-.Ltext0 # Location list begin address (*.LLST1)
+ .quad .LVL1-.Ltext0 # Location list end address (*.LLST1)
+ .value 0x4 # Location expression size
+ .byte 0xf3 # DW_OP_GNU_entry_value
+ .uleb128 0x1
+ .byte 0x55 # DW_OP_reg5
+ .byte 0x9f # DW_OP_stack_value
+ .quad .LVL1-.Ltext0 # Location list begin address (*.LLST1)
+ .quad .LFE0-.Ltext0 # Location list end address (*.LLST1)
+ .value 0x3 # Location expression size
+ .byte 0x8 # DW_OP_const1u
+ .byte 0x7b
+ .byte 0x9f # DW_OP_stack_value
+ .quad 0 # Location list terminator begin (*.LLST1)
+ .quad 0 # Location list terminator end (*.LLST1)
+ .section .debug_aranges,"",@progbits
+ .long 0x2c # Length of Address Ranges Info
+ .value 0x2 # DWARF aranges version
+ .long .Ldebug_info0 # Offset of Compilation Unit Info
+ .byte 0x8 # Size of Address
+ .byte 0 # Size of Segment Descriptor
+ .value 0 # Pad to 16 byte boundary
+ .value 0
+ .quad .Ltext0 # Address
+ .quad .Letext0-.Ltext0 # Length
+ .quad 0
+ .quad 0
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .section .debug_str,"MS",@progbits,1
+.LASF0:
+ .string "GNU C17 14.2.1 20240906 [releases/gcc-14 r14-10649-gaedf6f810ee] -mtune=generic -march=x86-64 -g -gdwarf-4 -O2"
+.LASF1:
+ .string "dwarf4.c"
+.LASF3:
+ .string "local"
+.LASF2:
+ .string "."
+ .ident "GCC: (GNU) 14.2.1 20240906 [releases/gcc-14 r14-10649-gaedf6f810ee]"
+ .section .note.GNU-stack,"",@progbits
diff --git a/ld/testsuite/ld-x86-64/dwarf5a.s b/ld/testsuite/ld-x86-64/dwarf5a.s
new file mode 100644
index 0000000..eefaaf4
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/dwarf5a.s
@@ -0,0 +1,400 @@
+/* Assembly outputs of
+
+extern void foo(int);
+
+int global;
+
+int main() {
+ int local = global;
+ foo(1);
+ local = 123;
+ foo(2);
+ local = 456;
+ return 0;
+}
+
+compiled by GCC 14.2.1 with -O2 -g -dA -gdwarf-5. */
+
+ .file "dwarf5a.c"
+ .text
+.Ltext0:
+ .file 0 "." "dwarf5a.c"
+ .section .text.startup,"ax",@progbits
+ .p2align 4
+ .globl main
+ .type main, @function
+main:
+.LFB0:
+ .file 1 "dwarf5a.c"
+ # dwarf5a.c:5:12
+ .loc 1 5 12 view -0
+ .cfi_startproc
+# BLOCK 2, count:1073741824 (estimated locally) seq:0
+# PRED: ENTRY [always] count:1073741824 (estimated locally, freq 1.0000) (FALLTHRU)
+ # dwarf5a.c:6:3
+ .loc 1 6 3 view .LVU1
+.LVL0:
+ # DEBUG local => [`global']
+ # dwarf5a.c:7:3
+ .loc 1 7 3 view .LVU2
+ # dwarf5a.c:5:12
+ .loc 1 5 12 is_stmt 0 view .LVU3
+ subq $8, %rsp
+ .cfi_def_cfa_offset 16
+ # dwarf5a.c:7:3
+ .loc 1 7 3 view .LVU4
+ movl $1, %edi
+ call foo
+.LVL1:
+ # DEBUG local RESET
+ # dwarf5a.c:8:3
+ .loc 1 8 3 is_stmt 1 view .LVU5
+ # DEBUG local => 0x7b
+ # dwarf5a.c:9:3
+ .loc 1 9 3 view .LVU6
+ movl $2, %edi
+ call foo
+.LVL2:
+ # dwarf5a.c:10:3
+ .loc 1 10 3 view .LVU7
+ # DEBUG local => 0x1c8
+ # dwarf5a.c:11:3
+ .loc 1 11 3 view .LVU8
+ # dwarf5a.c:12:1
+ .loc 1 12 1 is_stmt 0 view .LVU9
+ xorl %eax, %eax
+ addq $8, %rsp
+ .cfi_def_cfa_offset 8
+# SUCC: EXIT [always] count:1073741824 (estimated locally, freq 1.0000)
+ ret
+ .cfi_endproc
+.LFE0:
+ .size main, .-main
+ .globl global
+ .bss
+ .align 4
+ .type global, @object
+ .size global, 4
+global:
+ .zero 4
+ .text
+.Letext0:
+ .section .debug_info,"",@progbits
+.Ldebug_info0:
+ .long 0xb3 # Length of Compilation Unit Info
+ .value 0x5 # DWARF version number
+ .byte 0x1 # DW_UT_compile
+ .byte 0x8 # Pointer Size (in bytes)
+ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section
+ .uleb128 0x2 # (DIE (0xc) DW_TAG_compile_unit)
+ .long .LASF4 # DW_AT_producer: "GNU C17 14.2.1 20240906 [releases/gcc-14 r14-10649-gaedf6f810ee] -mtune=generic -march=x86-64 -g -gdwarf-5 -O2"
+ .byte 0x1d # DW_AT_language
+ .long .LASF0 # DW_AT_name: "dwarf5a.c"
+ .long .LASF1 # DW_AT_comp_dir: "."
+ .long .LLRL1 # DW_AT_ranges
+ .quad 0 # DW_AT_low_pc
+ .long .Ldebug_line0 # DW_AT_stmt_list
+ .uleb128 0x3 # (DIE (0x2a) DW_TAG_variable)
+ .long .LASF2 # DW_AT_name: "global"
+ .byte 0x1 # DW_AT_decl_file (dwarf5a.c)
+ .byte 0x3 # DW_AT_decl_line
+ .byte 0x5 # DW_AT_decl_column
+ .long 0x40 # DW_AT_type
+ # DW_AT_external
+ .uleb128 0x9 # DW_AT_location
+ .byte 0x3 # DW_OP_addr
+ .quad global
+ .uleb128 0x4 # (DIE (0x40) DW_TAG_base_type)
+ .byte 0x4 # DW_AT_byte_size
+ .byte 0x5 # DW_AT_encoding
+ .ascii "int\0" # DW_AT_name
+ .uleb128 0x5 # (DIE (0x47) DW_TAG_subprogram)
+ # DW_AT_external
+ .ascii "foo\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (dwarf5a.c)
+ .byte 0x1 # DW_AT_decl_line
+ .byte 0xd # DW_AT_decl_column
+ # DW_AT_prototyped
+ # DW_AT_declaration
+ .long 0x59 # DW_AT_sibling
+ .uleb128 0x6 # (DIE (0x53) DW_TAG_formal_parameter)
+ .long 0x40 # DW_AT_type
+ .byte 0 # end of children of DIE 0x47
+ .uleb128 0x7 # (DIE (0x59) DW_TAG_subprogram)
+ # DW_AT_external
+ .long .LASF5 # DW_AT_name: "main"
+ .byte 0x1 # DW_AT_decl_file (dwarf5a.c)
+ .byte 0x5 # DW_AT_decl_line
+ .byte 0x5 # DW_AT_decl_column
+ .long 0x40 # DW_AT_type
+ .quad .LFB0 # DW_AT_low_pc
+ .quad .LFE0-.LFB0 # DW_AT_high_pc
+ .uleb128 0x1 # DW_AT_frame_base
+ .byte 0x9c # DW_OP_call_frame_cfa
+ # DW_AT_call_all_calls
+ .uleb128 0x8 # (DIE (0x77) DW_TAG_variable)
+ .long .LASF3 # DW_AT_name: "local"
+ .byte 0x1 # DW_AT_decl_file (dwarf5a.c)
+ .byte 0x6 # DW_AT_decl_line
+ .byte 0x7 # DW_AT_decl_column
+ .long 0x40 # DW_AT_type
+ .long .LLST0 # DW_AT_location
+ .long .LVUS0 # DW_AT_GNU_locviews
+ .uleb128 0x9 # (DIE (0x8b) DW_TAG_call_site)
+ .quad .LVL1 # DW_AT_call_return_pc
+ .long 0x47 # DW_AT_call_origin
+ .long 0xa2 # DW_AT_sibling
+ .uleb128 0x1 # (DIE (0x9c) DW_TAG_call_site_parameter)
+ .uleb128 0x1 # DW_AT_location
+ .byte 0x55 # DW_OP_reg5
+ .uleb128 0x1 # DW_AT_call_value
+ .byte 0x31 # DW_OP_lit1
+ .byte 0 # end of children of DIE 0x8b
+ .uleb128 0xa # (DIE (0xa2) DW_TAG_call_site)
+ .quad .LVL2 # DW_AT_call_return_pc
+ .long 0x47 # DW_AT_call_origin
+ .uleb128 0x1 # (DIE (0xaf) DW_TAG_call_site_parameter)
+ .uleb128 0x1 # DW_AT_location
+ .byte 0x55 # DW_OP_reg5
+ .uleb128 0x1 # DW_AT_call_value
+ .byte 0x32 # DW_OP_lit2
+ .byte 0 # end of children of DIE 0xa2
+ .byte 0 # end of children of DIE 0x59
+ .byte 0 # end of children of DIE 0xc
+ .section .debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+ .uleb128 0x1 # (abbrev code)
+ .uleb128 0x49 # (TAG: DW_TAG_call_site_parameter)
+ .byte 0 # DW_children_no
+ .uleb128 0x2 # (DW_AT_location)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .uleb128 0x7e # (DW_AT_call_value)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .byte 0
+ .byte 0
+ .uleb128 0x2 # (abbrev code)
+ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x25 # (DW_AT_producer)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x13 # (DW_AT_language)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x1f # (DW_FORM_line_strp)
+ .uleb128 0x1b # (DW_AT_comp_dir)
+ .uleb128 0x1f # (DW_FORM_line_strp)
+ .uleb128 0x55 # (DW_AT_ranges)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x10 # (DW_AT_stmt_list)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .byte 0
+ .byte 0
+ .uleb128 0x3 # (abbrev code)
+ .uleb128 0x34 # (TAG: DW_TAG_variable)
+ .byte 0 # DW_children_no
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x39 # (DW_AT_decl_column)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x3f # (DW_AT_external)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x2 # (DW_AT_location)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .byte 0
+ .byte 0
+ .uleb128 0x4 # (abbrev code)
+ .uleb128 0x24 # (TAG: DW_TAG_base_type)
+ .byte 0 # DW_children_no
+ .uleb128 0xb # (DW_AT_byte_size)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3e # (DW_AT_encoding)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .byte 0
+ .byte 0
+ .uleb128 0x5 # (abbrev code)
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x3f # (DW_AT_external)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x39 # (DW_AT_decl_column)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x27 # (DW_AT_prototyped)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x3c # (DW_AT_declaration)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x1 # (DW_AT_sibling)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0x6 # (abbrev code)
+ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
+ .byte 0 # DW_children_no
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0x7 # (abbrev code)
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x3f # (DW_AT_external)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x39 # (DW_AT_decl_column)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x12 # (DW_AT_high_pc)
+ .uleb128 0x7 # (DW_FORM_data8)
+ .uleb128 0x40 # (DW_AT_frame_base)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .uleb128 0x7a # (DW_AT_call_all_calls)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .byte 0
+ .byte 0
+ .uleb128 0x8 # (abbrev code)
+ .uleb128 0x34 # (TAG: DW_TAG_variable)
+ .byte 0 # DW_children_no
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x39 # (DW_AT_decl_column)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x2 # (DW_AT_location)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .uleb128 0x2137 # (DW_AT_GNU_locviews)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .byte 0
+ .byte 0
+ .uleb128 0x9 # (abbrev code)
+ .uleb128 0x48 # (TAG: DW_TAG_call_site)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x7d # (DW_AT_call_return_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x7f # (DW_AT_call_origin)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x1 # (DW_AT_sibling)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0xa # (abbrev code)
+ .uleb128 0x48 # (TAG: DW_TAG_call_site)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x7d # (DW_AT_call_return_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x7f # (DW_AT_call_origin)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .byte 0
+ .section .debug_loclists,"",@progbits
+ .long .Ldebug_loc3-.Ldebug_loc2 # Length of Location Lists
+.Ldebug_loc2:
+ .value 0x5 # DWARF version number
+ .byte 0x8 # Address Size
+ .byte 0 # Segment Size
+ .long 0 # Offset Entry Count
+.Ldebug_loc0:
+.LVUS0:
+ .uleb128 .LVU2 # View list begin (*.LVUS0)
+ .uleb128 .LVU5 # View list end (*.LVUS0)
+ .uleb128 .LVU6 # View list begin (*.LVUS0)
+ .uleb128 .LVU8 # View list end (*.LVUS0)
+ .uleb128 .LVU8 # View list begin (*.LVUS0)
+ .uleb128 0 # View list end (*.LVUS0)
+.LLST0:
+ .byte 0x6 # DW_LLE_base_address (*.LLST0)
+ .quad .LVL0 # Base address (*.LLST0)
+ .byte 0x4 # DW_LLE_offset_pair (*.LLST0)
+ .uleb128 .LVL0-.LVL0 # Location list begin address (*.LLST0)
+ .uleb128 .LVL1-1-.LVL0 # Location list end address (*.LLST0)
+ .uleb128 0x9 # Location expression size
+ .byte 0x3 # DW_OP_addr
+ .quad global
+ .byte 0x4 # DW_LLE_offset_pair (*.LLST0)
+ .uleb128 .LVL1-.LVL0 # Location list begin address (*.LLST0)
+ .uleb128 .LVL2-.LVL0 # Location list end address (*.LLST0)
+ .uleb128 0x3 # Location expression size
+ .byte 0x8 # DW_OP_const1u
+ .byte 0x7b
+ .byte 0x9f # DW_OP_stack_value
+ .byte 0x4 # DW_LLE_offset_pair (*.LLST0)
+ .uleb128 .LVL2-.LVL0 # Location list begin address (*.LLST0)
+ .uleb128 .LFE0-.LVL0 # Location list end address (*.LLST0)
+ .uleb128 0x4 # Location expression size
+ .byte 0xa # DW_OP_const2u
+ .value 0x1c8
+ .byte 0x9f # DW_OP_stack_value
+ .byte 0 # DW_LLE_end_of_list (*.LLST0)
+.Ldebug_loc3:
+ .section .debug_aranges,"",@progbits
+ .long 0x2c # Length of Address Ranges Info
+ .value 0x2 # DWARF aranges version
+ .long .Ldebug_info0 # Offset of Compilation Unit Info
+ .byte 0x8 # Size of Address
+ .byte 0 # Size of Segment Descriptor
+ .value 0 # Pad to 16 byte boundary
+ .value 0
+ .quad .LFB0 # Address
+ .quad .LFE0-.LFB0 # Length
+ .quad 0
+ .quad 0
+ .section .debug_rnglists,"",@progbits
+.Ldebug_ranges0:
+ .long .Ldebug_ranges3-.Ldebug_ranges2 # Length of Range Lists
+.Ldebug_ranges2:
+ .value 0x5 # DWARF version number
+ .byte 0x8 # Address Size
+ .byte 0 # Segment Size
+ .long 0 # Offset Entry Count
+.LLRL1:
+ .byte 0x7 # DW_RLE_start_length (*.LLRL1)
+ .quad .LFB0 # Range begin address (*.LLRL1)
+ .uleb128 .LFE0-.LFB0 # Range length (*.LLRL1)
+ .byte 0 # DW_RLE_end_of_list (*.LLRL1)
+.Ldebug_ranges3:
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .section .debug_str,"MS",@progbits,1
+.LASF3:
+ .string "local"
+.LASF4:
+ .string "GNU C17 14.2.1 20240906 [releases/gcc-14 r14-10649-gaedf6f810ee] -mtune=generic -march=x86-64 -g -gdwarf-5 -O2"
+.LASF2:
+ .string "global"
+.LASF5:
+ .string "main"
+ .section .debug_line_str,"MS",@progbits,1
+.LASF0:
+ .string "dwarf5a.c"
+.LASF1:
+ .string "."
+ .ident "GCC: (GNU) 14.2.1 20240906 [releases/gcc-14 r14-10649-gaedf6f810ee]"
+ .section .note.GNU-stack,"",@progbits
diff --git a/ld/testsuite/ld-x86-64/dwarf5b.s b/ld/testsuite/ld-x86-64/dwarf5b.s
new file mode 100644
index 0000000..4d34469
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/dwarf5b.s
@@ -0,0 +1,345 @@
+/* Assembly outputs of
+
+extern void foo(int);
+
+extern int global;
+
+void
+bar (void)
+{
+ int local = global;
+ foo(local);
+ local = 123;
+ foo(local);
+ local = 456;
+}
+
+compiled by GCC 14.2.1 with -O2 -g -dA -gdwarf-5. */
+
+ .file "dwarf5b.c"
+ .text
+.Ltext0:
+ .file 0 "." "dwarf5b.c"
+ .p2align 4
+ .globl bar
+ .type bar, @function
+bar:
+.LFB0:
+ .file 1 "dwarf5b.c"
+ # dwarf5b.c:7:1
+ .loc 1 7 1 view -0
+ .cfi_startproc
+# BLOCK 2, count:1073741824 (estimated locally) seq:0
+# PRED: ENTRY [always] count:1073741824 (estimated locally, freq 1.0000) (FALLTHRU)
+ # dwarf5b.c:8:3
+ .loc 1 8 3 view .LVU1
+.LVL0:
+ # DEBUG local => [`global']
+ # dwarf5b.c:9:3
+ .loc 1 9 3 view .LVU2
+ # dwarf5b.c:7:1
+ .loc 1 7 1 is_stmt 0 view .LVU3
+ subq $8, %rsp
+ .cfi_def_cfa_offset 16
+ # dwarf5b.c:9:3
+ .loc 1 9 3 view .LVU4
+ movl global(%rip), %edi
+ call foo
+.LVL1:
+ # DEBUG local RESET
+ # dwarf5b.c:10:3
+ .loc 1 10 3 is_stmt 1 view .LVU5
+ # DEBUG local => 0x7b
+ # dwarf5b.c:11:3
+ .loc 1 11 3 view .LVU6
+ movl $123, %edi
+ # dwarf5b.c:13:1
+ .loc 1 13 1 is_stmt 0 view .LVU7
+ addq $8, %rsp
+ .cfi_def_cfa_offset 8
+# SUCC: EXIT [always] count:1073741824 (estimated locally, freq 1.0000) (ABNORMAL,SIBCALL)
+ # dwarf5b.c:11:3
+ .loc 1 11 3 view .LVU8
+ jmp foo
+.LVL2:
+ .cfi_endproc
+.LFE0:
+ .size bar, .-bar
+.Letext0:
+ .section .debug_info,"",@progbits
+.Ldebug_info0:
+ .long 0xa0 # Length of Compilation Unit Info
+ .value 0x5 # DWARF version number
+ .byte 0x1 # DW_UT_compile
+ .byte 0x8 # Pointer Size (in bytes)
+ .long .Ldebug_abbrev0 # Offset Into Abbrev. Section
+ .uleb128 0x1 # (DIE (0xc) DW_TAG_compile_unit)
+ .long .LASF4 # DW_AT_producer: "GNU C17 14.2.1 20240906 [releases/gcc-14 r14-10649-gaedf6f810ee] -mtune=generic -march=x86-64 -g -gdwarf-5 -O2"
+ .byte 0x1d # DW_AT_language
+ .long .LASF0 # DW_AT_name: "dwarf5b.c"
+ .long .LASF1 # DW_AT_comp_dir: "."
+ .quad .Ltext0 # DW_AT_low_pc
+ .quad .Letext0-.Ltext0 # DW_AT_high_pc
+ .long .Ldebug_line0 # DW_AT_stmt_list
+ .uleb128 0x2 # (DIE (0x2e) DW_TAG_variable)
+ .long .LASF2 # DW_AT_name: "global"
+ .byte 0x1 # DW_AT_decl_file (dwarf5b.c)
+ .byte 0x3 # DW_AT_decl_line
+ .byte 0xc # DW_AT_decl_column
+ .long 0x3a # DW_AT_type
+ # DW_AT_external
+ # DW_AT_declaration
+ .uleb128 0x3 # (DIE (0x3a) DW_TAG_base_type)
+ .byte 0x4 # DW_AT_byte_size
+ .byte 0x5 # DW_AT_encoding
+ .ascii "int\0" # DW_AT_name
+ .uleb128 0x4 # (DIE (0x41) DW_TAG_subprogram)
+ # DW_AT_external
+ .ascii "foo\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (dwarf5b.c)
+ .byte 0x1 # DW_AT_decl_line
+ .byte 0xd # DW_AT_decl_column
+ # DW_AT_prototyped
+ # DW_AT_declaration
+ .long 0x53 # DW_AT_sibling
+ .uleb128 0x5 # (DIE (0x4d) DW_TAG_formal_parameter)
+ .long 0x3a # DW_AT_type
+ .byte 0 # end of children of DIE 0x41
+ .uleb128 0x6 # (DIE (0x53) DW_TAG_subprogram)
+ # DW_AT_external
+ .ascii "bar\0" # DW_AT_name
+ .byte 0x1 # DW_AT_decl_file (dwarf5b.c)
+ .byte 0x6 # DW_AT_decl_line
+ .byte 0x1 # DW_AT_decl_column
+ # DW_AT_prototyped
+ .quad .LFB0 # DW_AT_low_pc
+ .quad .LFE0-.LFB0 # DW_AT_high_pc
+ .uleb128 0x1 # DW_AT_frame_base
+ .byte 0x9c # DW_OP_call_frame_cfa
+ # DW_AT_call_all_calls
+ .uleb128 0x7 # (DIE (0x6d) DW_TAG_variable)
+ .long .LASF3 # DW_AT_name: "local"
+ .byte 0x1 # DW_AT_decl_file (dwarf5b.c)
+ .byte 0x8 # DW_AT_decl_line
+ .byte 0x7 # DW_AT_decl_column
+ .long 0x3a # DW_AT_type
+ .long .LLST0 # DW_AT_location
+ .long .LVUS0 # DW_AT_GNU_locviews
+ .uleb128 0x8 # (DIE (0x81) DW_TAG_call_site)
+ .quad .LVL1 # DW_AT_call_return_pc
+ .long 0x41 # DW_AT_call_origin
+ .uleb128 0x9 # (DIE (0x8e) DW_TAG_call_site)
+ .quad .LVL2 # DW_AT_call_return_pc
+ # DW_AT_call_tail_call
+ .long 0x41 # DW_AT_call_origin
+ .uleb128 0xa # (DIE (0x9b) DW_TAG_call_site_parameter)
+ .uleb128 0x1 # DW_AT_location
+ .byte 0x55 # DW_OP_reg5
+ .uleb128 0x2 # DW_AT_call_value
+ .byte 0x8 # DW_OP_const1u
+ .byte 0x7b
+ .byte 0 # end of children of DIE 0x8e
+ .byte 0 # end of children of DIE 0x53
+ .byte 0 # end of children of DIE 0xc
+ .section .debug_abbrev,"",@progbits
+.Ldebug_abbrev0:
+ .uleb128 0x1 # (abbrev code)
+ .uleb128 0x11 # (TAG: DW_TAG_compile_unit)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x25 # (DW_AT_producer)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x13 # (DW_AT_language)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x1f # (DW_FORM_line_strp)
+ .uleb128 0x1b # (DW_AT_comp_dir)
+ .uleb128 0x1f # (DW_FORM_line_strp)
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x12 # (DW_AT_high_pc)
+ .uleb128 0x7 # (DW_FORM_data8)
+ .uleb128 0x10 # (DW_AT_stmt_list)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .byte 0
+ .byte 0
+ .uleb128 0x2 # (abbrev code)
+ .uleb128 0x34 # (TAG: DW_TAG_variable)
+ .byte 0 # DW_children_no
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x39 # (DW_AT_decl_column)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x3f # (DW_AT_external)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x3c # (DW_AT_declaration)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .byte 0
+ .byte 0
+ .uleb128 0x3 # (abbrev code)
+ .uleb128 0x24 # (TAG: DW_TAG_base_type)
+ .byte 0 # DW_children_no
+ .uleb128 0xb # (DW_AT_byte_size)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3e # (DW_AT_encoding)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .byte 0
+ .byte 0
+ .uleb128 0x4 # (abbrev code)
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x3f # (DW_AT_external)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x39 # (DW_AT_decl_column)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x27 # (DW_AT_prototyped)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x3c # (DW_AT_declaration)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x1 # (DW_AT_sibling)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0x5 # (abbrev code)
+ .uleb128 0x5 # (TAG: DW_TAG_formal_parameter)
+ .byte 0 # DW_children_no
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0x6 # (abbrev code)
+ .uleb128 0x2e # (TAG: DW_TAG_subprogram)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x3f # (DW_AT_external)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0x8 # (DW_FORM_string)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x39 # (DW_AT_decl_column)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x27 # (DW_AT_prototyped)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x11 # (DW_AT_low_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x12 # (DW_AT_high_pc)
+ .uleb128 0x7 # (DW_FORM_data8)
+ .uleb128 0x40 # (DW_AT_frame_base)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .uleb128 0x7a # (DW_AT_call_all_calls)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .byte 0
+ .byte 0
+ .uleb128 0x7 # (abbrev code)
+ .uleb128 0x34 # (TAG: DW_TAG_variable)
+ .byte 0 # DW_children_no
+ .uleb128 0x3 # (DW_AT_name)
+ .uleb128 0xe # (DW_FORM_strp)
+ .uleb128 0x3a # (DW_AT_decl_file)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x3b # (DW_AT_decl_line)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x39 # (DW_AT_decl_column)
+ .uleb128 0xb # (DW_FORM_data1)
+ .uleb128 0x49 # (DW_AT_type)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .uleb128 0x2 # (DW_AT_location)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .uleb128 0x2137 # (DW_AT_GNU_locviews)
+ .uleb128 0x17 # (DW_FORM_sec_offset)
+ .byte 0
+ .byte 0
+ .uleb128 0x8 # (abbrev code)
+ .uleb128 0x48 # (TAG: DW_TAG_call_site)
+ .byte 0 # DW_children_no
+ .uleb128 0x7d # (DW_AT_call_return_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x7f # (DW_AT_call_origin)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0x9 # (abbrev code)
+ .uleb128 0x48 # (TAG: DW_TAG_call_site)
+ .byte 0x1 # DW_children_yes
+ .uleb128 0x7d # (DW_AT_call_return_pc)
+ .uleb128 0x1 # (DW_FORM_addr)
+ .uleb128 0x82 # (DW_AT_call_tail_call)
+ .uleb128 0x19 # (DW_FORM_flag_present)
+ .uleb128 0x7f # (DW_AT_call_origin)
+ .uleb128 0x13 # (DW_FORM_ref4)
+ .byte 0
+ .byte 0
+ .uleb128 0xa # (abbrev code)
+ .uleb128 0x49 # (TAG: DW_TAG_call_site_parameter)
+ .byte 0 # DW_children_no
+ .uleb128 0x2 # (DW_AT_location)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .uleb128 0x7e # (DW_AT_call_value)
+ .uleb128 0x18 # (DW_FORM_exprloc)
+ .byte 0
+ .byte 0
+ .byte 0
+ .section .debug_loclists,"",@progbits
+ .long .Ldebug_loc3-.Ldebug_loc2 # Length of Location Lists
+.Ldebug_loc2:
+ .value 0x5 # DWARF version number
+ .byte 0x8 # Address Size
+ .byte 0 # Segment Size
+ .long 0 # Offset Entry Count
+.Ldebug_loc0:
+.LVUS0:
+ .uleb128 .LVU6 # View list begin (*.LVUS0)
+ .uleb128 0 # View list end (*.LVUS0)
+.LLST0:
+ .byte 0x4 # DW_LLE_offset_pair (*.LLST0)
+ .uleb128 .LVL1-.Ltext0 # Location list begin address (*.LLST0)
+ .uleb128 .LFE0-.Ltext0 # Location list end address (*.LLST0)
+ .uleb128 0x3 # Location expression size
+ .byte 0x8 # DW_OP_const1u
+ .byte 0x7b
+ .byte 0x9f # DW_OP_stack_value
+ .byte 0 # DW_LLE_end_of_list (*.LLST0)
+.Ldebug_loc3:
+ .section .debug_aranges,"",@progbits
+ .long 0x2c # Length of Address Ranges Info
+ .value 0x2 # DWARF aranges version
+ .long .Ldebug_info0 # Offset of Compilation Unit Info
+ .byte 0x8 # Size of Address
+ .byte 0 # Size of Segment Descriptor
+ .value 0 # Pad to 16 byte boundary
+ .value 0
+ .quad .Ltext0 # Address
+ .quad .Letext0-.Ltext0 # Length
+ .quad 0
+ .quad 0
+ .section .debug_line,"",@progbits
+.Ldebug_line0:
+ .section .debug_str,"MS",@progbits,1
+.LASF3:
+ .string "local"
+.LASF4:
+ .string "GNU C17 14.2.1 20240906 [releases/gcc-14 r14-10649-gaedf6f810ee] -mtune=generic -march=x86-64 -g -gdwarf-5 -O2"
+.LASF2:
+ .string "global"
+ .section .debug_line_str,"MS",@progbits,1
+.LASF1:
+ .string "."
+.LASF0:
+ .string "dwarf5b.c"
+ .ident "GCC: (GNU) 14.2.1 20240906 [releases/gcc-14 r14-10649-gaedf6f810ee]"
+ .section .note.GNU-stack,"",@progbits
diff --git a/ld/testsuite/ld-x86-64/pr32809.d b/ld/testsuite/ld-x86-64/pr32809.d
new file mode 100644
index 0000000..3affc23
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pr32809.d
@@ -0,0 +1,71 @@
+#source: dwarf5a.s
+#source: dwarf4.s
+#source: dwarf5b.s
+#as: --64
+#ld: -r -m elf_x86_64
+#readelf: --wide --debug-dump=loc
+
+Contents of the .*ebug_loc section:
+
+ Offset Begin End Expression
+
+ 00000000 v000000000000000 v000000000000000 location view pair
+ 00000002 v000000000000000 v000000000000000 location view pair
+
+ 00000004 v000000000000000 v000000000000000 views at 00000000 for:
+ 0000000000000000 000000000000000a \(DW_OP_reg5 \(rdi\)\)
+ 00000017 v000000000000000 v000000000000000 views at 00000002 for:
+ 000000000000000a 0000000000000016 \(DW_OP_GNU_entry_value: \(DW_OP_reg5 \(rdi\)\); DW_OP_stack_value\)
+ 0000002d <End of list>
+
+ 0000003d v000000000000002 v000000000000000 location view pair
+ 0000003f v000000000000000 v000000000000001 location view pair
+ 00000041 v000000000000001 v000000000000000 location view pair
+
+ 00000043 v000000000000002 v000000000000000 views at 0000003d for:
+ 0000000000000000 000000000000000a \(DW_OP_reg5 \(rdi\)\)
+ 00000056 v000000000000000 v000000000000001 views at 0000003f for:
+ 000000000000000a 000000000000000b \(DW_OP_GNU_entry_value: \(DW_OP_reg5 \(rdi\)\); DW_OP_stack_value\)
+ 0000006c v000000000000001 v000000000000000 views at 00000041 for:
+ 000000000000000b 0000000000000016 \(DW_OP_const1u: 123; DW_OP_stack_value\)
+ 00000081 <End of list>
+
+Contents of the .*ebug_loclists section:
+
+Table at Offset 0
+ Length: 0x34
+ DWARF version: 5
+ Address size: 8
+ Segment size: 0
+ Offset entries: 0
+
+ Offset Begin End Expression
+
+ 0000000c v000000000000002 v000000000000000 location view pair
+ 0000000e v000000000000001 v000000000000001 location view pair
+ 00000010 v000000000000001 v000000000000000 location view pair
+
+ 00000012 0000000000000000 \(base address\)
+ 0000001b v000000000000002 v000000000000000 views at 0000000c for:
+ 0000000000000000 000000000000000d \(DW_OP_addr: 0\)
+ 00000028 v000000000000001 v000000000000001 views at 0000000e for:
+ 000000000000000e 0000000000000018 \(DW_OP_const1u: 123; DW_OP_stack_value\)
+ 0000002f v000000000000001 v000000000000000 views at 00000010 for:
+ 0000000000000018 000000000000001f \(DW_OP_const2u: 456; DW_OP_stack_value\)
+ 00000037 <End of list>
+Table at Offset 0x38
+ Length: 0x12
+ DWARF version: 5
+ Address size: 8
+ Segment size: 0
+ Offset entries: 0
+
+ Offset Begin End Expression
+
+ 00000044 v000000000000001 v000000000000000 location view pair
+
+ 00000046 v000000000000001 v000000000000000 views at 00000044 for:
+ 000000000000002f 000000000000003d \(DW_OP_const1u: 123; DW_OP_stack_value\)
+ 0000004d <End of list>
+
+#pass
diff --git a/ld/testsuite/ld-x86-64/sframe-ibt-plt-1.d b/ld/testsuite/ld-x86-64/sframe-ibt-plt-1.d
index f868242..45bf99a 100644
--- a/ld/testsuite/ld-x86-64/sframe-ibt-plt-1.d
+++ b/ld/testsuite/ld-x86-64/sframe-ibt-plt-1.d
@@ -10,7 +10,8 @@ Contents of the SFrame section .sframe:
Header :
Version: SFRAME_VERSION_2
- Flags: SFRAME_F_FDE_SORTED
+ Flags: SFRAME_F_FDE_SORTED,
+ SFRAME_F_FDE_FUNC_START_PCREL
CFA fixed RA offset: \-8
#...
diff --git a/ld/testsuite/ld-x86-64/sframe-plt-1.d b/ld/testsuite/ld-x86-64/sframe-plt-1.d
index 2918ccb..d23540e 100644
--- a/ld/testsuite/ld-x86-64/sframe-plt-1.d
+++ b/ld/testsuite/ld-x86-64/sframe-plt-1.d
@@ -11,7 +11,8 @@ Contents of the SFrame section .sframe:
Header :
Version: SFRAME_VERSION_2
- Flags: SFRAME_F_FDE_SORTED
+ Flags: SFRAME_F_FDE_SORTED,
+ SFRAME_F_FDE_FUNC_START_PCREL
CFA fixed RA offset: \-8
#...
diff --git a/ld/testsuite/ld-x86-64/sframe-pltgot-1.d b/ld/testsuite/ld-x86-64/sframe-pltgot-1.d
index 6c47770..e2255b0 100644
--- a/ld/testsuite/ld-x86-64/sframe-pltgot-1.d
+++ b/ld/testsuite/ld-x86-64/sframe-pltgot-1.d
@@ -10,7 +10,8 @@ Contents of the SFrame section .sframe:
Header :
Version: SFRAME_VERSION_2
- Flags: SFRAME_F_FDE_SORTED
+ Flags: SFRAME_F_FDE_SORTED,
+ SFRAME_F_FDE_FUNC_START_PCREL
CFA fixed RA offset: \-8
#...
diff --git a/ld/testsuite/ld-x86-64/sframe-pltgot-2.d b/ld/testsuite/ld-x86-64/sframe-pltgot-2.d
index 141be29..52e712b 100644
--- a/ld/testsuite/ld-x86-64/sframe-pltgot-2.d
+++ b/ld/testsuite/ld-x86-64/sframe-pltgot-2.d
@@ -10,7 +10,8 @@ Contents of the SFrame section .sframe:
Header :
Version: SFRAME_VERSION_2
- Flags: SFRAME_F_FDE_SORTED
+ Flags: SFRAME_F_FDE_SORTED,
+ SFRAME_F_FDE_FUNC_START_PCREL
CFA fixed RA offset: \-8
#...
diff --git a/ld/testsuite/ld-x86-64/sframe-reloc-1.d b/ld/testsuite/ld-x86-64/sframe-reloc-1.d
new file mode 100644
index 0000000..19725e8
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/sframe-reloc-1.d
@@ -0,0 +1,35 @@
+#as: --gsframe
+#source: sframe-foo.s
+#source: sframe-bar.s
+#objdump: --sframe=.sframe
+#ld: -r --no-rosegment
+#name: SFrame simple link - relocatable
+
+.*: +file format .*
+
+Contents of the SFrame section .sframe:
+ Header :
+
+ Version: SFRAME_VERSION_2
+ Flags: SFRAME_F_FDE_SORTED,
+ SFRAME_F_FDE_FUNC_START_PCREL
+ CFA fixed RA offset: \-8
+ Num FDEs: 2
+ Num FREs: 8
+
+ Function Index :
+
+
+ func idx \[0\]: pc = 0x0, size = 53 bytes
+ STARTPC +CFA +FP +RA +
+ 0+0000 +sp\+8 +u +f +
+ 0+0001 +sp\+16 +c-16 +f +
+ 0+0004 +fp\+16 +c-16 +f +
+ 0+0034 +sp\+8 +c-16 +f +
+
+ func idx \[1\]: pc = 0x35, size = 37 bytes
+ STARTPC +CFA +FP +RA +
+ 0+0035 +sp\+8 +u +f +
+ 0+0036 +sp\+16 +c-16 +f +
+ 0+0039 +fp\+16 +c-16 +f +
+ 0+0059 +sp\+8 +c-16 +f +
diff --git a/ld/testsuite/ld-x86-64/sframe-simple-1.d b/ld/testsuite/ld-x86-64/sframe-simple-1.d
index 3effdbf..bb4142f 100644
--- a/ld/testsuite/ld-x86-64/sframe-simple-1.d
+++ b/ld/testsuite/ld-x86-64/sframe-simple-1.d
@@ -11,7 +11,8 @@ Contents of the SFrame section .sframe:
Header :
Version: SFRAME_VERSION_2
- Flags: SFRAME_F_FDE_SORTED
+ Flags: SFRAME_F_FDE_SORTED,
+ SFRAME_F_FDE_FUNC_START_PCREL
CFA fixed RA offset: \-8
#...
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 52c4d5e..a682b13 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -563,9 +563,11 @@ run_dump_test "pr32591-3"
run_dump_test "pr32591-3-x32"
run_dump_test "pr32591-4"
run_dump_test "pr32591-4-x32"
+run_dump_test "pr32809"
if { ![skip_sframe_tests] } {
run_dump_test "sframe-simple-1"
+ run_dump_test "sframe-reloc-1"
run_dump_test "sframe-plt-1"
run_dump_test "sframe-ibt-plt-1"
run_dump_test "sframe-pltgot-1"
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 9615271..119410b 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -860,14 +860,15 @@ proc run_ld_link_exec_tests { ldtests args } {
}
# List contains test-items with 3 items followed by 2 lists, one item and
-# one optional item:
+# 2 optional items:
# 0:name
-# 1:ld or ar options
+# 1:leading ld or ar options
# 2:compile options
# 3:filenames of source files
# 4:action and options.
# 5:name of output file
# 6:language (optional)
+# 7:trailing ld options (optional), placed after object files
#
# Actions:
# objdump: Apply objdump options on result. Compare with regex (last arg).
@@ -899,6 +900,7 @@ proc run_cc_link_tests { ldtests } {
set actions [lindex $testitem 4]
set binfile tmpdir/[lindex $testitem 5]
set lang [lindex $testitem 6]
+ set trailing_ldflags [lindex $testitem 7]
set objfiles {}
set is_unresolved 0
set failed 0
@@ -927,6 +929,7 @@ proc run_cc_link_tests { ldtests } {
#verbose -log "actions is $actions"
#verbose -log "binfile is $binfile"
#verbose -log "lang is $lang"
+ #verbose -log "trailing_ldflags is $trailing_ldflags"
foreach actionlist $actions {
set action [lindex $actionlist 0]
@@ -1006,7 +1009,7 @@ proc run_cc_link_tests { ldtests } {
untested $testname
continue
}
- ld_link $cc_cmd $binfile "-L$srcdir/$subdir $ldflags $objfiles"
+ ld_link $cc_cmd $binfile "-L$srcdir/$subdir $ldflags $objfiles $trailing_ldflags"
set ld_output "$exec_output"
if { $check_ld(source) == "regexp" } then {