]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
PE: don't corrupt section flags when linking from ELF objects
authorJan Beulich <jbeulich@novell.com>
Mon, 13 Nov 2017 11:26:12 +0000 (12:26 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 13 Nov 2017 11:26:12 +0000 (12:26 +0100)
commit5be87c8fa74c9ae6684bea571b4157ad1966d008
tree03ab623efa8dc04c95e82d4c6b05b9eb3ab346c4
parentb76bc5d54e36f15efd954898d9aa075c2bea02dd
PE: don't corrupt section flags when linking from ELF objects

Linking EFI executables from ELF object files can result in corrupted
COFF section flags if the section's alignment is too high. Issue a
diagnostic in that case, erroring out if this is not a final link, and
make sure only in-range values get written to the output image.

While doing this also make tic80 use the generic alignment macros
instead of custom #ifdef-ary.

No testsuite regressions for the range of COFF/PE targets that actually
cross-build in the first place on x86-64-linux.
bfd/ChangeLog
bfd/coff-tic80.c
bfd/coffcode.h
include/ChangeLog
include/coff/pe.h