[PATCH, AARCH64] support R_AARCH64_NONE as gas input for 64-bit code

Jim Wilson jim.wilson@linaro.org
Mon May 9 23:02:00 GMT 2016


The aarch64 assembler accepts the deprecated R_AARCH64_NULL reloc, but
not the preferred R_AARCH64_NONE reloc.

palantir:2134$ cat tmp.s
 .text
 .reloc 0, R_AARCH64_NULL, 0
palantir:2135$ ./as-new tmp.s
palantir:2136$ cat tmp2.s
 .text
 .reloc 0, R_AARCH64_NONE, 0
palantir:2137$ ./as-new tmp2.s
tmp2.s: Assembler messages:
tmp2.s:2: Error: unrecognized reloc type
palantir:2138$

Curiously, looking at the code, I see that the aarch64 port accepts
only R_AARCH64_NULL for 64-bit code and only R_AARCH64_NONE for 32-bit
code. I don't know the history of R_AARCH64_NULL, but assuming we
still need to support it for backwards compatibilty, then we need to
accept both for 64-bit code.  We can still only accept R_AARCH64_NONE
for 32-bit code.  The attached patch does this.

This was tested with an aarch64-linux cross build and make check.
There were no regressions.

Jim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: null-none.patch
Type: text/x-patch
Size: 2564 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20160509/b8cbddd2/attachment.bin>


More information about the Binutils mailing list