[PATCH] D38846: [ELF] - Linkerscript: fix issue with SUBALIGN.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 20 11:33:37 PDT 2017


jhenderson added a comment.

As you are adding checkAlignment for the ALIGN directive as well, you should add tests to cover that case for non-power-of-two and zero values.



================
Comment at: test/ELF/linkerscript/subalign.s:26
+## Test we do not fail when dot(.) is used inside SUBALIGN. That is not
+## consistent with ld.bfd.
+# RUN: echo "SECTIONS { . = 0x32; .aaa : SUBALIGN(.) { *(.aaa*) } }" > %t3.script
----------------
Could you comment here what we expect the behaviour to be in this case (apart from no error), please. For example, is the SUBALIGN value a) undefined, so may change, or b) always zero (effectively 1)? If it's undefined, I'm not sure we need the objdump check, since we may decide to change the behaviour later to something else, if it becomes more convenient.


https://reviews.llvm.org/D38846





More information about the llvm-commits mailing list