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: Discrepancy with .reloc section between PE and PE+ emulations when linking -r.


Nick Clifton wrote:

> Please feel free to correct my mistake and restore the proper behaviour.

  You had it almost perfect, you just forgot to move the if clause from the
then leg of the preprocessor conditional to the else leg when inverting the
sense of the conditional test.  Now testing this proposed fix on a whole slew
of linux-x-PE cross-targets.

ld/ChangeLog

	* emultempl/pe.em (gld_${EMULATION_NAME}_after_open):  Don't emit
	inadvertent .reloc sections caused by refactoring accident.

    cheers,
      DaveK


Index: ld/emultempl/pe.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/pe.em,v
retrieving revision 1.141
diff -p -u -r1.141 pe.em
--- ld/emultempl/pe.em	8 Jan 2009 13:28:48 -0000	1.141
+++ ld/emultempl/pe.em	13 Feb 2009 12:22:12 -0000
@@ -1064,11 +1064,11 @@ gld_${EMULATION_NAME}_after_open (void)
     || defined (TARGET_IS_arm_wince_pe)
   if (!link_info.relocatable)
     pe_dll_build_sections (link_info.output_bfd, &link_info);
-  else
-    pe_exe_build_sections (link_info.output_bfd, &link_info);
 #else
   if (link_info.shared)
     pe_dll_build_sections (link_info.output_bfd, &link_info);
+  else
+    pe_exe_build_sections (link_info.output_bfd, &link_info);
 #endif
 #endif /* DLL_SUPPORT */
 


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