summaryrefslogtreecommitdiff
path: root/bfd/elfxx-tilegx.c
diff options
context:
space:
mode:
authorMatthew Malcomson <matthew.malcomson@arm.com>2022-11-04 10:01:52 +0000
committerMatthew Malcomson <matthew.malcomson@arm.com>2022-11-04 10:03:06 +0000
commitf8c6b621d4ed4cf68f595845f0222530f8d00de0 (patch)
treea873ab1ed8bcec09be42ce8ba2ef7251a1f64c54 /bfd/elfxx-tilegx.c
parentea22e23a0c9fbc97f7b501a9e3670c8ca764306b (diff)
downloadbinutils-gdb-f8c6b621d4ed4cf68f595845f0222530f8d00de0.tar.gz
Disable some symbol -> section_symbol + offset translations
We're disabling transformations of relocations against symbols like this in the assembler when the relocation is against something in the GOT and when the relocation is against something which generates a capability. For entries in the GOT we disable this transformation since the GNU bfd linker relies on indexing into its internal representation of the GOT using symbols and does not distiinguish between entries using the same symbol but different offsets. Hence transforming multiple symbols into the same section symbol with different offsets would mean that at least one will get an incorrect value. Relocations which require the static linker to emit dynamic relocations in order to generate capabilities (CAPINIT and capability relocations into the GOT) require symbol information so that the dynamic linker can put correct permissions and bounds on those relocations. NOTE: We get to use an existing testcase for this change, but it showed up something strange about objdump. One `adrp` instruction has changed in the output so that it shows as pointing to a different location. This happens to be an `objdump` quirk. Objdump looks at the relocation associated with an address and attempts to include that relocation when determining what address to print out. This mechanism has two problems, one is that objdump does not account for the offset in that relocation (only the symbol). Another is that on an object file (i.e. not a final executable) the virtual memory address of all sections is zero. These combined mean that the vma is miscalculated, and the translation from vma to symbol is not injective. In other words: the extra change in morello-ldst-reloc.d on top of switching the relocation symbols is in order to account for an objdump bug and not a problem with this gas change.
Diffstat (limited to 'bfd/elfxx-tilegx.c')
0 files changed, 0 insertions, 0 deletions