[2/16][binutils][AARCH64]Add relocation support for large memory model. [LD]Add BFD_RELOC_AARCH64_LD64_GOTOFF_LO15 Support.
Renlin Li
renlin.li@arm.com
Tue Sep 8 16:13:00 GMT 2015
Hi all,
This patch adds LD support for BFD_RELOC_AARCH64_LD64_GOTOFF_LO15
relocation. This is used in large memory model.
A dedicated register (gp) is used to hold GOT start address. And the
offset into the GOT is represented by this symbol. The final address of
symbol is the add result of the offset and gp.
ld regression test done without issues. Okay to commit?
bfd/ChangeLog:
2015-09-08 Renlin Li <renlin.li@arm.com>
* elfnn-aarch64.c (aarch64_reloc_got_type): Add
BFD_RELOC_AARCH64_LD_64_GOTOFF_LO15 support.
(elfNN_aarch64_gc_sweep_hook): Likewise.
(elfNN_aarch64_check_relocs): Likewise
* elfxx-aarch64.c (_bfd_aarch64_elf_put_addend): Likewise.
(_bfd_aarch64_elf_resolve_relocation): Likewise
(elfNN_aarch64_final_link_relocate): Calculate offset within GOT.
ld/testsuite/ChangeLog:
2015-09-08 Renlin Li <renlin.li@arm.com>
* ld-aarch64/emit-relocs-310.d: New.
* ld-aarch64/emit-relocs-310.s: New.
* ld-aarch64/aarch64-elf.exp: Run the test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-LD-BFD_RELOC_AARCH64_LD64_GOTOFF_LO15.patch
Type: text/x-patch
Size: 7510 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150908/c73181ab/attachment.bin>
More information about the Binutils
mailing list