From: Robert Pengelly Date: Tue, 4 Nov 2025 12:10:46 +0000 (+0000) Subject: Make sure reloc is always set X-Git-Url: https://git.candlhat.org/?a=commitdiff_plain;h=b1268cfc3aef0e91fe5074b9e363d2908c4584cb;p=slink.git Make sure reloc is always set --- diff --git a/elf.c b/elf.c index c050e4c..5773355 100644 --- a/elf.c +++ b/elf.c @@ -51,7 +51,7 @@ static void translate_relocation (const char *filename, struct reloc_entry *relo case R_386_NONE: - break; + goto bad; case R_386_32: @@ -118,7 +118,7 @@ static void translate_relocation64_addend (const char *filename, struct reloc_en case R_AMD64_NONE: - break; + goto bad; case R_AMD64_64: @@ -1422,7 +1422,7 @@ void elf32_write (const char *filename) { struct section *section; uint16_t e_phnum = 0, e_shnum = 1; - + uint64_t shstrtab_size, shstrtab_start_i = 0; if (!(fp = fopen (filename, "wb"))) {