aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-07-05 16:31:07 +0000
committerIan Lance Taylor <ian@airs.com>1995-07-05 16:31:07 +0000
commita2546fcef767bb388f8fc4d90b0b04c2ad7063e3 (patch)
tree2c4cd799cb788486ca7db4833293b26a90bbec03 /bfd/elf32-mips.c
parent3af584b4a16be2ddfb92fc52ec491ba181572967 (diff)
downloadgdb-a2546fcef767bb388f8fc4d90b0b04c2ad7063e3.zip
gdb-a2546fcef767bb388f8fc4d90b0b04c2ad7063e3.tar.gz
gdb-a2546fcef767bb388f8fc4d90b0b04c2ad7063e3.tar.bz2
* ecoff.c (_bfd_ecoff_bfd_is_local_label): New function.
* libecoff.h (_bfd_ecoff_bfd_is_local_label): Declare. * elf32-mips.c (mips_elf_is_local_label): New static function. (bfd_elf32_bfd_is_local_label): Define. PR 6978.
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r--bfd/elf32-mips.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 9ec5393..0ae1065 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -84,6 +84,8 @@ static boolean mips_elf_section_processing
static void mips_elf_symbol_processing PARAMS ((bfd *, asymbol *));
static boolean mips_elf_read_ecoff_info
PARAMS ((bfd *, asection *, struct ecoff_debug_info *));
+static boolean mips_elf_is_local_label
+ PARAMS ((bfd *, asymbol *));
static boolean mips_elf_find_nearest_line
PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
const char **, unsigned int *));
@@ -791,8 +793,8 @@ mips_elf_gprel16_reloc (abfd,
}
}
- return gprel16_with_gp (symbol, reloc_entry, input_section, relocateable,
- data, elf_gp (output_bfd));
+ return gprel16_with_gp (abfd, symbol, reloc_entry, input_section,
+ relocateable, data, elf_gp (output_bfd));
}
static bfd_reloc_status_type
@@ -1507,6 +1509,17 @@ mips_elf_read_ecoff_info (abfd, section, debug)
return false;
}
+/* MIPS ELF local labels start with '$', not 'L'. */
+
+/*ARGSUSED*/
+static boolean
+mips_elf_is_local_label (abfd, symbol)
+ bfd *abfd;
+ asymbol *symbol;
+{
+ return symbol->name[0] == '$';
+}
+
/* MIPS ELF uses a special find_nearest_line routine in order the
handle the ECOFF debugging information. */
@@ -2805,7 +2818,7 @@ elf32_mips_get_relocated_section_contents (abfd, link_info, link_order, data,
lh = 0;
else
{
- h = bfd_hash_lookup (link_info->hash, "_gp", false, false);
+ h = bfd_hash_lookup (&link_info->hash->table, "_gp", false, false);
lh = (struct bfd_link_hash_entry *) h;
}
lookup:
@@ -2990,6 +3003,7 @@ static const struct ecoff_debug_swap mips_elf_ecoff_debug_swap =
mips_elf_final_write_processing
#define elf_backend_ecoff_debug_swap &mips_elf_ecoff_debug_swap
+#define bfd_elf32_bfd_is_local_label mips_elf_is_local_label
#define bfd_elf32_find_nearest_line mips_elf_find_nearest_line
#define bfd_elf32_bfd_link_hash_table_create \