HELP ME - porting to VLIW machine

Thiemo Seufer ica2_ts@csv.ica.uni-stuttgart.de
Wed Dec 5 03:38:00 GMT 2001


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



More information about the Binutils mailing list