diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2006-01-31 22:42:21 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@libertysurf.fr> | 2006-01-31 22:42:21 +0000 |
commit | d42640f765624fdf5301a3b9a6668ee09dd8adf1 (patch) | |
tree | 4fe4d9c28b037b8d33f522f0c97ba36a6d2aa870 /bfd | |
parent | 5b3b236ede6a6452525c6dce1b8c6105baa6ae02 (diff) | |
download | gdb-d42640f765624fdf5301a3b9a6668ee09dd8adf1.tar.gz |
* elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass
for 32-bit relocs overflow.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elfxx-sparc.c | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ce4406952f3..3a0bb0af8e5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2006-01-31 Eric Botcazou <ebotcazou@libertysurf.fr> + + * elfxx-sparc.c (_bfd_sparc_elf_relocate_section): Reinstate bypass + for 32-bit relocs overflow. + 2006-01-27 Paul Brook <paul@codesourcery.com> * elf32-arm.c (elf32_arm_get_symbol_type): Allow STT_TLS thumb diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c index e587a675d80..5e8fb2028c5 100644 --- a/bfd/elfxx-sparc.c +++ b/bfd/elfxx-sparc.c @@ -3357,6 +3357,21 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, { 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 and also for discarded entries. */ + if ((r_type == R_SPARC_32 || r_type == R_SPARC_DISP32) + && (((input_section->flags & SEC_DEBUGGING) != 0 + && strcmp (bfd_section_name (input_bfd, + input_section), + ".stab") == 0) + || _bfd_elf_section_offset (output_bfd, info, + input_section, + rel->r_offset) + == (bfd_vma)-1)) + break; + if (h != NULL) name = NULL; else |