diff options
| author | 2025-10-10 22:41:22 +0200 | |
|---|---|---|
| committer | 2025-10-10 22:41:22 +0200 | |
| commit | a3f6c3b0b923eeebb3d37697006b1bb80140cfad (patch) | |
| tree | bf69ac015929b236978320a4d4e272f59c0f00cd | |
| parent | 518ecb2a5d57f6d3282a10a988de61c3c9055799 (diff) | |
elf: use SHN_ABS for file symbol
| -rw-r--r-- | elf.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -55,7 +55,7 @@ elfinit(void) hdr.h32.shentsize = sizeof(struct elf32shdr); } vpush(&symtab, ((struct sym) { 0 })); - vpush(&symtab, ((struct sym) { .type = STT_FILE })); + vpush(&symtab, ((struct sym) { .type = STT_FILE, .shndx = SHN_ABS })); } uint @@ -320,7 +320,7 @@ putreloc(struct wbuf *out, const struct reloc *rel, bool userela) /* ensure .symtab entries are ordered like this: * (0. zero entry: NOTYPE LOCAL UND) - * (1. file: FILE LOCAL UND "...") + * (1. file: FILE LOCAL ABS "...") * 2. locals * 3. defined globals * 4. undefined globals |