This is the mail archive of the binutils@sourceware.org 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: How to use an R_ARM_GOT32 symbol in a S file?


On Mai 27 2019, Andreas Schwab <schwab@linux-m68k.org> wrote:

> 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 -

That should be: ... | gcc -fPIC -xc - -o - -S

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."


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