From: H.J. Lu Date: Sat, 6 Dec 2025 02:17:39 +0000 (+0800) Subject: elf: Add SHT_SUNW_ctf and SHT_SUNW_symnsort X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6ba94c86b14aee38b8dc7d0075da1607843b545;p=thirdparty%2Fbinutils-gdb.git elf: Add SHT_SUNW_ctf and SHT_SUNW_symnsort 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 --- diff --git a/binutils/readelf.c b/binutils/readelf.c index 759c0367c72..1bd9afa1ec1 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -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: diff --git a/include/elf/common.h b/include/elf/common.h index 2db8a7d5a47..e280e17f3b7 100644 --- a/include/elf/common.h +++ b/include/elf/common.h @@ -575,9 +575,10 @@ #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