aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1993-11-02 06:31:36 +0000
committerJeff Law <law@redhat.com>1993-11-02 06:31:36 +0000
commitc43d56f78c395ea7d612ecdf2fc2bd05a2e961c9 (patch)
tree00b8fa2d603a249ca3a4ad6b0ccdbb062a641643 /gas
parent009dc5e1e51a2770064f1072334900c5b995b0df (diff)
downloadgdb-c43d56f78c395ea7d612ecdf2fc2bd05a2e961c9.zip
gdb-c43d56f78c395ea7d612ecdf2fc2bd05a2e961c9.tar.gz
gdb-c43d56f78c395ea7d612ecdf2fc2bd05a2e961c9.tar.bz2
* Add support for marker type relocations. These mark areas
of interest to the linker. ENTRY/EXIT relocations for SOM are an example of marker relocations. * write.c (write_relocs): Instead of assuming size of a relocation is 4 bytes, pick up the size from relocation itself. (fixup_segment): Do not complain that a value is too small for marker relocations.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog8
-rw-r--r--gas/write.c7
2 files changed, 11 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index a5c3468..cbc6667 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,13 @@
Mon Nov 1 21:37:04 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
+ * Add support for marker type relocations. These mark areas
+ of interest to the linker. ENTRY/EXIT relocations for SOM are
+ an example of marker relocations.
+ * write.c (write_relocs): Instead of assuming size of a relocation
+ is 4 bytes, pick up the size from relocation itself.
+ (fixup_segment): Do not complain that a value is too small for
+ marker relocations.
+
* struc-symbol.h: Add new "sy_used" field to the symbol structure.
* expr.c (operand): Set sy_used for any symbol used as an operand.
(expr): Likewise for any symbol used in an expression.
diff --git a/gas/write.c b/gas/write.c
index 0b074d5..e2e1c3d 100644
--- a/gas/write.c
+++ b/gas/write.c
@@ -632,8 +632,7 @@ write_relocs (abfd, sec, xxx)
continue;
}
data = fixp->fx_frag->fr_literal + fixp->fx_where;
- /* @@ Assumes max size of reloc is 4. */
- if (fixp->fx_where + 4
+ if (fixp->fx_where + fixp->fx_size
> fixp->fx_frag->fr_fix + fixp->fx_frag->fr_offset)
abort ();
/* Pass bogus address so that when bfd_perform_relocation adds
@@ -686,7 +685,7 @@ write_relocs (abfd, sec, xxx)
assert(i <= n);
}
data = fixp->fx_frag->fr_literal + fixp->fx_where;
- if (fixp->fx_where + 4
+ if (fixp->fx_where + fixp->fx_size
> fixp->fx_frag->fr_fix + fixp->fx_frag->fr_offset)
abort ();
for (j = 0; reloc[j]; j++)
@@ -2011,7 +2010,7 @@ fixup_segment (fixP, this_segment_type)
} /* if there's an add_symbol */
} /* if pcrel */
- if (!fixP->fx_bit_fixP)
+ if (!fixP->fx_bit_fixP && size > 0)
{
valueT mask = 0;
/* set all bits to one */