This is the mail archive of the
mailing list for the binutils project.
Re: Can I fix the content of symbol table in GAS???
- From: Nick Clifton <nickc at redhat dot com>
- To: pschen <pschen at pllab dot cs dot nthu dot edu dot tw>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 29 Jul 2004 14:36:52 +0100
- Subject: Re: Can I fix the content of symbol table in GAS???
- References: <200407261215.i6QCFcdA042091@pllab.cs.nthu.edu.tw>
Currently I am developing the gas for a new DSP processor.
In GAS, I want to add a symbol "tmp" in symbol table and
relocate its content.
I don't know how to program it and I just can do relocation in text section.
Can I do relocation in symbol table?
Not really. Generally speaking relocations are used to alter the
contents of code and data sections not the symbol table.
You can create new symbols to insert into the symbol table. For
examples of this see the file <binutils>/gas/config/tc-ia64.c and search
for occurrences of "symbol_new".
What exactly do you mean when you say that you want to relocate the
content of symbol "tmp". Do you mean that you want to be able set its
address at link-time rather than assemble-time ? Or do you mean that
you want to alter the contents of the memory location whose address is
the value of the symbol "tmp" ?