+Tue Aug 8 02:31:38 1995 Ken Raeburn <raeburn@cygnus.com>
+
+ * write.c (relax_align): Add extra padding for linkrelax only if
+ LINKER_RELAXING_SHRINKS_ONLY is defined.
+ * config/tc-i960.h (LINKER_RELAXING_SHRINKS_ONLY): Define it.
+ * doc/internals.texi (Relaxation): Write up some stuff on linker
+ relaxing and LINKER_RELAXING_SHRINKS_ONLY.
+
Mon Aug 7 17:18:10 1995 Ian Lance Taylor <ian@cygnus.com>
* config/m68k-parse.y: New file: bison grammar for m68k operands,
fragS *fragP;
#else
static void
-cvt_frag_to_fill (headersP, fragP)
+cvt_frag_to_fill (headersP, sec, fragP)
object_headers *headersP;
+ segT sec;
fragS *fragP;
#endif
{
#ifdef BFD_ASSEMBLER
md_convert_frag (stdoutput, sec, fragP);
#else
- md_convert_frag (headersP, fragP);
+ md_convert_frag (headersP, sec, fragP);
#endif
assert (fragP->fr_next == NULL || (fragP->fr_next->fr_address - fragP->fr_address == fragP->fr_fix));
|| bfd_is_com_section (symsec))
{
fixp->fx_addsy->sy_used_in_reloc = 1;
+#ifdef UNDEFINED_DIFFERENCE_OK
+ /* We have the difference of an undefined symbol and some
+ other symbol. Make sure to mark the other symbol as used
+ in a relocation so that it will always be output. */
+ if (fixp->fx_subsy)
+ fixp->fx_subsy->sy_used_in_reloc = 1;
+#endif
goto done;
}
for (fragP = text_frag_root; fragP; fragP = fragP->fr_next)
{
- cvt_frag_to_fill (&headers, fragP);
+ cvt_frag_to_fill (&headers, SEG_TEXT, fragP);
/* Some assert macros don't work with # directives mixed in. */
#ifndef NDEBUG
mask = ~((~0) << alignment);
new_address = (address + mask) & (~mask);
+#ifdef LINKER_RELAXING_SHRINKS_ONLY
if (linkrelax)
/* We must provide lots of padding, so the linker can discard it
when needed. The linker will not add extra space, ever. */
new_address += (1 << alignment);
+#endif
return (new_address - address);
}
fixP->fx_subsy = 0;
}
#endif
+#ifdef UNDEFINED_DIFFERENCE_OK
+ /* The PA needs this for PIC code generation. We basically
+ don't want to do anything if we have the difference of two
+ symbols at this point. */
+ else if (1)
+ {
+ /* Leave it alone. */
+ }
+#endif
#ifdef BFD_ASSEMBLER
else if (fixP->fx_r_type == BFD_RELOC_GPREL32
|| fixP->fx_r_type == BFD_RELOC_GPREL16)