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 Nick,

Nick Clifton wrote:


> 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.


   I think I found the problem. In my elf32-mytarget.c,

   I should use

	#define USE_RELA	1   /* Actually any value is Ok */

   rather than

	#define USE_REL		0

   since nowhere will check the value but some functions do check whether
the symbol is defined or not :(

Thanks

-- 
Dr. Xinan Tang                    Member of Technical Staff
EMail: xinant@cognigine.com  	  Cognigine Corp.
Voice: 510.743.4930               6120 Stevenson Boulevard
Fax:   510.743.4910               Fremont, CA  94538


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