summaryrefslogtreecommitdiff
path: root/bfd/elf-hppa.h
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
commit386647e83e7be7945082909e34a40a49c9bc951f (patch)
treef07adfdea79da5f557a929bc145d4711173c1e2c /bfd/elf-hppa.h
parente705609055ff42f83dc081dad825f74ef6dcac1b (diff)
downloadbinutils-redhat-386647e83e7be7945082909e34a40a49c9bc951f.tar.gz
* 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.
Diffstat (limited to 'bfd/elf-hppa.h')
-rw-r--r--bfd/elf-hppa.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index cc72af64bf..1fe61e7d4e 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] == '$');
+}
+