elf.h: add some missing macros

ElfW(x): to automatically use the relevant Elf32 or Elf64 type for the
current system

NT_GNU_BUILD_ID: constant defining the GNU "build ID" note in ELF files.

WebKit uses both of these to store info in javascript object caches, so
it can detect if the same version of WebKit is being used and the cache
can safely be reused, or if it should be reconstructed.

Change-Id: Ia9eccc1acc79ac4982b87609d2815c4a611e4176
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9143
Reviewed-by: nephele nephele <[email protected]>
This commit is contained in:
PulkoMandy
2025-03-23 10:29:23 +00:00
committed by Adrien Destugues
parent ade0f7d831
commit eb853f8901
+4
View File
@@ -33,10 +33,12 @@ typedef Elf64_Half Elf64_Versym;
#define Elf_Addr Elf32_Addr
#define Elf_Phdr Elf32_Phdr
#define Elf_Half Elf32_Half
#define ElfW(x) Elf32_ ## x
#elif B_HAIKU_64_BIT
#define Elf_Addr Elf64_Addr
#define Elf_Phdr Elf64_Phdr
#define Elf_Half Elf64_Half
#define ElfW(x) Elf64_ ## x
#endif
@@ -708,6 +710,8 @@ typedef struct {
#define NT_THREADS 0x74687264 /* threads */
#define NT_SYMBOLS 0x73796d73 /* symbols */
#define NT_GNU_BUILD_ID 3
/* NT_TEAM: uint32 entrySize; Elf32_Note_Team; char[] args */
typedef struct {
int32 nt_id; /* team ID */