aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1999-08-09 23:47:04 +0000
committerJeff Law <law@redhat.com>1999-08-09 23:47:04 +0000
commit432bdd91dd7b499ebddc26f473f95d0c14316216 (patch)
tree4e7c9feb71df11495c26d146c244303eace3f082
parentb944b044fb3664008f20a3f5434325437ed99a93 (diff)
downloadgdb-432bdd91dd7b499ebddc26f473f95d0c14316216.zip
gdb-432bdd91dd7b499ebddc26f473f95d0c14316216.tar.gz
gdb-432bdd91dd7b499ebddc26f473f95d0c14316216.tar.bz2
* elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case 32): When in
64bit mode, generate a section relative relocation for a 32bit wide relocation. (elf_hppa_is_local_label_name): New function. * elf32-hppa.c (elf_hppa_is_local_label_name): Deleted. To be shared between 32bit and 64bit port.
-rw-r--r--bfd/ChangeLog9
-rw-r--r--bfd/elf-hppa.h16
-rw-r--r--bfd/elf32-hppa.c14
3 files changed, 26 insertions, 13 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9be218b..0020612 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,12 @@
+Mon Aug 9 17:37:30 1999 Jeffrey A Law (law@cygnus.com)
+
+ * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case 32): When in
+ 64bit mode, generate a section relative relocation for a 32bit
+ wide relocation.
+ (elf_hppa_is_local_label_name): New function.
+ * elf32-hppa.c (elf_hppa_is_local_label_name): Deleted. To be
+ shared between 32bit and 64bit port.
+
1999-08-09 Mark Mitchell <mark@codesourcery.com>
* elf32-mips.c (elf_mips_howto_table): Fix src_mask for
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index cc72af6..1fe61e7 100644
--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -404,6 +404,11 @@ _bfd_elf_hppa_gen_reloc_type (abfd, base_type, format, field, ignore, sym)
{
case e_fsel:
final_type = R_PARISC_DIR32;
+ /* When in 64bit mode, a 32bit relocation is supposed to
+ be a section relative relocation. Dwarf2 (for example)
+ uses 32bit section relative relocations. */
+ if (bfd_get_arch_info (abfd)->bits_per_address != 32)
+ final_type = R_PARISC_SECREL32;
break;
case e_psel:
final_type = R_PARISC_PLABEL32;
@@ -604,3 +609,14 @@ elf_hppa_final_write_processing (abfd, linker)
}
}
+
+/* Return true if SYM represents a local label symbol. */
+
+static boolean
+elf_hppa_is_local_label_name (abfd, name)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ const char *name;
+{
+ return (name[0] == 'L' && name[1] == '$');
+}
+
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 1813b98..5f4935e 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -114,8 +114,6 @@ static unsigned long hppa_elf_relocate_insn
PARAMS ((bfd *, asection *, unsigned long, unsigned long, long,
long, unsigned long, unsigned long, unsigned long));
-static boolean hppa_elf_is_local_label_name PARAMS ((bfd *, const char *));
-
static boolean elf32_hppa_add_symbol_hook
PARAMS ((bfd *, struct bfd_link_info *, const Elf_Internal_Sym *,
const char **, flagword *, asection **, bfd_vma *));
@@ -792,16 +790,6 @@ do_basic_type_1:
return (bfd_reloc_ok);
}
-/* Return true if SYM represents a local label symbol. */
-
-static boolean
-hppa_elf_is_local_label_name (abfd, name)
- bfd *abfd ATTRIBUTE_UNUSED;
- const char *name;
-{
- return (name[0] == 'L' && name[1] == '$');
-}
-
/* Undo the generic ELF code's subtraction of section->vma from the
value of each external symbol. */
@@ -1320,7 +1308,7 @@ error_return:
/* Misc BFD support code. */
#define bfd_elf32_bfd_reloc_type_lookup elf_hppa_reloc_type_lookup
-#define bfd_elf32_bfd_is_local_label_name hppa_elf_is_local_label_name
+#define bfd_elf32_bfd_is_local_label_name elf_hppa_is_lcoal_label_name
#define elf_info_to_howto elf_hppa_info_to_howto
#define elf_info_to_howto_rel elf_hppa_info_to_howto_rel