On Fri, Sep 22, 2017 at 12:29 PM, Wilco Dijkstra wrote:
> Hi,
>
> You'll get GOT relocations to globals when you use -fpic:
>
> int x;
> int f(void) { return x; }
>>gcc -O2 -S -o- -fpic
>
> f:
> adrpx0, :got:x
> ldr x0, [x0, #:got_lo12:x]
> ldr w0, [x0]
>
Hi,
You'll get GOT relocations to globals when you use -fpic:
int x;
int f(void) { return x; }
>gcc -O2 -S -o- -fpic
f:
adrpx0, :got:x
ldr x0, [x0, #:got_lo12:x]
ldr w0, [x0]
ret
So it doesn't depend on the compiler but what options you compile for.
T
* jacob navia:
> 1) How can I know what I should generate? Should I figure out the gcc
> version installed?
>
> 2) Is there any documentation for this change somewhere? What does it mean?
It's probably due to a downstream packaging change to enable
position-independent executables (PIE) by defau
Hi
I am writing a code generator for ARM64.
To access a global variable I was generating
addrp x0,someglobal
add x0,[x0,:lo12:someglobal]
This worked without any problems with gcc version 4.9.2 (Debian/Linaro
4.9.2-10) and GNU ld (GNU Binutils for Debian) 2.25.
I have updated m