From: nasm-bot f. C. G. <gor...@gm...> - 2017-03-25 22:12:28
|
Commit-ID: 8f1d6b0ed8f4d446eb02bcfe21b86537cd90570f Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=8f1d6b0ed8f4d446eb02bcfe21b86537cd90570f Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Sat, 18 Mar 2017 16:25:49 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sat, 18 Mar 2017 16:25:49 +0300 output: elf -- Use Elf64_Ehdr into section offset Same as we do in e_shoff. Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- output/outelf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output/outelf.c b/output/outelf.c index fce71a9..9932ff6 100644 --- a/output/outelf.c +++ b/output/outelf.c @@ -1679,7 +1679,7 @@ static void elf_write(void) * Now output the section header table. */ - elf_foffs = 0x40 + (is_elf64() ? sizeof(Elf64_Shdr): sizeof(Elf32_Shdr)) * nsections; + elf_foffs = sizeof(Elf64_Ehdr) + (is_elf64() ? sizeof(Elf64_Shdr): sizeof(Elf32_Shdr)) * nsections; align = ALIGN(elf_foffs, SEC_FILEALIGN) - elf_foffs; elf_foffs += align; elf_nsect = 0; |