This is the mail archive of the binutils@sources.redhat.com 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]

Re: Better handling of PIC suffixes in GAS expression parser


On Mar 17, 2001, Nick Clifton <nickc@redhat.com> wrote:

>> - generating PIC-related symbols as local symbols, adding
>> machine-specific fields to them, and having validation done
>> externally, after the full expression is parsed and constructed, when
>> the relocation type is about to be chosen.

> I am not so sure that I understand this.  Are you suggesting that "@GOT"
> would become a special local symbol ?

Yep.  Some symbol that would only be created for so that whatever
converts an expression to a (set of) relocations can figure out
there's a @GOT symbol in there.  Then, it could pull the @GOT
reference out of the expression and generate a GOT reloc for it.  The
idea is just to be able to tell @GOT, @PLT, etc symbols from regular
symbols quickly, without having to do string matches.  The idea is
that such symbols would never be emitted, and would never be
referenced in relocations; such a symbol would contain a pointer to
the real symbol, that the reloc generator would use to construct the
actual reloc.

I've already got such a scheme working for a new PIC extension I'm
working on, but it uses non-local symbols for the @GOT, @PLT, etc
symbols, so they end up in the symbol table of object files, which I
don't want.  So I thought of using local symbols.  But I'm not sure
this would be correct either.  Maybe we should have global symbols
with some flag that indicates they shouldn't be placed in the symbol
table.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me


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