output: elf64 -- increase .symtab and .rel* alignment to 8
commit1f0cb0f2c1ba632c0fab02424928cfb756a9160c
authorEd Maste <emaste@freebsd.org>
Wed, 15 Apr 2015 21:59:52 +0000 (16 00:59 +0300)
committerCyrill Gorcunov <gorcunov@gmail.com>
Wed, 15 Apr 2015 22:02:55 +0000 (16 01:02 +0300)
treed092b9a806c3142bdd1e56a9ea24ddeeabf2500f
parent8fa0fe16408afc76ce1ae4387e1a9d46893cfda6
output: elf64 -- increase .symtab and .rel* alignment to 8

Discovered while working on ELF Tool Chain elfcopy (strip),
which originally crashed on an assert while processing
a nasm-generated ELF object.

The .symtab and .rela.text sections report 4 byte alignment,
but require 8.

As an aside, see https://sourceforge.net/p/elftoolchain/tickets/485/ for a
discussion of the ELF Tool Chain issue that this bug exposed.

With my WIP elfcopy change and nasm-assembled jccolss2-64.o from libjpeg-turbo:

% strip -o /dev/null --strip-debug jccolss2-64.o
strip: section .symtab alignment 4 increased to 8
strip: section .rela.text alignment 4 increased to 8

http://bugzilla.nasm.us/show_bug.cgi?id=3392307

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
output/outelf64.c