How to get the default linker script used by gcc?

Alan Modra amodra@bigpond.net.au
Tue May 12 09:07:00 GMT 2009


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.

Index: binutils/objcopy.c
===================================================================
RCS file: /cvs/src/src/binutils/objcopy.c,v
retrieving revision 1.131
diff -u -p -r1.131 objcopy.c
--- binutils/objcopy.c	27 Apr 2009 13:59:43 -0000	1.131
+++ binutils/objcopy.c	12 May 2009 09:04:25 -0000
@@ -2143,7 +2143,8 @@ set_long_section_mode (bfd *output_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);
     }

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list