aboutsummaryrefslogtreecommitdiff
path: root/gas/literal.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-02-05 05:29:42 +0000
committerIan Lance Taylor <ian@airs.com>1994-02-05 05:29:42 +0000
commit262b22cd105ec7d67dd4fec6c1fdf3773800d339 (patch)
treeab892fa78d906a82e1f6d7a847a966441d7f856a /gas/literal.c
parentd352be4f43aa1a8d567305187708261cc67de299 (diff)
downloadgdb-262b22cd105ec7d67dd4fec6c1fdf3773800d339.zip
gdb-262b22cd105ec7d67dd4fec6c1fdf3773800d339.tar.gz
gdb-262b22cd105ec7d67dd4fec6c1fdf3773800d339.tar.bz2
Changed relocs to be based on subsegments (when BFD_ASSEMBLER).
* subsegs.h (struct frchain): If BFD_ASSEMBLER, added new fields fix_root and fix_tail. (segment_info_type): If BFD_ASSEMBLER, don't define fix_tail field. * write.c (fix_new_internal): If BFD_ASSEMBLER, set fix_rootP and fix_tailP based on frchain_now, not seg_info (now_seg). (chain_frchains_together_1): Chain the subsegment relocs together. * subsegs.c (subseg_change): Don't clear fix_tail field. (subseg_get): Likewise. * literal.c (add_to_literal_pool): Look through the relocs via frchain_now, not seginfo. * write.c (write_object_file): Simplified usage of obj_frob_symbol and tc_frob_symbol. Always call both if the symbol is going to be output. * write.c (relax_segment): Use %ld rather than %d when printing fragP->fr_var, and cast it to long.
Diffstat (limited to 'gas/literal.c')
-rw-r--r--gas/literal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gas/literal.c b/gas/literal.c
index f622d31..ada59e7 100644
--- a/gas/literal.c
+++ b/gas/literal.c
@@ -59,7 +59,10 @@ add_to_literal_pool (sym, addend, sec, size)
offset = 0;
/* @@ This assumes all entries in a given section will be of the same
size... Probably correct, but unwise to rely on. */
- for (fixp = seginfo->fix_root; fixp; fixp = fixp->fx_next, offset += size)
+ /* This must always be called with the same subsegment. */
+ for (fixp = frchain_now->fix_root;
+ fixp != (fixS *) NULL;
+ fixp = fixp->fx_next, offset += size)
{
if (fixp->fx_addsy == sym && fixp->fx_offset == addend)
return offset;