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] make macro-generated local labels truely local


When using the LOCAL macro directive (in alternate macro mode) all the
symbols generated were made visible in the object's symbol table.
These
should, however, be treated the same as other local symbols, and since
their recognition is name dependent for ELF they should have names
recognizable by _bfd_elf_is_local_label_name.

Build and tested on i686-pc-linux-gnu.

gas/
2004-10-06 Jan Beulich <jbeulich@novell.com>

	* macro.c (macro_expand_body): When ELF, use .LL rather than LL
as
	prefix for symbol names generated from the LOCAL macro
directive.

---
/home/jbeulich/src/binutils/mainline/2004-10-06.09.37/gas/macro.c	2004-08-19
11:03:27.000000000 +0200
+++ 2004-10-06.09.37/gas/macro.c	2004-10-06 10:51:06.082302200
+0200
@@ -54,6 +54,7 @@ extern void *alloca ();
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
+#include "as.h"
 #include "libiberty.h"
 #include "safe-ctype.h"
 #include "sb.h"
@@ -756,7 +757,7 @@ macro_expand_body (sb *in, sb *out, form
 
 		  src = get_token (src, in, &f->name);
 		  ++loccnt;
-		  sprintf (buf, "LL%04x", loccnt);
+		  sprintf (buf, IS_ELF ? ".LL%04x" : "LL%04x", loccnt);
 		  sb_add_string (&f->actual, buf);
 
 		  err = hash_jam (formal_hash, sb_terminate (&f->name),
f);

Attachment: binutils-mainline-macro-local.patch
Description: Binary data


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