diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2016-02-17 21:03:13 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2016-02-17 21:03:13 -0800 |
commit | e3e2f1bbc2c773a72a3230153c3e31f4a3bf1032 (patch) | |
tree | 5ce16ed82beedf442c6d4d91214eb6824dc1d32f | |
parent | 338656c1de8cace12c55c87ce40a7d909f18c2e9 (diff) | |
download | nasm-e3e2f1bbc2c773a72a3230153c3e31f4a3bf1032.tar.gz |
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 <hpa@linux.intel.com>
-rw-r--r-- | output/outelf64.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/output/outelf64.c b/output/outelf64.c index 829c6ff0..b5bec7b6 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, |