add handling of temporary local labels, from in-tree binutils.

This commit is contained in:
brad 2004-01-19 02:04:20 +00:00
parent 28eff2f357
commit f2f9cbd49e

View File

@ -0,0 +1,41 @@
$OpenBSD: patch-gas_config_obj-aout_c,v 1.1 2004/01/19 02:04:20 brad Exp $
--- gas/config/obj-aout.c.orig 2004-01-02 23:25:09.000000000 -0500
+++ gas/config/obj-aout.c 2004-01-02 23:34:26.000000000 -0500
@@ -482,6 +482,8 @@ obj_crawl_symbol_chain (headers)
* symbols with no name (stabd's?)
* symbols with debug info in their N_TYPE
+ * symbols marked "forceout" (to force out local `L' symbols in Net-
+ or OpenBSD PIC code)
Symbols that don't are:
* symbols that are registers
@@ -498,7 +500,15 @@ obj_crawl_symbol_chain (headers)
|| !S_IS_DEFINED (symbolP)
|| S_IS_EXTERNAL (symbolP)
|| (S_GET_NAME (symbolP)[0] != '\001'
- && (flag_keep_locals || !S_LOCAL_NAME (symbolP)))))
+ && (flag_keep_locals || !S_LOCAL_NAME (symbolP))
+#if defined(TE_NetBSD) || defined(TE_OpenBSD)
+ || (flag_pic && symbolP->sy_forceout)
+#endif
+ ))
+#if defined(TE_NetBSD) || defined(TE_OpenBSD)
+ && (!flag_pic || symbolP != GOT_symbol || got_referenced != 0)
+#endif
+ )
{
symbolP->sy_number = symbol_number++;
@@ -516,6 +526,11 @@ obj_crawl_symbol_chain (headers)
}
else
{
+ if (S_IS_EXTERNAL (symbolP) || !S_IS_DEFINED (symbolP)
+#if defined(TE_NetBSD) || TE_OpenBSD)
+ && (!flag_pic || symbolP != GOT_symbol || got_referenced != 0)
+#endif
+ )
if (S_IS_EXTERNAL (symbolP) || !S_IS_DEFINED (symbolP))
/* This warning should never get triggered any more.
Well, maybe if you're doing twisted things with