aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-mn10300.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-11-13 10:40:29 +0000
committerNick Clifton <nickc@redhat.com>2007-11-13 10:40:29 +0000
commitb5f5fd962ef368674d3460bf78a9c6d13a2ab72b (patch)
treee438575a95064274620cb1ef22c617a4b5b8d145 /gas/config/tc-mn10300.c
parent0067a5693ac40531a6975777c7b6c3b40fd8795e (diff)
downloadgdb-b5f5fd962ef368674d3460bf78a9c6d13a2ab72b.zip
gdb-b5f5fd962ef368674d3460bf78a9c6d13a2ab72b.tar.gz
gdb-b5f5fd962ef368674d3460bf78a9c6d13a2ab72b.tar.bz2
* config/tc-mn10300.c (mn10300_force_relocation): Force a reloc to be generated for alignment fixups.
* config/tc-mn10300.h (TC_FORCE_RELOCATION): Call mn10300_force_relocation. * elf-m10300.c (mn10300_elf_final_link_relocate): Prevent the accidental termination of DWARF location list entries. (mn10300_elf_relax_delete_bytes): Stop deletion if an align reloc is encountered that is larger than or not a mutliple of the number of bytes being deleted. When adjusting symbols, any symbols inside the region being deleted must be moved to the end of the region. Move align relocs forward if there is room for them after the deletion of the region.
Diffstat (limited to 'gas/config/tc-mn10300.c')
-rw-r--r--gas/config/tc-mn10300.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c
index e16a764..5d21cb5 100644
--- a/gas/config/tc-mn10300.c
+++ b/gas/config/tc-mn10300.c
@@ -2571,11 +2571,9 @@ mn10300_allow_local_subtract (expressionS * left, expressionS * right, segT sect
void
mn10300_handle_align (fragS *frag)
{
- if (! linkrelax)
- return;
-
- if ((frag->fr_type == rs_align
- || frag->fr_type == rs_align_code)
+ if (linkrelax
+ && (frag->fr_type == rs_align
+ || frag->fr_type == rs_align_code)
&& frag->fr_address + frag->fr_fix > 0
&& frag->fr_offset > 1
&& now_seg != bss_section
@@ -2590,3 +2588,14 @@ mn10300_handle_align (fragS *frag)
fix_new (frag, frag->fr_fix, 0, & abs_symbol, frag->fr_offset, FALSE,
BFD_RELOC_MN10300_ALIGN);
}
+
+bfd_boolean
+mn10300_force_relocation (struct fix * fixp)
+{
+ if (linkrelax
+ && (fixp->fx_pcrel
+ || fixp->fx_r_type == BFD_RELOC_MN10300_ALIGN))
+ return TRUE;
+
+ return generic_force_reloc (fixp);
+}