aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-ppc.c
diff options
context:
space:
mode:
authorKim Knuttila <krk@cygnus>1995-12-12 23:47:05 +0000
committerKim Knuttila <krk@cygnus>1995-12-12 23:47:05 +0000
commitcaa740beb84d3e73cf48991baa02b0fd0c04811b (patch)
treead78810da3b8ad74f82fcb25b57b9051db8fae08 /bfd/coff-ppc.c
parentaaa877b7ac6d27e4ce22a22e55feca89d6dd436b (diff)
downloadgdb-caa740beb84d3e73cf48991baa02b0fd0c04811b.zip
gdb-caa740beb84d3e73cf48991baa02b0fd0c04811b.tar.gz
gdb-caa740beb84d3e73cf48991baa02b0fd0c04811b.tar.bz2
Fixes for .reloc
Diffstat (limited to 'bfd/coff-ppc.c')
-rw-r--r--bfd/coff-ppc.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/bfd/coff-ppc.c b/bfd/coff-ppc.c
index 350cca3..7008109 100644
--- a/bfd/coff-ppc.c
+++ b/bfd/coff-ppc.c
@@ -1132,8 +1132,17 @@ static boolean in_reloc_p(abfd, howto)
{
return
(! howto->pc_relative)
+ && (howto->type != IMAGE_REL_PPC_ADDR32NB)
&& (howto->type != IMAGE_REL_PPC_TOCREL16)
- && (howto->type != IMAGE_REL_PPC_IMGLUE);
+ && (howto->type != IMAGE_REL_PPC_IMGLUE)
+ && (howto->type != IMAGE_REL_PPC_IFGLUE)
+ && (howto->type != IMAGE_REL_PPC_SECREL)
+ && (howto->type != IMAGE_REL_PPC_SECTION)
+ && (howto->type != IMAGE_REL_PPC_SECREL16)
+ && (howto->type != IMAGE_REL_PPC_REFHI)
+ && (howto->type != IMAGE_REL_PPC_REFLO)
+ && (howto->type != IMAGE_REL_PPC_PAIR)
+ && (howto->type != IMAGE_REL_PPC_TOCREL16_DEFN) ;
}
/* this function is in charge of performing all the ppc PE relocations */
@@ -1519,11 +1528,12 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma addr = toc_section->output_section->vma
+ toc_section->output_offset + our_toc_offset;
- fprintf(stderr,
- " Toc Section reloc candidate\n");
-
if (coff_data(output_bfd)->pe)
addr -= pe_data(output_bfd)->pe_opthdr.ImageBase;
+
+ fprintf(stderr,
+ " Toc Section .reloc candidate addr = %x\n", addr);
+
fwrite (&addr, 1,4, (FILE *) info->base_file);
}
@@ -1722,11 +1732,14 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
+ input_section->output_offset
+ input_section->output_section->vma;
+ DUMP_RELOC2(howto->name, rel);
+
if (coff_data(output_bfd)->pe)
{
+ bfd_vma before_addr = addr;
addr -= pe_data(output_bfd)->pe_opthdr.ImageBase;
fprintf(stderr,
- " adjusted down to %d", addr);
+ " adjusted down from %x to %x", before_addr, addr);
}
fprintf(stderr, "\n");