This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: "relocation addend field"
- To: xinant at cognigine dot com (Xinan Tang)
- Subject: Re: "relocation addend field"
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- Date: 23 May 2001 19:13:15 +0100
- Cc: binutils at sources dot redhat dot com
- References: <3B0BE2F5.1020609@cognigine.com>
Hi Xinan,
> I.e., I am using fx_addnumber to pass value between md_apply_fix() and
> tc_gen_reloc(). This `addend' NON-ZERO value can be seen until the last
> call in write_object_file().
>
> However, when using `objdump' to print the relocation info.
> the field `addend' is ZERO. How could this happen?
Are you using REL type relocations ? (As opposed to RELA). If so,
then the addend is supposed to be located in the word being relocated
and the addend value in the reloc structure, as displayed by objdump,
will be zero.
If you are using RELA type relocations, then there must be a bbug
somewhere that is stopping the addend from being written into the
reloc structure in the object file.
Cheers
Nick