summaryrefslogtreecommitdiffstats
path: root/bfd
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-05-28 09:23:54 +0000
committerNick Clifton <nickc@redhat.com>2001-05-28 09:23:54 +0000
commit0f2712edc99c8717cd41a05b6fede5ba9ff8b35d (patch)
tree393fbe4e8d50197c60c94210e08ed34f14d1adb4 /bfd
parentc04a062df3a62d69cdf5e75fe01c5cd3dec4435e (diff)
downloadppe42-binutils-0f2712edc99c8717cd41a05b6fede5ba9ff8b35d.tar.gz
ppe42-binutils-0f2712edc99c8717cd41a05b6fede5ba9ff8b35d.zip
Add support for .uahword, .uaword and .uaxword pseudo ops
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog9
-rw-r--r--bfd/bfd-in2.h2
-rw-r--r--bfd/elf32-sparc.c53
-rw-r--r--bfd/elf64-sparc.c51
-rw-r--r--bfd/libbfd.h2
-rw-r--r--bfd/po/bfd.pot2
-rw-r--r--bfd/reloc.c4
7 files changed, 74 insertions, 49 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d9903cfe8e..b6d3c40716 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,12 @@
+2001-05-28 Jeff Sturm <jsturm@one-point.com>
+
+ * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
+ and BFD_RELOC_SPARC_UA64 mapping
+ * elf64-sparc.c: Likewise.
+
2001-05-25 H.J. Lu <hjl@gnu.org>
* Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index 7fca406408..5d10ad0e17 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -1928,7 +1928,9 @@ relocation types already defined. */
BFD_RELOC_SPARC_GLOB_DAT,
BFD_RELOC_SPARC_JMP_SLOT,
BFD_RELOC_SPARC_RELATIVE,
+ BFD_RELOC_SPARC_UA16,
BFD_RELOC_SPARC_UA32,
+ BFD_RELOC_SPARC_UA64,
/* I think these are specific to SPARC a.out (e.g., Sun 4). */
BFD_RELOC_SPARC_BASE13,
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index 43a3e2320c..091cd3917f 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -120,9 +120,9 @@ reloc_howto_type _bfd_sparc_elf_howto_table[] =
HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
- HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
- HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
- HOWTO(R_SPARC_REV32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", false,0,0xffffffff,true),
+ HOWTO(R_SPARC_UA64, 0,4,64,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA64", false,0,(~ (bfd_vma)0), true),
+ HOWTO(R_SPARC_UA16, 0,1,16,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA16", false,0,0x0000ffff,true),
+ HOWTO(R_SPARC_REV32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", false,0,0xffffffff,true),
};
static reloc_howto_type elf32_sparc_vtinherit_howto =
HOWTO (R_SPARC_GNU_VTINHERIT, 0,2,0,false,0,complain_overflow_dont, NULL, "R_SPARC_GNU_VTINHERIT", false,0, 0, false);
@@ -159,26 +159,27 @@ static CONST struct elf_reloc_map sparc_reloc_map[] =
{ BFD_RELOC_SPARC_JMP_SLOT, R_SPARC_JMP_SLOT },
{ BFD_RELOC_SPARC_RELATIVE, R_SPARC_RELATIVE },
{ BFD_RELOC_SPARC_WDISP22, R_SPARC_WDISP22 },
- /* ??? Doesn't dwarf use this? */
-/*{ BFD_RELOC_SPARC_UA32, R_SPARC_UA32 }, not used?? */
- {BFD_RELOC_SPARC_10, R_SPARC_10},
- {BFD_RELOC_SPARC_11, R_SPARC_11},
- {BFD_RELOC_SPARC_64, R_SPARC_64},
- {BFD_RELOC_SPARC_OLO10, R_SPARC_OLO10},
- {BFD_RELOC_SPARC_HH22, R_SPARC_HH22},
- {BFD_RELOC_SPARC_HM10, R_SPARC_HM10},
- {BFD_RELOC_SPARC_LM22, R_SPARC_LM22},
- {BFD_RELOC_SPARC_PC_HH22, R_SPARC_PC_HH22},
- {BFD_RELOC_SPARC_PC_HM10, R_SPARC_PC_HM10},
- {BFD_RELOC_SPARC_PC_LM22, R_SPARC_PC_LM22},
- {BFD_RELOC_SPARC_WDISP16, R_SPARC_WDISP16},
- {BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19},
- {BFD_RELOC_SPARC_7, R_SPARC_7},
- {BFD_RELOC_SPARC_5, R_SPARC_5},
- {BFD_RELOC_SPARC_6, R_SPARC_6},
- {BFD_RELOC_SPARC_REV32, R_SPARC_REV32 },
- {BFD_RELOC_VTABLE_INHERIT, R_SPARC_GNU_VTINHERIT},
- {BFD_RELOC_VTABLE_ENTRY, R_SPARC_GNU_VTENTRY},
+ { BFD_RELOC_SPARC_UA16, R_SPARC_UA16 },
+ { BFD_RELOC_SPARC_UA32, R_SPARC_UA32 },
+ { BFD_RELOC_SPARC_UA64, R_SPARC_UA64 },
+ { BFD_RELOC_SPARC_10, R_SPARC_10 },
+ { BFD_RELOC_SPARC_11, R_SPARC_11 },
+ { BFD_RELOC_SPARC_64, R_SPARC_64 },
+ { BFD_RELOC_SPARC_OLO10, R_SPARC_OLO10 },
+ { BFD_RELOC_SPARC_HH22, R_SPARC_HH22 },
+ { BFD_RELOC_SPARC_HM10, R_SPARC_HM10 },
+ { BFD_RELOC_SPARC_LM22, R_SPARC_LM22 },
+ { BFD_RELOC_SPARC_PC_HH22, R_SPARC_PC_HH22 },
+ { BFD_RELOC_SPARC_PC_HM10, R_SPARC_PC_HM10 },
+ { BFD_RELOC_SPARC_PC_LM22, R_SPARC_PC_LM22 },
+ { BFD_RELOC_SPARC_WDISP16, R_SPARC_WDISP16 },
+ { BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19 },
+ { BFD_RELOC_SPARC_7, R_SPARC_7 },
+ { BFD_RELOC_SPARC_5, R_SPARC_5 },
+ { BFD_RELOC_SPARC_6, R_SPARC_6 },
+ { BFD_RELOC_SPARC_REV32, R_SPARC_REV32 },
+ { BFD_RELOC_VTABLE_INHERIT, R_SPARC_GNU_VTINHERIT },
+ { BFD_RELOC_VTABLE_ENTRY, R_SPARC_GNU_VTENTRY },
};
static reloc_howto_type *
@@ -551,7 +552,9 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
case R_SPARC_22:
case R_SPARC_13:
case R_SPARC_LO10:
+ case R_SPARC_UA16:
case R_SPARC_UA32:
+ case R_SPARC_UA64:
if (h != NULL)
h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
@@ -1218,7 +1221,9 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
|| r_type == R_SPARC_22
|| r_type == R_SPARC_13
|| r_type == R_SPARC_LO10
+ || r_type == R_SPARC_UA16
|| r_type == R_SPARC_UA32
+ || r_type == R_SPARC_UA64
|| ((r_type == R_SPARC_PC10
|| r_type == R_SPARC_PC22)
&& strcmp (h->root.root.string,
@@ -1405,7 +1410,9 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
case R_SPARC_22:
case R_SPARC_13:
case R_SPARC_LO10:
+ case R_SPARC_UA16:
case R_SPARC_UA32:
+ case R_SPARC_UA64:
if (info->shared)
{
Elf_Internal_Rela outrel;
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 33e75ff5fa..bd32b6eb4f 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -188,31 +188,32 @@ static CONST struct elf_reloc_map sparc_reloc_map[] =
{ BFD_RELOC_SPARC_JMP_SLOT, R_SPARC_JMP_SLOT },
{ BFD_RELOC_SPARC_RELATIVE, R_SPARC_RELATIVE },
{ BFD_RELOC_SPARC_WDISP22, R_SPARC_WDISP22 },
- /* ??? Doesn't dwarf use this? */
-/*{ BFD_RELOC_SPARC_UA32, R_SPARC_UA32 }, not used?? */
- {BFD_RELOC_SPARC_10, R_SPARC_10},
- {BFD_RELOC_SPARC_11, R_SPARC_11},
- {BFD_RELOC_SPARC_64, R_SPARC_64},
- {BFD_RELOC_SPARC_OLO10, R_SPARC_OLO10},
- {BFD_RELOC_SPARC_HH22, R_SPARC_HH22},
- {BFD_RELOC_SPARC_HM10, R_SPARC_HM10},
- {BFD_RELOC_SPARC_LM22, R_SPARC_LM22},
- {BFD_RELOC_SPARC_PC_HH22, R_SPARC_PC_HH22},
- {BFD_RELOC_SPARC_PC_HM10, R_SPARC_PC_HM10},
- {BFD_RELOC_SPARC_PC_LM22, R_SPARC_PC_LM22},
- {BFD_RELOC_SPARC_WDISP16, R_SPARC_WDISP16},
- {BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19},
- {BFD_RELOC_SPARC_7, R_SPARC_7},
- {BFD_RELOC_SPARC_5, R_SPARC_5},
- {BFD_RELOC_SPARC_6, R_SPARC_6},
- {BFD_RELOC_SPARC_DISP64, R_SPARC_DISP64},
- {BFD_RELOC_SPARC_PLT64, R_SPARC_PLT64},
- {BFD_RELOC_SPARC_HIX22, R_SPARC_HIX22},
- {BFD_RELOC_SPARC_LOX10, R_SPARC_LOX10},
- {BFD_RELOC_SPARC_H44, R_SPARC_H44},
- {BFD_RELOC_SPARC_M44, R_SPARC_M44},
- {BFD_RELOC_SPARC_L44, R_SPARC_L44},
- {BFD_RELOC_SPARC_REGISTER, R_SPARC_REGISTER}
+ { BFD_RELOC_SPARC_UA16, R_SPARC_UA16 },
+ { BFD_RELOC_SPARC_UA32, R_SPARC_UA32 },
+ { BFD_RELOC_SPARC_UA64, R_SPARC_UA64 },
+ { BFD_RELOC_SPARC_10, R_SPARC_10 },
+ { BFD_RELOC_SPARC_11, R_SPARC_11 },
+ { BFD_RELOC_SPARC_64, R_SPARC_64 },
+ { BFD_RELOC_SPARC_OLO10, R_SPARC_OLO10 },
+ { BFD_RELOC_SPARC_HH22, R_SPARC_HH22 },
+ { BFD_RELOC_SPARC_HM10, R_SPARC_HM10 },
+ { BFD_RELOC_SPARC_LM22, R_SPARC_LM22 },
+ { BFD_RELOC_SPARC_PC_HH22, R_SPARC_PC_HH22 },
+ { BFD_RELOC_SPARC_PC_HM10, R_SPARC_PC_HM10 },
+ { BFD_RELOC_SPARC_PC_LM22, R_SPARC_PC_LM22 },
+ { BFD_RELOC_SPARC_WDISP16, R_SPARC_WDISP16 },
+ { BFD_RELOC_SPARC_WDISP19, R_SPARC_WDISP19 },
+ { BFD_RELOC_SPARC_7, R_SPARC_7 },
+ { BFD_RELOC_SPARC_5, R_SPARC_5 },
+ { BFD_RELOC_SPARC_6, R_SPARC_6 },
+ { BFD_RELOC_SPARC_DISP64, R_SPARC_DISP64 },
+ { BFD_RELOC_SPARC_PLT64, R_SPARC_PLT64 },
+ { BFD_RELOC_SPARC_HIX22, R_SPARC_HIX22 },
+ { BFD_RELOC_SPARC_LOX10, R_SPARC_LOX10 },
+ { BFD_RELOC_SPARC_H44, R_SPARC_H44 },
+ { BFD_RELOC_SPARC_M44, R_SPARC_M44 },
+ { BFD_RELOC_SPARC_L44, R_SPARC_L44 },
+ { BFD_RELOC_SPARC_REGISTER, R_SPARC_REGISTER }
};
static reloc_howto_type *
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
index 5b02d6f6f0..536d67ab5e 100644
--- a/bfd/libbfd.h
+++ b/bfd/libbfd.h
@@ -671,7 +671,9 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_SPARC_GLOB_DAT",
"BFD_RELOC_SPARC_JMP_SLOT",
"BFD_RELOC_SPARC_RELATIVE",
+ "BFD_RELOC_SPARC_UA16",
"BFD_RELOC_SPARC_UA32",
+ "BFD_RELOC_SPARC_UA64",
"BFD_RELOC_SPARC_BASE13",
"BFD_RELOC_SPARC_BASE22",
"BFD_RELOC_SPARC_10",
diff --git a/bfd/po/bfd.pot b/bfd/po/bfd.pot
index 29b107b209..afcb138ef9 100644
--- a/bfd/po/bfd.pot
+++ b/bfd/po/bfd.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-05-23 19:09+0100\n"
+"POT-Creation-Date: 2001-05-23 19:40+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/bfd/reloc.c b/bfd/reloc.c
index 4fcab608bc..6d9b35b7f7 100644
--- a/bfd/reloc.c
+++ b/bfd/reloc.c
@@ -1800,7 +1800,11 @@ ENUMX
ENUMX
BFD_RELOC_SPARC_RELATIVE
ENUMX
+ BFD_RELOC_SPARC_UA16
+ENUMX
BFD_RELOC_SPARC_UA32
+ENUMX
+ BFD_RELOC_SPARC_UA64
ENUMDOC
SPARC ELF relocations. There is probably some overlap with other
relocation types already defined.
OpenPOWER on IntegriCloud