Module Name:    src
Committed By:   skrll
Date:           Mon Dec  7 09:57:19 UTC 2009

Modified Files:
        src/gnu/dist/binutils/bfd [matt-nb5-mips64]: elf.c elf64-mips.c

Log Message:
Recognize $L as a local symbol only for mips64.


To generate a diff of this commit:
cvs rdiff -u -r1.6.32.1 -r1.6.32.2 src/gnu/dist/binutils/bfd/elf.c
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.32.1 src/gnu/dist/binutils/bfd/elf64-mips.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/dist/binutils/bfd/elf.c
diff -u src/gnu/dist/binutils/bfd/elf.c:1.6.32.1 src/gnu/dist/binutils/bfd/elf.c:1.6.32.2
--- src/gnu/dist/binutils/bfd/elf.c:1.6.32.1	Sat Sep 12 00:50:21 2009
+++ src/gnu/dist/binutils/bfd/elf.c	Mon Dec  7 09:57:19 2009
@@ -6312,10 +6312,6 @@
   if (name[0] == '.' && name[1] == 'L')
     return TRUE;
 
-  /* Normal local symbols start with ``$L''.  */
-  if (name[0] == '$' && name[1] == 'L')
-    return TRUE;
-
   /* At least some SVR4 compilers (e.g., UnixWare 2.1 cc) generate
      DWARF debugging symbols starting with ``..''.  */
   if (name[0] == '.' && name[1] == '.')

Index: src/gnu/dist/binutils/bfd/elf64-mips.c
diff -u src/gnu/dist/binutils/bfd/elf64-mips.c:1.1.1.3 src/gnu/dist/binutils/bfd/elf64-mips.c:1.1.1.3.32.1
--- src/gnu/dist/binutils/bfd/elf64-mips.c:1.1.1.3	Thu Feb  2 20:46:55 2006
+++ src/gnu/dist/binutils/bfd/elf64-mips.c	Mon Dec  7 09:57:19 2009
@@ -122,6 +122,8 @@
   (bfd *, asymbol *, bfd_boolean, char **, bfd_vma *);
 static bfd_boolean mips_elf64_object_p
   (bfd *);
+static bfd_boolean mips_elf64_is_local_label_name
+  (bfd *, const char *);
 static irix_compat_t elf64_mips_irix_compat
   (bfd *);
 static bfd_boolean elf64_mips_grok_prstatus
@@ -2884,7 +2886,18 @@
   bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach);
   return TRUE;
 }
+
+/* MIPS ELF local labels start with "$L".  */
+static bfd_boolean
+mips_elf64_is_local_label_name (bfd *abfd, const char *name)
+{
+  if (name[0] == '$' && name[1] == 'L')
+    return TRUE;
 
+  /* We accept the generic ELF local label syntax as well.  */
+  return _bfd_elf_is_local_label_name (abfd, name);
+}
+
 /* Depending on the target vector we generate some version of Irix
    executables or "normal" MIPS ELF ABI executables.  */
 static irix_compat_t
@@ -3098,9 +3111,8 @@
 
 #define elf_backend_write_section	_bfd_mips_elf_write_section
 
-/* We don't set bfd_elf64_bfd_is_local_label_name because the 32-bit
-   MIPS-specific function only applies to IRIX5, which had no 64-bit
-   ABI.  */
+#define bfd_elf64_bfd_is_local_label_name \
+				mips_elf64_is_local_label_name
 #define bfd_elf64_find_nearest_line	_bfd_mips_elf_find_nearest_line
 #define bfd_elf64_new_section_hook	_bfd_mips_elf_new_section_hook
 #define bfd_elf64_set_section_contents	_bfd_mips_elf_set_section_contents

Reply via email to