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]
Other format: [Raw text]

Re: HELP ME - porting to VLIW machine


Nick Clifton wrote:
[snip]
> > 3) Concerning the HOWTO macro: what's the relationship between the macro
> > parameters and the architecture parameters? e. g. what  third and fourth
> > fields have got to do with the first second and third fields of
> > bfd_arch_info_type?
> 
> The third paramter of the HOWTO macro initialises the "size" field of
> the reloc_howto_struct.  This is the number of bytes in the object
> file that are going to be changed by the reloc.  For example if the
> reloc is filling in missing fields in a machine instruction it might
> have a size of 4 (bytes), assuming a 32 bit instruction, whereas if
> the reloc is initialising the value of an unsigned short variable
> in the .data section it might have a size of 2 (bytes).

AFAICS "size" does not use the size in bytes but has it's own scheme:

	0 - byte (8bit)
	1 - short (16bit)
	2 - word (32bit)
	4 - long (64bit)

At least it does so for elf{32,64}-mips.c and I got bitten by that. :-)


Thiemo


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