This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Missing use of LOCAL_LABEL_PREFIX in _bfd_elf_is_local_label_name
- From: "David Stubbs" <stubbs at IceraSemi dot com>
- To: <binutils at sourceware dot org>
- Cc: "sdkteam-gnu" <sdkteam-gnu at IceraSemi dot com>
- Date: Fri, 9 Apr 2010 10:45:24 +0100
- Subject: Missing use of LOCAL_LABEL_PREFIX in _bfd_elf_is_local_label_name
Hi,
Whilst investigating a problem with Sun local label use in our code that
came about as a result of Andreas Krebbel's patch
(http://sourceware.org/ml/binutils/2009-01/msg00181.html) 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?
Thanks,
Dave.
Bfd/ChangeLog:
2010-04-09 David Stubbs <stubbs@icerasemi.com>
* elf.c (_bfd_elf_is_local_label_name): Check for symbols with a
LOCAL_LABEL_PREFIX.
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)
{
+#ifdef LOCAL_LABEL_PREFIX
+ if (name[0] == LOCAL_LABEL_PREFIX)
+ return TRUE;
+#endif
+
/* Normal local symbols start with ``.L''. */
if (name[0] == '.' && name[1] == 'L')
return TRUE;