http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58621
Richard Earnshaw <rearnsha at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #3 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- No, the LO12 relocations (see the AArch64 ELF bindings in infocenter) are defined to insert (S + A) & 0xff<n> (n = 0xf, 0xe, 0xc, 0x8 for byte, halfword, word and dword respectively), so never insert more than 12 bits into the offset field, even when there is space for more. Note that the addend is inside the mask operation This is needed because the ADRP and LDR have to work as a pair when a symbol has an offset and the offset could be of arbitrary size. For example, adrp x0, A+102400 ldr w1, [x0, #:lo12:A+102400] still needs to work.