aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-09-15 05:22:32 +0000
committerAlan Modra <amodra@gmail.com>2008-09-15 05:22:32 +0000
commit455bde508dbf8bd82d5f1403aa6e6edf2740f6f2 (patch)
tree30e44ffb2fa610a8444dd72ba53f81b46016fec4 /gas
parent326e541f5e8822537d8b7396372706da22400839 (diff)
downloadgdb-455bde508dbf8bd82d5f1403aa6e6edf2740f6f2.zip
gdb-455bde508dbf8bd82d5f1403aa6e6edf2740f6f2.tar.gz
gdb-455bde508dbf8bd82d5f1403aa6e6edf2740f6f2.tar.bz2
* config/tc-frv.c (md_apply_fix): Use abs_section_sym for
relocs with no symbol. * config/tc-mmix.c (md_assemble): Mark fake symbol on BFD_RELOC_MMIX_BASE_PLUS_OFFSET as OK for use by relocs. (mmix_md_end): Likewise mark mmix reg contents section symbol.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/config/tc-frv.c2
-rw-r--r--gas/config/tc-mmix.c15
3 files changed, 21 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 82ffb6b..51e0c61 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,11 @@
+2008-09-15 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-frv.c (md_apply_fix): Use abs_section_sym for
+ relocs with no symbol.
+ * config/tc-mmix.c (md_assemble): Mark fake symbol on
+ BFD_RELOC_MMIX_BASE_PLUS_OFFSET as OK for use by relocs.
+ (mmix_md_end): Likewise mark mmix reg contents section symbol.
+
2008-09-14 Chris Smith <chris@zxdesign.info>
* config/tc-z80.c: Opcode generation of ld a,(bc) and ld a,(de) was
diff --git a/gas/config/tc-frv.c b/gas/config/tc-frv.c
index e58def9..4551d75 100644
--- a/gas/config/tc-frv.c
+++ b/gas/config/tc-frv.c
@@ -1475,7 +1475,7 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg)
case BFD_RELOC_FRV_TLSDESC_RELAX:
case BFD_RELOC_FRV_GETTLSOFF_RELAX:
case BFD_RELOC_FRV_TLSOFF_RELAX:
- fixP->fx_addsy = expr_build_uconstant (0);
+ fixP->fx_addsy = abs_section_sym;
break;
}
else
diff --git a/gas/config/tc-mmix.c b/gas/config/tc-mmix.c
index c2b3789..320ed2b 100644
--- a/gas/config/tc-mmix.c
+++ b/gas/config/tc-mmix.c
@@ -1365,6 +1365,9 @@ md_assemble (char *str)
pass expressions as symbols and use fix_new, not fix_new_exp. */
sym = make_expr_symbol (exp + 1);
+ /* Mark the symbol as being OK for a reloc. */
+ symbol_get_bfdsym (sym)->flags |= BSF_KEEP;
+
/* Now we know it can be a "base address plus offset". Add
proper fixup types so we can handle this later, when we've
parsed everything. */
@@ -3448,6 +3451,7 @@ mmix_md_end (void)
{
fragS *fragP;
symbolS *mainsym;
+ asection *regsec;
int i;
/* The first frag of GREG:s going into the register contents section. */
@@ -3512,9 +3516,9 @@ mmix_md_end (void)
and the same allocation order (within a file) as mmixal. */
segT this_segment = now_seg;
subsegT this_subsegment = now_subseg;
- asection *regsec
- = bfd_make_section_old_way (stdoutput,
- MMIX_REG_CONTENTS_SECTION_NAME);
+
+ regsec = bfd_make_section_old_way (stdoutput,
+ MMIX_REG_CONTENTS_SECTION_NAME);
subseg_set (regsec, 0);
/* Finally emit the initialization-value. Emit a variable frag, which
@@ -3541,6 +3545,11 @@ mmix_md_end (void)
subseg_set (this_segment, this_subsegment);
}
+ regsec = bfd_get_section_by_name (stdoutput, MMIX_REG_CONTENTS_SECTION_NAME);
+ /* Mark the section symbol as being OK for a reloc. */
+ if (regsec != NULL)
+ regsec->symbol->flags |= BSF_KEEP;
+
/* Iterate over frags resulting from GREGs and move those that evidently
have the same value together and point one to another.