How to use an R_ARM_GOT32 symbol in a S file?

Andreas Schwab schwab@linux-m68k.org
Mon May 27 08:30:00 GMT 2019


On Mai 26 2019, Jeffrey Walton <noloader@gmail.com> wrote:

> On Sun, May 26, 2019 at 6:12 PM Andreas Schwab <schwab@linux-m68k.org> wrote:
>>
>> On Mai 26 2019, Jeffrey Walton <noloader@gmail.com> wrote:
>>
>> > My bad, I should have provided this. This is the dominant use case
>> > that has to work for users:
>> >
>> >     gcc -fPIC -march=armv7-a a.c -c
>> >     gcc -fPIC  -march=armv7-a b.S -c
>> >     gcc -shared -fPIC a.o b.o -o test.so
>>
>> Try looking at the gcc output.
>
> Thanks Andreas. I haven't gotten that far due to compile/assembler errors.

Try looking at what this produces.

echo 'extern int my_symbol; int f () { return my_symbol; }' | gcc -fPIC -xc - -o -

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



More information about the Binutils mailing list