From: nasm-bot f. H. P. A. <hp...@li...> - 2016-02-18 05:06:28
|
Commit-ID: e3e2f1bbc2c773a72a3230153c3e31f4a3bf1032 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=e3e2f1bbc2c773a72a3230153c3e31f4a3bf1032 Author: H. Peter Anvin <hp...@li...> AuthorDate: Wed, 17 Feb 2016 21:03:13 -0800 Committer: H. Peter Anvin <hp...@li...> CommitDate: Wed, 17 Feb 2016 21:03:13 -0800 outelf64: symtabsection is defined but never set, change to sec_symtab The variable symtabsection is defined but it is never actually set and so was always zero. For both the 32-bit output format this is sec_symtab defined in elf.h. If this is not correct for the 64-bit format, then we should define sec_symtab as a variable instead of having a gratuitious format difference. Signed-off-by: H. Peter Anvin <hp...@li...> --- output/outelf64.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/output/outelf64.c b/output/outelf64.c index 829c6ff..b5bec7b 100644 --- a/output/outelf64.c +++ b/output/outelf64.c @@ -139,7 +139,6 @@ static int debug_immcall = 0; static struct linelist *stabslines = 0; static int numlinestabs = 0; static char *stabs_filename = 0; -static int symtabsection; static uint8_t *stabbuf = 0, *stabstrbuf = 0, *stabrelbuf = 0; static int stablen, stabstrlen, stabrellen; @@ -1116,7 +1115,7 @@ static void elf_write(void) /* link -> symtable info -> section to refer to */ elf_section_header(p - shstrtab, SHT_REL, 0, stabrelbuf, false, - stabrellen, symtabsection, sec_stab, 4, 16); + stabrellen, sec_symtab, sec_stab, 4, 16); p += strlen(p) + 1; } } else if (dfmt == &df_dwarf) { @@ -1131,7 +1130,7 @@ static void elf_write(void) p += strlen(p) + 1; elf_section_header(p - shstrtab, SHT_RELA, 0, arangesrelbuf, false, - arangesrellen, symtabsection, debug_aranges, 1, 24); + arangesrellen, sec_symtab, debug_aranges, 1, 24); p += strlen(p) + 1; elf_section_header(p - shstrtab, SHT_PROGBITS, 0, pubnamesbuf, false, @@ -1143,7 +1142,7 @@ static void elf_write(void) p += strlen(p) + 1; elf_section_header(p - shstrtab, SHT_RELA, 0, inforelbuf, false, - inforellen, symtabsection, debug_info, 1, 24); + inforellen, sec_symtab, debug_info, 1, 24); p += strlen(p) + 1; elf_section_header(p - shstrtab, SHT_PROGBITS, 0, abbrevbuf, false, @@ -1155,7 +1154,7 @@ static void elf_write(void) p += strlen(p) + 1; elf_section_header(p - shstrtab, SHT_RELA, 0, linerelbuf, false, - linerellen, symtabsection, debug_line, 1, 24); + linerellen, sec_symtab, debug_line, 1, 24); p += strlen(p) + 1; elf_section_header(p - shstrtab, SHT_PROGBITS, 0, framebuf, false, |