aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorBen Elliston <bje@au.ibm.com>2006-10-26 00:10:43 +0000
committerBen Elliston <bje@au.ibm.com>2006-10-26 00:10:43 +0000
commit0b8535371959d13802d8206bf062e18103150897 (patch)
tree81d3b6bb9189690657e42eac43b386f0e611729b /bfd
parent23fe95776c0a1c4b4f59f09ce6a4b5635170dc43 (diff)
downloadfsf-binutils-gdb-0b8535371959d13802d8206bf062e18103150897.zip
fsf-binutils-gdb-0b8535371959d13802d8206bf062e18103150897.tar.gz
fsf-binutils-gdb-0b8535371959d13802d8206bf062e18103150897.tar.bz2
* coff-maxq.c (coff_maxq20_reloc): Remove unused variable `howto'.
(struct maxq_reloc_map): Unused; remove. (maxq_reloc_map): Likewise. (maxq_reloc_type_lookup): Remove loop over maxq_reloc_map.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/coff-maxq.c83
2 files changed, 34 insertions, 56 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 88fb22e..2018462 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,12 @@
2006-10-26 Ben Elliston <bje@au.ibm.com>
+ * coff-maxq.c (coff_maxq20_reloc): Remove unused variable `howto'.
+ (struct maxq_reloc_map): Unused; remove.
+ (maxq_reloc_map): Likewise.
+ (maxq_reloc_type_lookup): Remove loop over maxq_reloc_map.
+
+2006-10-26 Ben Elliston <bje@au.ibm.com>
+
* elf.c (bfd_elf_set_dyn_lib_class): Change second argument type
from int to enum dynamic_lib_link_class lib_class.
* bfd-in.h (bfd_elf_set_dyn_lib_class): Likewise.
diff --git a/bfd/coff-maxq.c b/bfd/coff-maxq.c
index 6414cb9..58f9297 100644
--- a/bfd/coff-maxq.c
+++ b/bfd/coff-maxq.c
@@ -82,7 +82,6 @@ coff_maxq20_reloc (bfd * abfd,
bfd * output_bfd ATTRIBUTE_UNUSED,
char ** error_message ATTRIBUTE_UNUSED)
{
- reloc_howto_type *howto = NULL;
unsigned char *addr = NULL;
unsigned long x = 0;
long call_addr = 0;
@@ -96,7 +95,6 @@ coff_maxq20_reloc (bfd * abfd,
if (data && reloc_entry)
{
- howto = reloc_entry->howto;
addr = (unsigned char *) data + reloc_entry->address;
call_addr = call_addr - call_addr;
call_addr = get_symbol_value (symbol_in);
@@ -374,66 +372,39 @@ static reloc_howto_type howto_table[] =
EMPTY_HOWTO (10),
};
-/* Map BFD reloc types to MAXQ COFF reloc types. */
-
-typedef struct maxq_reloc_map
-{
- bfd_reloc_code_real_type bfd_reloc_val;
- unsigned int maxq_reloc_val;
- reloc_howto_type * table;
-}
-reloc_map;
-
-static const reloc_map maxq_reloc_map[] =
-{
- {BFD_RELOC_16_PCREL_S2, SHORT_JUMP, howto_table},
- {BFD_RELOC_16, LONG_JUMP, howto_table},
-};
-
static reloc_howto_type *
maxq_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED,
bfd_reloc_code_real_type code)
{
- unsigned int i;
-
- for (i = 0; i < ARRAY_SIZE (maxq_reloc_map); i++)
+ switch (code)
{
- const reloc_map *entry;
-
- entry = maxq_reloc_map + i;
-
- switch (code)
- {
- /* SHORT JUMP */
- case BFD_RELOC_16_PCREL_S2:
- return howto_table + 3;
-
- /* INTERSEGMENT JUMP */
- case BFD_RELOC_24:
- return howto_table + 4;
-
- /* BYTE RELOC */
- case BFD_RELOC_8:
- return howto_table + 7;
-
- /* WORD RELOC */
- case BFD_RELOC_16:
- return howto_table + 5;
-
- /* LONG RELOC */
- case BFD_RELOC_32:
- return howto_table + 2;
-
- /* LONG JUMP */
- case BFD_RELOC_14:
- return howto_table + 6;
-
- default:
- return NULL;
- }
+ /* SHORT JUMP */
+ case BFD_RELOC_16_PCREL_S2:
+ return howto_table + 3;
+
+ /* INTERSEGMENT JUMP */
+ case BFD_RELOC_24:
+ return howto_table + 4;
+
+ /* BYTE RELOC */
+ case BFD_RELOC_8:
+ return howto_table + 7;
+
+ /* WORD RELOC */
+ case BFD_RELOC_16:
+ return howto_table + 5;
+
+ /* LONG RELOC */
+ case BFD_RELOC_32:
+ return howto_table + 2;
+
+ /* LONG JUMP */
+ case BFD_RELOC_14:
+ return howto_table + 6;
+
+ default:
+ return NULL;
}
-
- return NULL;
}
#define coff_bfd_reloc_type_lookup maxq_reloc_type_lookup