new gas cannot grok new gcc output
Michael Sokolov
msokolov@ivan.Harhan.ORG
Wed Feb 14 23:42:00 GMT 2001
H . J . Lu <hjl@valinux.com> wrote:
> For ELF, an externally visible symbol can be overriden if it is defined
> in a shared library. Otherwise, things won't work right. That is why
> the relocation has to be there.
But I know about this case, I wrote just below the part you quoted:
: The only reason I see not to resolve an internal reference in the assembler
: without emitting a reloc is for symbols to be overridable at link time in
: objects that are going to be linked into DSOs.
i.e., the case you are talking about is only when the code being assembled is
going into a DSO, right? But, as I also wrote,
: However in such objects the code is supposed to use @PLTPC constructs on all
: calls, and for these gas always generates the special PLT relocs.
So it seems to me that the assembler can assume that if the user wrote
jbsr foo
instead of
jbsr foo@PLTPC
then he/she doesn't need/want the special behavior for objects that go into
DSOs. Or am I missing something?
But even if I'm wrong and the assembler must always keep all internal relocs
referencing .globl symbols, it never actually did this on m68k ELF, and the
TC_RELOC_RTSYM_LOC_FIXUP definition in config/tc-m68k.h has never had this
effect, its only effect has always been the breakage we are analysing, it seems
to me.
--
Michael Sokolov
Public Service Agent
International Engineering and Science Task Force
1351 VINE AVE APT 27 Phone: +1-714-738-5409
FULLERTON CA 92833-4291 USA (home office)
E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP)
More information about the Binutils
mailing list