How to get symbol value?
Nick Clifton
nickc@redhat.com
Mon Jun 22 09:36:00 GMT 2009
Hi Oleg,
> I am porting linker for new target and want to create new relocation using value of absolute symbol.
> What is the simplest way to get this symbol value?
Assuming that you have a pointer to the symbol's bfd_symbol structure
then you can get its value from the 'value' field. ie:
struct bfd_symbol * sym;
sym->value
Have a look in the source code for multiple examples of this.
Cheers
Nick
More information about the Binutils
mailing list