[5/16][binutils][AARCH64]Add relocation support for large memory model. [GAS]Add BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC Support
Renlin Li
renlin.li@arm.com
Tue Sep 8 17:51:00 GMT 2015
Hi all,
This patch add BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC support in Gas.
It's used in large memory model, GOT PIC addressing.
For the large model and -fPIC, the GOT is limited to 4GB, allowing it to
be accessed using a 32-bit unsigned register index.
// gp = &_GOT_
movz t0, #:gotoff_g1:src // R_AARCH64_MOVW_GOTOFF_G1 src
movk t0, #:gotoff_g0_nc:src // R_AARCH64_MOVW_GOTOFF_G0_NC src
ldr t0, [gp, t0]
GAS tests Okay without any issues. Okay to commit?
bfd/ChangeLog:
2015-09-08 Renlin Li <renlin.li@arm.com>
* reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New.
* elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry
MOVW_GOTOFF_G0_NC.
* libbfd.h: Regnerate.
* bfd-in2.h: Regenerate.
gas/ChangeLog:
2015-09-08 Renlin Li <renlin.li@arm.com>
* config/tc-aarch64.c (reloc_table): New relocation modifier
gotoff_g0_nc.
(process_movw_reloc_info): Support gotoff_g0_nc.
(md_apply_fix): Likewise.
gas/testsuite/ChangeLog:
2015-09-08 Renlin Li <renlin.li@arm.com>
* gas/aarch64/reloc-gotoff_g0_nc.s: New.
* gas/aarch64/reloc-gotoff_g0_nc.d: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-GAS-BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC.patch
Type: text/x-patch
Size: 4576 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150908/610c3fa2/attachment.bin>
More information about the Binutils
mailing list