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: "relocation addend field"


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


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