aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-arm.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2000-07-04 05:11:37 +0000
committerAlexandre Oliva <aoliva@redhat.com>2000-07-04 05:11:37 +0000
commited1de528f62ae040182ebfcee2cb4abc3194f47a (patch)
tree56425eb2f63e01651b7884682638cdcab31cf0e6 /bfd/coff-arm.c
parent6c29acca43b2c78b7668b5c8c6676181303b9cfd (diff)
downloadgdb-ed1de528f62ae040182ebfcee2cb4abc3194f47a.zip
gdb-ed1de528f62ae040182ebfcee2cb4abc3194f47a.tar.gz
gdb-ed1de528f62ae040182ebfcee2cb4abc3194f47a.tar.bz2
* coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
value of PC-relative offsets.
Diffstat (limited to 'bfd/coff-arm.c')
-rw-r--r--bfd/coff-arm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index 2b89b84..4aecc07 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -1246,8 +1246,15 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
{
if (info->relocateable)
continue;
+#if 0 /* We must not ignore the symbol value. If the symbol is
+ within the same section, the relocation should have already
+ been fixed, but if it is not, we'll be handed a reloc into
+ the beginning of the symbol's section, so we must not cancel
+ out the symbol's value, otherwise we'll be adding it in
+ twice. */
if (sym != NULL && sym->n_scnum != 0)
addend += sym->n_value;
+#endif
}
val = 0;