diff options
author | Helge Deller <deller@gmx.de> | 2018-08-22 10:32:53 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2018-08-22 10:32:53 +0100 |
commit | 6f4286c4f7193606fd6200e46b152ff0934f9cc2 (patch) | |
tree | 20f727e200ce6fd754e02ac8ea58091ee67232d1 /bfd/elf-hppa.h | |
parent | 3da64fe404031c093e8b59565d935fed214e28c1 (diff) | |
download | gdb-6f4286c4f7193606fd6200e46b152ff0934f9cc2.zip gdb-6f4286c4f7193606fd6200e46b152ff0934f9cc2.tar.gz gdb-6f4286c4f7193606fd6200e46b152ff0934f9cc2.tar.bz2 |
Use the correct constants when setting the section type of HPPA unwind sections.
* elf-hppa.h (elf_hppa_fake_sections): Use SHT_PARISC_UNWIND as
the section type of the .PARISC.unwind section on 64-bit binaries
and SHT_PROGBITS for 32-bit binaries. Add a comment about it.
Add comment about the sh_entsize value.
Diffstat (limited to 'bfd/elf-hppa.h')
-rw-r--r-- | bfd/elf-hppa.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h index 9f34a03..3b72140 100644 --- a/bfd/elf-hppa.h +++ b/bfd/elf-hppa.h @@ -889,9 +889,11 @@ elf_hppa_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec) asection *asec; #if ARCH_SIZE == 64 - hdr->sh_type = SHT_LOPROC + 1; + hdr->sh_type = SHT_PARISC_UNWIND; #else - hdr->sh_type = 1; + /* Note - it is not clear why this is not SHT_PARISC_UNWIND as well. + Presumably it is a historical constraint, so leave it as it is. */ + hdr->sh_type = SHT_PROGBITS; #endif /* ?!? How are unwinds supposed to work for symbols in arbitrary sections? Or what if we have multiple .text sections in a single @@ -912,7 +914,10 @@ elf_hppa_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec) } } - /* I have no idea if this is really necessary or what it means. */ + /* The unwind table entries are 16 bytes long, so it is not clear + why this field is set to 4. (The ELF spec says that the sh_entsize + field is a byte quantity, but this is a processor specific section, + so it is allowed to change the rules). Leave as it is for now. */ hdr->sh_entsize = 4; } return TRUE; |