This is the mail archive of the binutils@sources.redhat.com 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]

[PATCH] Protect EXTERN_FORCE_RELOC with STRICT_PE_FORMAT (was Re: [PATCH] Fix EXTERN_FORCE_RELOC for PE COFF)


On Sun, Nov 10, 2002 at 06:28:02PM -0800, Donn Terry wrote:
>Let me suggest a strategy here: in a few places in the (still pending)
>patches I use the symbol "STRICT_PE_FORMAT" as an ifdef to indicate
>that this is a place where other PE formats and a strict interpretation
>of MS documents (and comparison of objects and executables) yield
>different results.  How about that as changes go in (either from Joel
>or me) that if there is a concern about the change that we wrap it in
>that symbol.

Ok.  I've protected the code in tc-i386.h with this conditional.  Patch
below.

I'm looking forward to the future when we'll have better compliance with
MS objects.

cgf

2002-11-11  Christopher Faylor  <cgf@redhat.com>

	* config/tc-i386.h (EXTERN_FORCE_RELOC): Define only if
	STRICT_PE_FORMAT.

Index: config/tc-i386.h
===================================================================
RCS file: /cvs/uberbaum/gas/config/tc-i386.h,v
retrieving revision 1.36
diff -u -p -r1.36 tc-i386.h
--- config/tc-i386.h	15 Oct 2002 02:20:53 -0000	1.36
+++ config/tc-i386.h	11 Nov 2002 17:02:27 -0000
@@ -472,9 +472,11 @@ extern int tc_i386_fix_adjustable PARAMS
 
 /* ELF wants external syms kept, as does PE COFF.  */
 #ifdef TE_PE
-#define EXTERN_FORCE_RELOC				\
+# ifdef STRICT_PE_FORMAT
+#   define EXTERN_FORCE_RELOC				\
   (OUTPUT_FLAVOR == bfd_target_elf_flavour		\
    || OUTPUT_FLAVOR == bfd_target_coff_flavour)
+# endif
 #else
 #define EXTERN_FORCE_RELOC				\
   (OUTPUT_FLAVOR == bfd_target_elf_flavour)


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