This is the mail archive of the 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]

Missing use of LOCAL_LABEL_PREFIX in _bfd_elf_is_local_label_name


Whilst investigating a problem with Sun local label use in our code that
came about as a result of Andreas Krebbel's patch
( to define
LOCAL_LABEL_PREFIX, I noticed that _bfd_elf_is_local_label_name isn't
using LOCAL_LABEL_PREFIX. For obscure definitions this will fail. The
following trivial patch fixes that, and has been tested on
i686-pc-linux-gnu. Is it ok?



2010-04-09  David Stubbs  <>

	* elf.c (_bfd_elf_is_local_label_name): Check for symbols with a


Index: bfd/elf.c
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.506
diff -u -p -r1.506 elf.c
--- bfd/elf.c	17 Mar 2010 13:46:35 -0000	1.506
+++ bfd/elf.c	9 Apr 2010 09:12:42 -0000
@@ -7101,6 +7101,11 @@ bfd_boolean
 _bfd_elf_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED,
 			      const char *name)
+  if (name[0] == LOCAL_LABEL_PREFIX)
+    return TRUE;
   /* Normal local symbols start with ``.L''.  */
   if (name[0] == '.' && name[1] == 'L')
     return TRUE;

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