[PATCH 2/3] binutils: run objcopy set-section-alignment also for COFF
Jan Beulich
jbeulich@suse.com
Fri Mar 28 14:38:23 GMT 2025
There's no reason to limit this to just ELF. TI C30 and Z8k don't encode
section alignment in the section entries though (which can't be quite
right, or there would need to be another means by which to express
alignment needs), so --set-section-alignment simply has no effect there.
---
I'm somewhat puzzled by the first instance of coff_set_alignment_hook()
in bfd/coffcode.h: If COFF_DECODE_ALIGNMENT wasn't defined there, we'd
store an uninitialized variable. What's the point of the #ifdef then?
--- a/binutils/testsuite/binutils-all/set-section-alignment.d
+++ b/binutils/testsuite/binutils-all/set-section-alignment.d
@@ -2,8 +2,8 @@
#PROG: objcopy
#objcopy: --set-section-alignment .text=16
#objdump: --section-headers
-#target: [is_elf_format]
-#xfail: rx-*-*
+#target: [is_elf_format] || [is_coff_format]
+#xfail: rx-*-* *c30-*-* z8k-*-*
#...
.*\.text.*2\*\*4
More information about the Binutils
mailing list