This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: How to use an R_ARM_GOT32 symbol in a S file?
- From: Andreas Schwab <schwab at linux-m68k dot org>
- To: Jeffrey Walton <noloader at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Mon, 27 May 2019 10:31:57 +0200
- Subject: Re: How to use an R_ARM_GOT32 symbol in a S file?
- References: <CAH8yC8=p-sGNwFFKzg1FfVgZGC_C90SJXenpFNoP17H7xJeaDg@mail.gmail.com> <CAH8yC8=ry+92HL8zxWbJRRNh0tQXKKR2RkVcR=cj0o0iYRDNcA@mail.gmail.com> <87pno4oogh.fsf@igel.home> <CAH8yC8=2AVukLFna1CmUT9_G6m=AquuPk2m7rWV19UAy0OXp9w@mail.gmail.com> <mvmy32se1un.fsf@linux-m68k.org>
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."