This is the mail archive of the
mailing list for the binutils project.
Re: [RFC PATCH] aarch64: ld: fix relaxations for ilp32 mode
- From: Jiong Wang <jiong dot wang at foss dot arm dot com>
- To: Yury Norov <ynorov at caviumnetworks dot com>, binutils at sourceware dot org
- Date: Mon, 16 Jan 2017 10:13:43 +0000
- Subject: Re: [RFC PATCH] aarch64: ld: fix relaxations for ilp32 mode
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com>
On 14/01/17 10:48, Yury Norov wrote:
This patch continues the work of replacing 64-bit registers, offsets etc with
32-bit ones in elfNN_aarch64_tls_relax(). It doesn't fix any test I have tried,
but it's generally correct, and I think that it should be applied.
I also added new tests for ilp32 mode, and the problem is that some fail. So I'd
like to ask for help here.
Namely, 3 new tests are failed. tls-relax-large-desc-ie-ilp32 and
tls-relax-large-desc-le-ilp32 fail due to error "cannot represent
BFD_RELOC_AARCH64_TLSDESC_OFF_G1 relocation in this object file format", and
test tls-desc-ie-ilp32 fails due to weird "undefined reference to `v2".
If my understanding is correct, this error is because GAS cannot translate
assembler commands to machine codes properly. If so, it may happen with some real
program one day.
It may also be my misunderstanding on how gas/ld work.
BFD_RELOC_AARCH64_TLSDESC_OFF_G1 and the several other relocations in the error message are designed to be used by large code model only, so they are not expected to be generated under ILP32.
The "undefined reference to v2" is caused by missing of "-shared" in your linker command.