summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/gas/write.c
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-23 04:12:06 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-11-23 04:12:06 +0000
commit37d4621bd4a912b6a032bc21906f7032e602cbf2 (patch)
tree6e6f3dad18baebc5f90abdcbbf4a8ba242555627 /gnu/usr.bin/binutils/gas/write.c
parentfb7c7a778840ea235dd0bb550cfd2e2ac8ccb37c (diff)
Merge to Cygnus 961112 + add some support (not ready) for shared libs
Diffstat (limited to 'gnu/usr.bin/binutils/gas/write.c')
-rw-r--r--gnu/usr.bin/binutils/gas/write.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/gnu/usr.bin/binutils/gas/write.c b/gnu/usr.bin/binutils/gas/write.c
index 46c96b5f97c..211573f2c3d 100644
--- a/gnu/usr.bin/binutils/gas/write.c
+++ b/gnu/usr.bin/binutils/gas/write.c
@@ -295,9 +295,10 @@ fix_new_exp (frag, where, size, exp, pcrel, r_type)
case O_constant:
off = exp->X_add_number;
break;
-
+
default:
- as_bad ("expression too complex for fixup");
+ add = make_expr_symbol (exp);
+ break;
}
return fix_new_internal (frag, where, size, add, sub, off,
@@ -319,7 +320,7 @@ append (charPP, fromP, length)
*charPP += length;
}
-#ifndef BFD_ASSEMBLER
+#ifndef BFD_ASSEMBLER
int section_alignment[SEG_MAXIMUM_ORDINAL];
#endif
@@ -329,7 +330,7 @@ int section_alignment[SEG_MAXIMUM_ORDINAL];
* boundary, all of the other alignments within it will work. At
* least one object format really uses this info.
*/
-void
+void
record_alignment (seg, align)
/* Segment to which alignment pertains */
segT seg;
@@ -427,7 +428,7 @@ chain_frchains_together (abfd, section, xxx)
#if !defined (BFD) && !defined (BFD_ASSEMBLER)
-void
+void
remove_subsegs (head, seg, root, last)
frchainS *head;
int seg;
@@ -727,7 +728,7 @@ adjust_reloc_syms (abfd, sec, xxx)
#endif
/* Is there some other (target cpu dependent) reason we can't adjust
- this one? (E.g. relocations involving function addresses on
+ this one? (E.g. relocations involving function addresses on
the PA. */
#ifdef tc_fix_adjustable
if (! tc_fix_adjustable (fixp))
@@ -1236,7 +1237,7 @@ set_symtab ()
}
#endif
-void
+void
write_object_file ()
{
struct frchain *frchainP; /* Track along all frchains. */
@@ -1793,6 +1794,13 @@ write_object_file ()
bfd_map_over_sections (stdoutput, write_relocs, (char *) 0);
+#ifdef tc_frob_file_after_relocs
+ tc_frob_file_after_relocs ();
+#endif
+#ifdef obj_frob_file_after_relocs
+ obj_frob_file_after_relocs ();
+#endif
+
bfd_map_over_sections (stdoutput, write_contents, (char *) 0);
#endif /* BFD_ASSEMBLER */
}
@@ -1815,7 +1823,7 @@ write_object_file ()
#ifdef TC_GENERIC_RELAX_TABLE
/* Subroutines of relax_segment. */
-static int
+static int
is_dnrange (f1, f2)
struct frag *f1;
struct frag *f2;
@@ -1850,7 +1858,7 @@ relax_align (address, alignment)
return (new_address - address);
}
-void
+void
relax_segment (segment_frag_root, segment)
struct frag *segment_frag_root;
segT segment;
@@ -2225,7 +2233,7 @@ fixup_segment (fixP, this_segment_type)
int pcrel, plt;
fragS *fragP;
segT add_symbol_segment = absolute_section;
-
+
/* If the linker is doing the relaxing, we must not do any fixups.
Well, strictly speaking that's not true -- we could do any that are
@@ -2273,7 +2281,7 @@ fixup_segment (fixP, this_segment_type)
if (add_symbolP)
add_symbol_segment = S_GET_SEGMENT (add_symbolP);
-
+
if (sub_symbolP)
{
resolve_symbol_value (sub_symbolP);
@@ -2410,7 +2418,7 @@ fixup_segment (fixP, this_segment_type)
add_number += S_GET_VALUE (add_symbolP);
add_number -= MD_PCREL_FROM_SECTION (fixP, this_segment_type);
pcrel = 0; /* Lie. Don't want further pcrel processing. */
-
+
/* Let the target machine make the final determination
as to whether or not a relocation will be needed to
handle this fixup. */
@@ -2433,7 +2441,7 @@ fixup_segment (fixP, this_segment_type)
/* Let the target machine make the final determination
as to whether or not a relocation will be needed to
handle this fixup. */
-
+
if (!TC_FORCE_RELOCATION (fixP))
{
fixP->fx_addsy = NULL;
@@ -2461,7 +2469,7 @@ fixup_segment (fixP, this_segment_type)
continue;
} /* COBR */
#endif /* TC_I960 */
-
+
#ifdef OBJ_COFF
#ifdef TE_I386AIX
if (S_IS_COMMON (add_symbolP))