aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1996-10-04 22:38:44 +0000
committerIan Lance Taylor <ian@airs.com>1996-10-04 22:38:44 +0000
commiteb0dafdc04492134edaf183539a1ddbf65b66988 (patch)
tree4dbfc7239cdfe1e907f2ac9d21d184b5d47998af /gas
parent99777c0bfbab42fa29f624b0d37cb4cc34bde7e1 (diff)
downloadgdb-eb0dafdc04492134edaf183539a1ddbf65b66988.zip
gdb-eb0dafdc04492134edaf183539a1ddbf65b66988.tar.gz
gdb-eb0dafdc04492134edaf183539a1ddbf65b66988.tar.bz2
* config/obj-coff.c (fixup_segment): Subtract the section address
from a PC relative reloc if TC_M68K.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/obj-coff.c29
2 files changed, 23 insertions, 11 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 95a5bcd..ba8bebd 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+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
diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c
index 62ed1b8..eea84bc 100644
--- a/gas/config/obj-coff.c
+++ b/gas/config/obj-coff.c
@@ -3971,15 +3971,9 @@ fixup_segment (segP, this_segment_type)
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. */
@@ -4061,10 +4055,23 @@ fixup_segment (segP, this_segment_type)
{
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 */