]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
resize_sections Add testsuite changes
authorMatthew Malcomson <matthew.malcomson@arm.com>
Mon, 21 Feb 2022 13:18:28 +0000 (13:18 +0000)
committerMatthew Malcomson <matthew.malcomson@arm.com>
Mon, 21 Feb 2022 13:19:22 +0000 (13:19 +0000)
commitbc64cc9049a93b057b31864ed5c75f234a548673
treed4ee154e6d48d66367d988e5de1d59a87ab9b862
parent396742bf3607f0212d7bae1ea7238c34e7562164
resize_sections Add testsuite changes

Unfortunately writing a test for many of these changes was difficult
since we needed to check that thing A pointed to place B or that
thing A had a length that spanned places B and C.
Hence quite a few of the added testcases check for literal values.

These are problematic for a few different reasons, both that they may
not work with different configurations and because unrelated updates
need to update the tests.

We need to figure out a better way to test this.  We believe the
testsuite doesn't have facilities for checking this. For now we're
leaving making the tests robust for later.

Here we add all the tests which the recent patch series changes and
include updates to the existing tests.

Updated existing tests:

emit-relocs-morello-2.d
  needed updating since the new alignment meant the relocation fragment
  pointed to a different place.
emit-relocs-morello-7.d
  Needed updating because we added some padding, and re-laid the
  sections.  This just ended up with a layout with the .text section at
  a different location and with a different range.
emit-relocs-morello-8.d
  Just needed updating because the extra padding moved the .data.rel.ro
  section a bit.  The position of the relocation was not part of the
  test so we replaced that with an "any number" regex.
emit-morello-reloc-markers-{2,3}.d
  Needed updating because the PCC bounds required extra alignment and
  that was put on the first section in the PCC bounds.  That happened to
  be the section we were looking at.
morello-capinit.d
  Needed updating because this change actually fixed a problem with our
  calculation of the pcc bounds.  Now we calculate the pcc_low and
  pcc_high *after* having made all our adjustments, the bounds we add on
  the capability start at the first section we want to contain.
morello-stubs.d
  Updated just becase the location of our functions was changed due to
  the text section change.
morello-stubs-static.d
  Updated because the location of the .text_low section changed along
  with all the code in it.  Hence our stubs that needed to point to
  these functions also changed.
c64-ifunc-{2,2-local,3a}.d
  Updated because the .text section moved and hence the address of the
  foo function we wanted to point to was adjusted.
morello-sizeless-{got,global,local}-syms.d
  Again, .data .bss and .got sections ended up moved so addresses of the
  capabilities we wanted to point at all changed.
31 files changed:
ld/testsuite/ld-aarch64/aarch64-elf.exp
ld/testsuite/ld-aarch64/c64-ifunc-2-local.d
ld/testsuite/ld-aarch64/c64-ifunc-2.d
ld/testsuite/ld-aarch64/c64-ifunc-3a.d
ld/testsuite/ld-aarch64/emit-morello-reloc-markers-2.d
ld/testsuite/ld-aarch64/emit-morello-reloc-markers-3.d
ld/testsuite/ld-aarch64/emit-relocs-morello-2.d
ld/testsuite/ld-aarch64/emit-relocs-morello-7.d
ld/testsuite/ld-aarch64/emit-relocs-morello-7.s
ld/testsuite/ld-aarch64/emit-relocs-morello-8.d
ld/testsuite/ld-aarch64/morello-capinit.d
ld/testsuite/ld-aarch64/morello-pcc-bounds-include-readonly.d [new file with mode: 0644]
ld/testsuite/ld-aarch64/morello-pcc-bounds-include-readonly.ld [new file with mode: 0644]
ld/testsuite/ld-aarch64/morello-pcc-bounds-include-readonly.s [new file with mode: 0644]
ld/testsuite/ld-aarch64/morello-sec-round-adjust.d [new file with mode: 0644]
ld/testsuite/ld-aarch64/morello-sec-round-adjust.ld [new file with mode: 0644]
ld/testsuite/ld-aarch64/morello-sec-round-adjust.s [new file with mode: 0644]
ld/testsuite/ld-aarch64/morello-sec-round-data-only.d [new file with mode: 0644]
ld/testsuite/ld-aarch64/morello-sec-round-data-only.ld [new file with mode: 0644]
ld/testsuite/ld-aarch64/morello-sec-round-data-only.s [new file with mode: 0644]
ld/testsuite/ld-aarch64/morello-sec-round-include-relro.d [new file with mode: 0644]
ld/testsuite/ld-aarch64/morello-sec-round-include-relro.ld [new file with mode: 0644]
ld/testsuite/ld-aarch64/morello-sec-round-include-relro.s [new file with mode: 0644]
ld/testsuite/ld-aarch64/morello-sec-round-pcc-needed.d [new file with mode: 0644]
ld/testsuite/ld-aarch64/morello-sec-round-pcc-needed.s [new file with mode: 0644]
ld/testsuite/ld-aarch64/morello-sec-round.d
ld/testsuite/ld-aarch64/morello-sizeless-global-syms.d
ld/testsuite/ld-aarch64/morello-sizeless-got-syms.d
ld/testsuite/ld-aarch64/morello-sizeless-local-syms.d
ld/testsuite/ld-aarch64/morello-stubs-static.d
ld/testsuite/ld-aarch64/morello-stubs.d