+Fri Oct 4 18:37:32 1996 Ian Lance Taylor <ian@cygnus.com>
+
+ * config/obj-coff.c (fixup_segment): Subtract the section address
+ from a PC relative reloc if TC_M68K.
+
Thu Oct 3 15:15:30 1996 Ian Lance Taylor <ian@cygnus.com>
* config/tc-sparc.c (md_pseudo_table): Make .uahalf, .uaword, and
add_number += S_GET_VALUE (add_symbolP);
add_number -= md_pcrel_from (fixP);
-#if defined (TC_I386) || defined (TE_LYNX) || defined (TC_I960)
+#if defined (TC_I386) || defined (TE_LYNX)
/* On the 386 we must adjust by the segment vaddr as
- well. Ian Taylor. I changed the i960 to work this
- way as well. This is compatible with the current GNU
- linker behaviour. I do not know what other i960 COFF
- assemblers do. This is not a common case: normally,
- only assembler code will contain a PC relative reloc,
- and only branches which do not originate in the .text
- section will have a non-zero address. */
+ well. Ian Taylor. */
add_number -= segP->scnhdr.s_vaddr;
#endif
pcrel = 0; /* Lie. Don't want further pcrel processing. */
{
fixP->fx_addsy = &abs_symbol;
} /* if there's an add_symbol */
-#if defined (TC_I386) || defined (TE_LYNX) || defined (TC_I960)
+#if defined (TC_I386) || defined (TE_LYNX) || defined (TC_I960) || defined (TC_M68K)
/* On the 386 we must adjust by the segment vaddr as well.
- Ian Taylor. As noted above, I made the i960 work this
- way as well. */
+ Ian Taylor.
+
+ I changed the i960 to work this way as well. This is
+ compatible with the current GNU linker behaviour. I do
+ not know what other i960 COFF assemblers do. This is not
+ a common case: normally, only assembler code will contain
+ a PC relative reloc, and only branches which do not
+ originate in the .text section will have a non-zero
+ address.
+
+ I changed the m68k to work this way as well. This will
+ break existing PC relative relocs from sections which do
+ not start at address 0, but it will make ld -r work.
+ Ian Taylor, 4 Oct 96. */
+
add_number -= segP->scnhdr.s_vaddr;
#endif
} /* if pcrel */