[LLVMdev] question about the alignment of the .text section
Romanova, Katya
Katya_Romanova at playstation.sony.com
Tue Feb 25 11:13:35 PST 2014
Is there a reason why the alignment of the .text section should be 4 when we are optimizing for size (-Os or -Oz)? Note that when are optimizing for size, the symbols inside .text section don't have any alignment constraints. Alignment=4 for .text with the unaligned symbols inside this section prevent our linker from de-duplicating functions. Could the alignment of the .text section be changed to 1? Could it cause any potential problems (correctness/performance)?
clang -c -Os test.cpp -o test.o
readelf -S test.o
[ 1] .text PROGBITS 0000000000000000 00000040
0000000000000052 0000000000000000 AX 0 0 4
Thanks!
Katya.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140225/ab78d948/attachment.html>
More information about the llvm-dev
mailing list