[Binutils][AARCH64][0/2]Add group relocations to create PC-relative offset.
Thu Jan 18 15:34:00 GMT 2018
This is a patch to add Group relocations to create a
16, 32, 48, or 64 bit PC-relative offset inline.
The following relocations are added along with the test cases:
The operations for those relocations are: S + A - P.
S is the address of the symbol.
A is the addend for the relocation.
P is the address of the place being relocated
Those relocations are used to create PC-relative offset. For example,
The following code sequence could get the full address of _start.
movz x0, :prel_g2: _start - .Ltmp1
movk x0, :prel_g1_nc: _start - .Ltmp1
movk x0, :prel_g0_nc: _start - .Ltmp1
adr x1, .Ltmp1
add x0, x0, x1
binutils regression test checked OK, linux kernel link checked OK.
OK to commit?
More information about the Binutils