]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
elf: Add SHT_SUNW_ctf and SHT_SUNW_symnsort
authorH.J. Lu <hjl.tools@gmail.com>
Sat, 6 Dec 2025 02:17:39 +0000 (10:17 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 8 Dec 2025 07:19:12 +0000 (15:19 +0800)
On Solaris 11.4, there is SHT_SUNW_symnsort and no SHT_SUNW_symtabnsort.
SHT_SUNW_symnsort is defined to 0x6fffffec, which is the same as
SHT_SUNW_symtabnsort.  There is also SHT_SUNW_ctf.  Add SHT_SUNW_ctf and
rename SHT_SUNW_symtabnsort to SHT_SUNW_symnsort.  Move SHT_SUNW_phname
after SHT_SUNW_symnsort.

binutils/

* readelf.c (get_solaris_section_type): Add SHT_SUNW_ctf and
SHT_SUNW_symnsort.  Move SHT_SUNW_phname after SHT_SUNW_symnsort.
Remove SHT_SUNW_symtabnsort.

include/

* elf/common.h (SHT_SUNW_ctf): New.
(SHT_SUNW_symtabnsort): Renamed to ...
(SHT_SUNW_symnsort): This.
(SHT_SUNW_phname): Moved after SHT_SUNW_symnsort.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
binutils/readelf.c
include/elf/common.h

index 759c0367c7211175a57810fe010a7e81a01929bc..1bd9afa1ec1ebb11a201cb493d361a78ab86a936 100644 (file)
@@ -3082,12 +3082,14 @@ get_solaris_section_type (unsigned long type)
 {
   switch (type)
     {
-    case SHT_SUNW_symtabnsort:
-      return "SUNW_symtabnsort";
-    case SHT_SUNW_ancillary:
-      return "SUNW_ancillary";
+    case SHT_SUNW_ctf:
+      return "SUNW_ctf";
+    case SHT_SUNW_symnsort:
+      return "SUNW_symnsort";
     case SHT_SUNW_phname:
       return "SUNW_phname";
+    case SHT_SUNW_ancillary:
+      return "SUNW_ancillary";
     case SHT_SUNW_capchain:
       return "SUNW_capchain";
     case SHT_SUNW_capinfo:
index 2db8a7d5a476e0ee80fc1fd5cd704ae546334633..e280e17f3b7539838e80c43f2d1839f28cebb1cb 100644 (file)
 #define SHT_CHECKSUM                0x6ffffff8 /* Checksum for DSO content.  */
 #define SHT_GNU_OBJECT_ONLY         0x6ffffff9 /* Object only */
 
-#define SHT_SUNW_symtabnsort         0x6fffffec
-#define SHT_SUNW_ancillary           0x6fffffee
+#define SHT_SUNW_ctf                 0x6fffffeb
+#define SHT_SUNW_symnsort            0x6fffffec
 #define SHT_SUNW_phname              0x6fffffed
+#define SHT_SUNW_ancillary           0x6fffffee
 #define SHT_SUNW_capchain            0x6fffffef
 #define SHT_SUNW_capinfo             0x6ffffff0
 #define SHT_SUNW_symsort             0x6ffffff1