Change regcache list to be an hash map
[deliverable/binutils-gdb.git] / bfd / elf-hppa.h
index 9f34a030cc8c0ca292bc57addeab43426ee105ca..7875e63ff7287f926ad9b406eba039c6f4d36812 100644 (file)
@@ -1,5 +1,5 @@
 /* Common code for PA ELF implementations.
-   Copyright (C) 1999-2018 Free Software Foundation, Inc.
+   Copyright (C) 1999-2020 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -881,7 +881,7 @@ elf_hppa_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec)
 {
   const char *name;
 
-  name = bfd_get_section_name (abfd, sec);
+  name = bfd_section_name (sec);
 
   if (strcmp (name, ".PARISC.unwind") == 0)
     {
@@ -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,15 +914,17 @@ 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;
 }
 
-static void
-elf_hppa_final_write_processing (bfd *abfd,
-                                bfd_boolean linker ATTRIBUTE_UNUSED)
+static bfd_boolean
+elf_hppa_final_write_processing (bfd *abfd)
 {
   int mach = bfd_get_mach (abfd);
 
@@ -943,6 +947,7 @@ elf_hppa_final_write_processing (bfd *abfd,
                                         a step backwards with the ELF
                                         based toolchains.  */
                                      | EF_PARISC_TRAPNIL);
+  return _bfd_elf_final_write_processing (abfd);
 }
 
 /* Comparison function for qsort to sort unwind section during a
This page took 0.024576 seconds and 4 git commands to generate.