From 5be87c8fa74c9ae6684bea571b4157ad1966d008 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Mon, 13 Nov 2017 12:26:12 +0100 Subject: 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 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bfd/ChangeLog') diff --git a/bfd/ChangeLog b/bfd/ChangeLog index d1b995a..70d4e56 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,11 @@ +2017-11-13 Jan Beulich + + * coff-tic80.c (COFF_ENCODE_ALIGNMENT, COFF_DECODE_ALIGNMENT): + Define. + * coffcode.h (coff_set_alignment_hook): Drop tic80 special case. + (coff_write_object_contents): Likewise. Issue diagnostic for too + large alignment. + 2017-11-12 H.J. Lu PR ld/22423 -- cgit v1.1