bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/22589] aarch64: adrp relocation gets filled with non-zero addres


From: jwerner at chromium dot org
Subject: [Bug ld/22589] aarch64: adrp relocation gets filled with non-zero address for undefined weak symbol
Date: Sat, 13 Jan 2018 01:27:29 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=22589

Julius Werner <jwerner at chromium dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #6 from Julius Werner <jwerner at chromium dot org> ---
> > Sorry, I can't quite follow your argumentation. Are you trying to say that
> > it's not legal to use the ADRP instruction in position-dependent code? 
> 
> No, I'm saying you can't use ADRP for a *weak* symbol reference in position
> independent code.

Yes, but I am not building PIC code! That's why I'm asking whether you think
the instruction would be illegal to use in position-*dependent* (i.e. non-PIC)
code, because that's the code I am having a problem with. I agree that it
doesn't make sense for weak symbols in PIC code, but that's not the case I have
-- I want to link non-PIC code where using this instruction can be perfectly
fine as long as you know the limits of your address space.

> > I'm
> > not really sure what you're basing that assumption on... I can't find
> > anything to that effect in any of the official ARM documentation and specs.
> 
> What documentation?  ARM docs don't say you can use a division instruction
> for doing general addition, but clearly you can't...

I'm just saying that I can't find anything official that says I can't use this
instruction for non-PIC code. So I think that I should be allowed to do that,
and that the binutils linker should calculate the right offsets for that case.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]