aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-hppa.h
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1999-08-11 09:30:20 +0000
committerJeff Law <law@redhat.com>1999-08-11 09:30:20 +0000
commit052e120f447791e4134c8939c8a152a5db6f26cb (patch)
tree861970113d3c5d7cd110d629e1b1f424a855a5a6 /bfd/elf-hppa.h
parent0811443ae790187cc4efcebc9c1eca1295edc9e0 (diff)
downloadgdb-052e120f447791e4134c8939c8a152a5db6f26cb.zip
gdb-052e120f447791e4134c8939c8a152a5db6f26cb.tar.gz
gdb-052e120f447791e4134c8939c8a152a5db6f26cb.tar.bz2
* elf-hppa.h (elf_hppa_fake_sections): New function.
* elf32-hppa.c (elf_backend_fake_sections): Define.
Diffstat (limited to 'bfd/elf-hppa.h')
-rw-r--r--bfd/elf-hppa.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h
index b046844..67bc319 100644
--- a/bfd/elf-hppa.h
+++ b/bfd/elf-hppa.h
@@ -621,3 +621,33 @@ elf_hppa_is_local_label_name (abfd, name)
return (name[0] == 'L' && name[1] == '$');
}
+/* Set the correct type for an ELF section. We do this by the
+ section name, which is a hack, but ought to work. */
+
+static boolean
+elf_hppa_fake_sections (abfd, hdr, sec)
+ bfd *abfd;
+ Elf64_Internal_Shdr *hdr;
+ asection *sec;
+{
+ register const char *name;
+
+ name = bfd_get_section_name (abfd, sec);
+
+ if (strcmp (name, ".PARISC.unwind") == 0)
+ {
+ section *sec;
+ hdr->sh_type = SHT_LOPROC + 1;
+ /* ?!? How are unwinds supposed to work for symbols in arbitrary
+ sections? Or what if we have multiple .text sections in a single
+ .o file? HP really messed up on this one. */
+ sec = bfd_get_section_by_name (abfd, ".text");
+ if (sec != NULL)
+ hdr->sh_info = elf_section_data (sec)->this_idx;
+
+ /* I have no idea if this is really necessary or what it means. */
+ hdr->sh_entsize = 4;
+ }
+ return true;
+}
+