This is the mail archive of the binutils@sourceware.org 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: How to get the default linker script used by gcc?


Alan Modra wrote:
> On Tue, May 12, 2009 at 03:33:35PM +0800, Pan ruochen wrote:
>> The symbol ___start_ResData is not the start address of section
>> ResData. What's wrong?
> 
> You have hit a bug in ld.  Hmm, current objcopy won't even convert
> res.dat to coff/pe.  This should fix the objcopy problem.  I'll look
> into the ld bug.
> 
> 	* objcopy.c (set_long_section_mode): Check input_bfd is coff
> 	before accessing coff specific fields of bfd.

>    /* This is only relevant to Coff targets.  */
>    if (bfd_get_flavour (output_bfd) == bfd_target_coff_flavour)
>      {
> -      if (style == KEEP)
> +      if (style == KEEP
> +	  && bfd_get_flavour (input_bfd) == bfd_target_coff_flavour)
>  	style = bfd_coff_long_section_names (input_bfd) ? ENABLE : DISABLE;
>        bfd_coff_set_long_section_names (output_bfd, style != DISABLE);
>      }
> 

  Sorry, that dumb thinko was my fault, I neglected to consider the case of
cross-format translations.  Thanks for catching it, Alan.

    cheers,
      DaveK


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