aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-sparc.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2001-11-15 04:13:35 +0000
committerAlexandre Oliva <aoliva@redhat.com>2001-11-15 04:13:35 +0000
commit6361c4c9bcb71c4218afd203fcd017fd9f5cbe39 (patch)
tree3a55f52bca01364f65bb467ba6a8d616bfb86491 /bfd/elf64-sparc.c
parent1ff9c3d6f7f11b7f95019062eade17e9f4bcd065 (diff)
downloadgdb-6361c4c9bcb71c4218afd203fcd017fd9f5cbe39.zip
gdb-6361c4c9bcb71c4218afd203fcd017fd9f5cbe39.tar.gz
gdb-6361c4c9bcb71c4218afd203fcd017fd9f5cbe39.tar.bz2
* elf64-sparc.c (sparc64_elf_relocate_section): Disregard
overflows in the .stab section.
Diffstat (limited to 'bfd/elf64-sparc.c')
-rw-r--r--bfd/elf64-sparc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 19750a8..9e06d60 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -2627,6 +2627,16 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
const char *name;
+ /* The Solaris native linker silently disregards
+ overflows. We don't, but this breaks stabs debugging
+ info, whose relocations are only 32-bits wide. Ignore
+ overflows in this case. */
+ if (r_type == R_SPARC_32
+ && (input_section->flags & SEC_DEBUGGING) != 0
+ && strcmp (bfd_section_name (input_bfd, input_section),
+ ".stab") == 0)
+ break;
+
if (h != NULL)
{
if (h->root.type == bfd_link_hash_undefweak