[PR22764][LD][AARCH64]Allow R_AARCH64_ABS16 and R_AARCH64_ABS32 against absolution symbol or undefine symbol in shared object under LP64 abi.

Renlin Li renlin.li@foss.arm.com
Mon Feb 5 12:39:00 GMT 2018


Hi all,

The assumption that R_AARCH64_ABS16 and R_AARCH64_ABS32 relocation in LP64 abi
will be used to generate an address does not hold for absolute symbol.
In this case, it is a value fixed at static linking time.

The condition to check the relocations is relax to allow absolute symbol and
undefined symbol case.

aarch64 binutils cross/native regression test Okay. Linux kernel link Okay.

Okay to commit and backport to 2.30 branch?

Regards,
Renlin

bfd/ChangeLog:

2018-02-03  Renlin Li  <renlin.li@arm.com>

         PR ld/22764
         * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Relax the
         R_AARCH64_ABS32 and R_AARCH64_ABS16 for absolute symbol. Apply the
         check for writable section as well.

ld/ChangeLog:

2018-02-03  Renlin Li  <renlin.li@arm.com>

         PR ld/22764
         * testsuite/ld-aarch64/emit-relocs-258.s: Define symbol as an address.
         * testsuite/ld-aarch64/emit-relocs-259.s: Likewise.
         * ld/testsuite/ld-aarch64/aarch64-elf.exp: Run new test.
         * testsuite/ld-aarch64/pr22764.s: New.
         * testsuite/ld-aarch64/pr22764.d: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rb.patch
Type: text/x-patch
Size: 3453 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20180205/3192edd0/attachment.bin>


More information about the Binutils mailing list