aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2006-11-27 11:25:27 +0000
committerEric Botcazou <ebotcazou@libertysurf.fr>2006-11-27 11:25:27 +0000
commit062cf83700a3bd7099b83ce38b9fc732e3723004 (patch)
tree0c21a2172ed06dcb4745695322d1eb3b400b547f /gas
parent14077f2331cc81dc51bbb659223d085404fa8f40 (diff)
downloadgdb-062cf83700a3bd7099b83ce38b9fc732e3723004.zip
gdb-062cf83700a3bd7099b83ce38b9fc732e3723004.tar.gz
gdb-062cf83700a3bd7099b83ce38b9fc732e3723004.tar.bz2
* config/tc-sparc.c (tc_gen_reloc): Turn aligned relocs into
their unaligned counterparts in debugging sections.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-sparc.c12
2 files changed, 16 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 506f0fc..8e45803 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-27 Eric Botcazou <ebotcazou@adacore.com>
+
+ * config/tc-sparc.c (tc_gen_reloc): Turn aligned relocs into
+ their unaligned counterparts in debugging sections.
+
2006-11-24 Alan Modra <amodra@bigpond.net.au>
* config/tc-spu.c (md_pseudo_table): Add eqv and .eqv.
diff --git a/gas/config/tc-sparc.c b/gas/config/tc-sparc.c
index d6a1a15..c98081c 100644
--- a/gas/config/tc-sparc.c
+++ b/gas/config/tc-sparc.c
@@ -3437,7 +3437,7 @@ md_apply_fix (fixP, valP, segment)
arelent **
tc_gen_reloc (section, fixp)
- asection *section ATTRIBUTE_UNUSED;
+ asection *section;
fixS *fixp;
{
static arelent *relocs[3];
@@ -3580,6 +3580,16 @@ tc_gen_reloc (section, fixp)
}
#endif /* defined (OBJ_ELF) || defined (OBJ_AOUT) */
+ /* Nothing is aligned in DWARF debugging sections. */
+ if (bfd_get_section_flags (stdoutput, section) & SEC_DEBUGGING)
+ switch (code)
+ {
+ case BFD_RELOC_16: code = BFD_RELOC_SPARC_UA16; break;
+ case BFD_RELOC_32: code = BFD_RELOC_SPARC_UA32; break;
+ case BFD_RELOC_64: code = BFD_RELOC_SPARC_UA64; break;
+ default: break;
+ }
+
if (code == BFD_RELOC_SPARC_OLO10)
reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_LO10);
else