aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-sh.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-05-11 17:15:53 +0000
committerDaniel Jacobowitz <drow@false.org>2002-05-11 17:15:53 +0000
commita9a32010d517d816b28c10e0519a3627ac465db9 (patch)
tree93e3f068f08dd2322014bfe1a7c0d7f1b42e9e11 /bfd/coff-sh.c
parent8513dd2d37a6265302833384f327f064ebc569e3 (diff)
downloadgdb-a9a32010d517d816b28c10e0519a3627ac465db9.zip
gdb-a9a32010d517d816b28c10e0519a3627ac465db9.tar.gz
gdb-a9a32010d517d816b28c10e0519a3627ac465db9.tar.bz2
2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
Daniel Jacobowitz <drow@mvista.com> * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't map BFD_RELOC_RVA.
Diffstat (limited to 'bfd/coff-sh.c')
-rw-r--r--bfd/coff-sh.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c
index ae73996..d1dc4fd 100644
--- a/bfd/coff-sh.c
+++ b/bfd/coff-sh.c
@@ -473,6 +473,7 @@ struct shcoff_reloc_map
unsigned char shcoff_reloc_val;
};
+#ifdef COFF_WITH_PE
/* An array mapping BFD reloc codes to SH PE relocs. */
static const struct shcoff_reloc_map sh_reloc_map[] =
{
@@ -480,6 +481,14 @@ static const struct shcoff_reloc_map sh_reloc_map[] =
{ BFD_RELOC_RVA, R_SH_IMAGEBASE },
{ BFD_RELOC_CTOR, R_SH_IMM32CE },
};
+#else
+/* An array mapping BFD reloc codes to SH PE relocs. */
+static const struct shcoff_reloc_map sh_reloc_map[] =
+{
+ { BFD_RELOC_32, R_SH_IMM32 },
+ { BFD_RELOC_CTOR, R_SH_IMM32 },
+};
+#endif
/* Given a BFD reloc code, return the howto structure for the
corresponding SH PE reloc. */