aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2004-09-07 18:33:22 +0000
committerHans-Peter Nilsson <hp@axis.com>2004-09-07 18:33:22 +0000
commitada1953ecdd174aaad246792e88f09febe1e1106 (patch)
treeae2b653f28bde635cde4fd85e1d19596b8f68578 /bfd
parente646467d714339cd17cbbbe71ae427ad865ab91b (diff)
downloadgdb-ada1953ecdd174aaad246792e88f09febe1e1106.zip
gdb-ada1953ecdd174aaad246792e88f09febe1e1106.tar.gz
gdb-ada1953ecdd174aaad246792e88f09febe1e1106.tar.bz2
* elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
case R_CRIS_32_GOTPLT>: For internal error message, handle NULL symname. (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to handle symbol visibility here.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/elf32-cris.c13
2 files changed, 17 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 220dc7d..d74e8fe 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2004-09-07 Hans-Peter Nilsson <hp@axis.com>
+
+ * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
+ case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
+ symname.
+ (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
+ handle symbol visibility here.
+
2004-09-07 Alan Modra <amodra@bigpond.net.au>
* elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 4994e08..aedf774 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -982,7 +982,8 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section,
input_bfd,
input_section,
cris_elf_howto_table[r_type].name,
- symname[0] != '\0' ? symname : _("[whose name is lost]"));
+ (symname != NULL && symname[0] != '\0'
+ ? symname : _("[whose name is lost]")));
/* FIXME: Perhaps blaming input is not the right thing to
do; this is probably an internal error. But it is true
@@ -2468,9 +2469,13 @@ cris_elf_check_relocs (abfd, info, sec, relocs)
don't need to generate a procedure linkage table entry
after all. */
- /* If this is a local symbol, we resolve it directly without
- creating a procedure linkage table entry. */
- if (h == NULL || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
+ /* Beware: if we'd check for visibility of the symbol here
+ (and not marking the need for a PLT when non-visible), we'd
+ get into trouble with keeping handling consistent with
+ regards to relocs found before definition and GOTPLT
+ handling. Eliminable PLT entries will be dealt with later
+ anyway. */
+ if (h == NULL)
continue;
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;