summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2006-07-20 16:46:29 +0000
committerThiemo Seufer <ths@networkno.de>2006-07-20 16:46:29 +0000
commit1715070cd4c75f8ecd2c85d35f31958020f75617 (patch)
tree06d876e7970160eb4aa8731c35ee4378ac2fb579 /bfd
parent3365607474362dbe25ad9291d6428047948573a3 (diff)
downloadgdb-1715070cd4c75f8ecd2c85d35f31958020f75617.tar.gz
[ bfd/ChangeLog ]
* elf32-mips.c (mips16_jump_reloc): Remove function. (elf_mips16_howto_table_rel): Use _bfd_mips_elf_generic_reloc instead of mips16_jump_reloc. * elf64_mips.c, wlfn32-mips.c (mips16_jump_reloc): Remove function. (elf_mips16_howto_table_rel, elf_mips16_howto_table_rela): Use _bfd_mips_elf_generic_reloc instead of mips16_jump_reloc. [ gas/ChangeLog ] * config/tc-mips.c (mips_fix_adjustable): Handle BFD_RELOC_MIPS16_JMP. (tc_gen_reloc): Handle mips16 jumps to section symbol offsets. [ ld/testsuite/ChangeLog ] * ld-mips-elf/mips16-call-global-1.s, ld-mips-elf/mips16-call-global-2.s, ld-mips-elf/mips16-call-global-3.s, ld-mips-elf/mips16-call-global.d: Test linking of external mips16 jumps. * ld-mips-elf/mips-elf.exp: Run new test.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog9
-rw-r--r--bfd/elf32-mips.c34
-rw-r--r--bfd/elf64-mips.c37
-rw-r--r--bfd/elfn32-mips.c28
4 files changed, 14 insertions, 94 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 55e6b543de4..2482506ac67 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,12 @@
+2006-07-20 Thiemo Seufer <ths@mips.com>
+
+ * elf32-mips.c (mips16_jump_reloc): Remove function.
+ (elf_mips16_howto_table_rel): Use _bfd_mips_elf_generic_reloc
+ instead of mips16_jump_reloc.
+ * elf64_mips.c, wlfn32-mips.c (mips16_jump_reloc): Remove function.
+ (elf_mips16_howto_table_rel, elf_mips16_howto_table_rela): Use
+ _bfd_mips_elf_generic_reloc instead of mips16_jump_reloc.
+
2006-07-19 Alan Modra <amodra@bigpond.net.au>
* bfd-in.h (enum notice_asneeded_action): Define.
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 5745df5b94c..e86d95523c9 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -68,8 +68,6 @@ static bfd_boolean mips_elf32_object_p
(bfd *);
static bfd_boolean mips_elf_is_local_label_name
(bfd *, const char *);
-static bfd_reloc_status_type mips16_jump_reloc
- (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type mips16_gprel_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type mips_elf_final_gp
@@ -734,7 +732,7 @@ static reloc_howto_type elf_mips16_howto_table_rel[] =
/* This needs complex overflow
detection, because the upper four
bits must match the PC. */
- mips16_jump_reloc, /* special_function */
+ _bfd_mips_elf_generic_reloc, /* special_function */
"R_MIPS16_26", /* name */
TRUE, /* partial_inplace */
0x3ffffff, /* src_mask */
@@ -1112,36 +1110,6 @@ mips32_64bit_reloc (bfd *abfd, arelent *reloc_entry,
return r;
}
-/* Handle a mips16 jump. */
-
-static bfd_reloc_status_type
-mips16_jump_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
- asymbol *symbol, void *data ATTRIBUTE_UNUSED,
- asection *input_section, bfd *output_bfd,
- char **error_message ATTRIBUTE_UNUSED)
-{
- if (output_bfd != NULL
- && (symbol->flags & BSF_SECTION_SYM) == 0
- && reloc_entry->addend == 0)
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- /* FIXME. */
- {
- static bfd_boolean warned;
-
- if (! warned)
- (*_bfd_error_handler)
- (_("Linking mips16 objects into %s format is not supported"),
- bfd_get_target (input_section->output_section->owner));
- warned = TRUE;
- }
-
- return bfd_reloc_undefined;
-}
-
/* Handle a mips16 GP relative reloc. */
static bfd_reloc_status_type
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index ee5bce6619c..aa33cf7d6cc 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -112,8 +112,6 @@ static bfd_reloc_status_type mips_elf64_gprel32_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type mips_elf64_shift6_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
-static bfd_reloc_status_type mips16_jump_reloc
- (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type mips16_gprel_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_boolean mips_elf64_assign_gp
@@ -1438,7 +1436,7 @@ static reloc_howto_type mips16_elf64_howto_table_rel[] =
/* This needs complex overflow
detection, because the upper four
bits must match the PC. */
- mips16_jump_reloc, /* special_function */
+ _bfd_mips_elf_generic_reloc, /* special_function */
"R_MIPS16_26", /* name */
TRUE, /* partial_inplace */
0x3ffffff, /* src_mask */
@@ -1510,7 +1508,7 @@ static reloc_howto_type mips16_elf64_howto_table_rela[] =
/* This needs complex overflow
detection, because the upper four
bits must match the PC. */
- mips16_jump_reloc, /* special_function */
+ _bfd_mips_elf_generic_reloc, /* special_function */
"R_MIPS16_26", /* name */
FALSE, /* partial_inplace */
0x3ffffff, /* src_mask */
@@ -2044,37 +2042,6 @@ mips_elf64_shift6_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
error_message);
}
-/* Handle a mips16 jump. */
-
-static bfd_reloc_status_type
-mips16_jump_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry,
- asymbol *symbol, void *data ATTRIBUTE_UNUSED,
- asection *input_section, bfd *output_bfd,
- char **error_message ATTRIBUTE_UNUSED)
-{
- if (output_bfd != NULL
- && (symbol->flags & BSF_SECTION_SYM) == 0
- && (! reloc_entry->howto->partial_inplace
- || reloc_entry->addend == 0))
- {
- reloc_entry->address += input_section->output_offset;
- return bfd_reloc_ok;
- }
-
- /* FIXME. */
- {
- static bfd_boolean warned;
-
- if (! warned)
- (*_bfd_error_handler)
- (_("Linking mips16 objects into %s format is not supported"),
- bfd_get_target (input_section->output_section->owner));
- warned = TRUE;
- }
-
- return bfd_reloc_undefined;
-}
-
/* Handle a mips16 GP relative reloc. */
static bfd_reloc_status_type
diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c
index 367bcf33fff..275e83cdc11 100644
--- a/bfd/elfn32-mips.c
+++ b/bfd/elfn32-mips.c
@@ -61,8 +61,6 @@ static bfd_reloc_status_type gprel32_with_gp
(bfd *, asymbol *, arelent *, asection *, bfd_boolean, void *, bfd_vma);
static bfd_reloc_status_type mips_elf_shift6_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
-static bfd_reloc_status_type mips16_jump_reloc
- (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_reloc_status_type mips16_gprel_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
@@ -1444,7 +1442,7 @@ static reloc_howto_type elf_mips16_howto_table_rel[] =
/* This needs complex overflow
detection, because the upper four
bits must match the PC. */
- mips16_jump_reloc, /* special_function */
+ _bfd_mips_elf_generic_reloc, /* special_function */
"R_MIPS16_26", /* name */
TRUE, /* partial_inplace */
0x3ffffff, /* src_mask */
@@ -1516,7 +1514,7 @@ static reloc_howto_type elf_mips16_howto_table_rela[] =
/* This needs complex overflow
detection, because the upper four
bits must match the PC. */
- mips16_jump_reloc, /* special_function */
+ _bfd_mips_elf_generic_reloc, /* special_function */
"R_MIPS16_26", /* name */
FALSE, /* partial_inplace */
0x3ffffff, /* src_mask */
@@ -1901,28 +1899,6 @@ mips_elf_shift6_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
error_message);
}
-/* Handle a mips16 jump. */
-
-static bfd_reloc_status_type
-mips16_jump_reloc (bfd *abfd ATTRIBUTE_UNUSED,
- arelent *reloc_entry ATTRIBUTE_UNUSED,
- asymbol *symbol ATTRIBUTE_UNUSED,
- void *data ATTRIBUTE_UNUSED,
- asection *input_section, bfd *output_bfd ATTRIBUTE_UNUSED,
- char **error_message ATTRIBUTE_UNUSED)
-{
- static bfd_boolean warned = FALSE;
-
- /* FIXME. */
- if (! warned)
- (*_bfd_error_handler)
- (_("Linking mips16 objects into %s format is not supported"),
- bfd_get_target (input_section->output_section->owner));
- warned = TRUE;
-
- return bfd_reloc_undefined;
-}
-
/* Handle a mips16 GP relative reloc. */
static bfd_reloc_status_type