Questions about use of type long in bfd.

Kai Tietz Kai.Tietz@onevision.com
Tue Sep 18 15:00:00 GMT 2007


Hi Nick,

> > In cofflink.c: _bfd_coff_generic_relocate_section line 2996: Use of 
fwrite 
> > ?
> 
> Look a little further back in the code where there is a comment 
> describing why 
> a long is being written:
> 
>    /* Relocation to a symbol in a section which isn't
>       absolute.  We output the address here to a file.
>       This file is then read by dlltool when generating the
>       reloc section.  Note that the base file is not
>       portable between systems.  We write out a long here,
>       and dlltool reads in a long.  */
> 
> 
> > In the structure 'coff_final_link_info' the members sym_indices, 
indices, 
> > and outsyms are of type 'long *'('long') ?
> 
> You may have outdated sources.  In the version of libcoff-in.h that I am 

> looking at the coff_final_link_info structure does not have an indices 
field 
> and the outsyms field is a bfd_byte*.  The sym_indices field is a 
> long* though 
> and this does look like a possible bug.  Would you care to submit a 
> patch for it ?

Thank you for anwsering. AFAI checked the sources, the 'long' type for 
sym_indices seems to be fine. May it could be altered to a new type as 
bfd_signed_size_type (according to bfd_size_type).

Sorry, for making the noice.

Cheers,
 i.A. Kai Tietz

|  (\_/)  This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.

------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer: 
Ulrike Döhler, Manuela Kluger



More information about the Binutils mailing list