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: [patch 0/3] Fix some FAILS for: unordered .debug_info references to .debug_ranges


And the rest of the patch..

You can't define macros like USE_UNIQUE in obj-coff.h and expect
them to affect symbols.c if you are compiling multi-obj.  In that
case, obj-format.h includes obj-multi.h, not obj-coff.h.

	* config/obj-coff.h (USE_UNIQUE): Don't define.
	* config/obj-coff.c (weak_uniquify): Use an_external_name when TE_PE.
	* symbols.c (an_external_name): Define when TE_PE.
	(S_SET_EXTERNAL): Assign an_external_name when TE_PE.
	* tc.h (an_external_name): Declare when TE_PE.

Index: gas/symbols.c
===================================================================
RCS file: /cvs/src/src/gas/symbols.c,v
retrieving revision 1.96
diff -u -p -r1.96 symbols.c
--- gas/symbols.c	29 Jul 2009 06:22:12 -0000	1.96
+++ gas/symbols.c	9 Sep 2009 13:04:23 -0000
@@ -59,7 +59,7 @@ symbolS abs_symbol;
 #define LOCAL_LABEL_CHAR	'\002'
 
 struct obstack notes;
-#ifdef USE_UNIQUE
+#ifdef TE_PE
 /* The name of an external symbol which is
    used to make weak PE symbol names unique.  */
 const char * an_external_name;
@@ -2204,7 +2204,7 @@ S_SET_EXTERNAL (symbolS *s)
   s->bsym->flags |= BSF_GLOBAL;
   s->bsym->flags &= ~(BSF_LOCAL | BSF_WEAK);
 
-#ifdef USE_UNIQUE
+#ifdef TE_PE
   if (! an_external_name && S_GET_NAME(s)[0] != '.')
     an_external_name = S_GET_NAME (s);
 #endif
Index: gas/tc.h
===================================================================
RCS file: /cvs/src/src/gas/tc.h,v
retrieving revision 1.16
diff -u -p -r1.16 tc.h
--- gas/tc.h	2 Sep 2009 07:24:19 -0000	1.16
+++ gas/tc.h	9 Sep 2009 13:04:23 -0000
@@ -41,7 +41,7 @@ extern int md_short_jump_size;
 extern int md_long_jump_size;
 #endif
 
-#ifdef USE_UNIQUE
+#ifdef TE_PE
 /* The name of an external symbol which is
    used to make weak PE symbol names unique.  */
 extern const char * an_external_name;
Index: gas/config/obj-coff.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-coff.c,v
retrieving revision 1.100
diff -u -p -r1.100 obj-coff.c
--- gas/config/obj-coff.c	2 Sep 2009 07:24:20 -0000	1.100
+++ gas/config/obj-coff.c	9 Sep 2009 13:04:26 -0000
@@ -1117,7 +1117,7 @@ weak_uniquify (const char * name)
   char *ret;
   const char * unique = "";
 
-#ifdef USE_UNIQUE
+#ifdef TE_PE
   if (an_external_name != NULL)
     unique = an_external_name;
 #endif
Index: gas/config/obj-coff.h
===================================================================
RCS file: /cvs/src/src/gas/config/obj-coff.h,v
retrieving revision 1.41
diff -u -p -r1.41 obj-coff.h
--- gas/config/obj-coff.h	2 Sep 2009 07:24:20 -0000	1.41
+++ gas/config/obj-coff.h	9 Sep 2009 13:04:26 -0000
@@ -162,9 +162,6 @@
 #endif
 
 #ifdef TE_PE
-/* PE weak symbols need USE_UNIQUE.  */
-#define USE_UNIQUE 1
-
 #define obj_set_weak_hook pecoff_obj_set_weak_hook
 #define obj_clear_weak_hook pecoff_obj_clear_weak_hook
 #endif


-- 
Alan Modra
Australia Development Lab, IBM


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