]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fixing cap_meta
authorMatthew Malcomson <matthew.malcomson@arm.com>
Mon, 7 Feb 2022 16:19:41 +0000 (16:19 +0000)
committerMatthew Malcomson <matthew.malcomson@arm.com>
Mon, 7 Feb 2022 16:20:00 +0000 (16:20 +0000)
commitb235f0e0fd5a0f5444431fe8b72cf9154d785a5e
tree18c555f053a3b0440d23f6e19ed67e4d4a8eeeed
parent5fa80905897b81492bc9d04cd5f2e3b5f33bd8e0
Fixing cap_meta

It had two problems:

1) The linker was storing permission flags in the bottom byte and the
   size in the top 56 bits.  Newlib was looking for the permission flags
   in the top byte and the length in the bottom 56 bits of a uint64_t
   stored as bytes 8:16 of the fragment.
   N.b. The ABI requires a given storage order between the size and
   permission flags (as opposed to requiring a given uint64_t value be
   stored in the relevant position).  This means that our current
   implementation would not work for a hypothetical big-endian Morello.
2) The linker prioritised SEC_READONLY flags over SEC_CODE ones on the
   section, this meant that function symbols into the .text section
   (which has both flags on it) would be given read-only permissions
   rather than executable permissions.

This patch also must update all tests to account for this change.
15 files changed:
bfd/elfnn-aarch64.c
ld/testsuite/ld-aarch64/emit-relocs-morello-1.d
ld/testsuite/ld-aarch64/emit-relocs-morello-2-a64c.d
ld/testsuite/ld-aarch64/emit-relocs-morello-2.d
ld/testsuite/ld-aarch64/emit-relocs-morello-3-a64c.d
ld/testsuite/ld-aarch64/emit-relocs-morello-3.d
ld/testsuite/ld-aarch64/emit-relocs-morello-6.d
ld/testsuite/ld-aarch64/emit-relocs-morello-6b.d
ld/testsuite/ld-aarch64/emit-relocs-morello-7.d
ld/testsuite/ld-aarch64/emit-relocs-morello-a64c.d
ld/testsuite/ld-aarch64/emit-relocs-morello.d
ld/testsuite/ld-aarch64/morello-capinit.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