This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC PATCH] aarch64: ld: fix relaxations for ilp32 mode

On 14/01/17 10:48, Yury Norov wrote:
Hi all,

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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]