"relocation addend field"

Nick Clifton nickc@cambridge.redhat.com
Wed May 23 10:16:00 GMT 2001


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



More information about the Binutils mailing list