]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Account for LSB on c64 e_entry in the same way as Thumb
authorMatthew Malcomson <matthew.malcomson@arm.com>
Mon, 7 Mar 2022 18:10:49 +0000 (18:10 +0000)
committerMatthew Malcomson <matthew.malcomson@arm.com>
Mon, 7 Mar 2022 18:10:49 +0000 (18:10 +0000)
commite4f0a01cbda77a0ea9ddb7aa1ce19244ca311b82
treee3851a83e51cc446861349ccca10009fabc3652f
parentea41358b032f2811271c78ea45186aea95dbe3e1
Account for LSB on c64 e_entry in the same way as Thumb

The handling is done by putting the value that we want in a buffer and
using that as the entry_symbol.name which lang_end picks up.

Another option would be to find the entry symbol *after* lang_end has
finished (e.g. in elfNN_aarch64_init_file_header) and add the LSB to it
if that symbol is a C64 symbol.

This approach was mainly chosen in order to match more closely what
Thumb has done.

N.b. we set the LSB based on the LSB of the entry point symbol.
If the entry point symbol is in c64 code but is not an STT_FUNC (e.g.
it is an STT_NOTYPE) then the LSB will not be set.
This matches Morello clang behaviour.
ld/emultempl/aarch64elf.em
ld/testsuite/ld-aarch64/aarch64-elf.exp
ld/testsuite/ld-aarch64/morello-entry-point.d [new file with mode: 0644]