[9/16][binutils][AARCH64]Add relocation support for large memory model. [GAS]Add BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC support.

Renlin Li renlin.li@arm.com
Tue Sep 8 17:53:00 GMT 2015


Hi all,

This is a patch to add BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC to GAS.
The following code sequence should be generated to access TLS variable 
in General Dynamic TLS Model.


     movz a0, #:tlsgd_g1:x             R_AARCH64_TLSGD_MOVW_G1
     movk a0, #:tlsgd_g0_nc:x       R_AARCH64_TLSGD_MOVW_G0_NC
     add  a0, gp, a0
     bl   __tls_get_addr                    R_AARCH64_CALL26
     nop

Binutils and gas regression test done without new failures. Okay to commit?

Regards,
Renlin

bfd/ChangeLog:

2015-09-08  Renlin Li <renlin.li@arm.com>

     * reloc.c (BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC): New entry.
     * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry for
     BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC.
     * libbfd.h: Regenerate.
     * bfd-in2.h: Likewise


gas/ChangeLog:

2015-09-08  Renlin Li <renlin.li@arm.com>

     * config/tc-aarch64.c (reloc_table): New relocation modifier 
tlsgd_g0_nc.
     (process_movw_reloc_info): Support BFD_RELOC_AARCH64_TLSGD_MOVW_G1.
     (md_apply_fix): Likewise.
     (aarch64_force_relocation): Likewise.

gas/testsuite/ChangeLog:

2015-09-08  Renlin Li <renlin.li@arm.com>

     * gas/aarch64/reloc-tlsgd_g0_nc.d: New.
     * gas/aarch64/reloc-tlsgd_g0_nc.s: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0009-GAS-BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC.patch
Type: text/x-patch
Size: 5109 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20150908/b8f3096e/attachment.bin>


More information about the Binutils mailing list