Romanova, Katya
2014-Feb-25 19:13 UTC
[LLVMdev] question about the alignment of the .text section
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>
Joerg Sonnenberger
2014-Feb-25 20:02 UTC
[LLVMdev] question about the alignment of the .text section
On Tue, Feb 25, 2014 at 07:13:35PM +0000, Romanova, Katya wrote:> Is there a reason why the alignment of the .text section should be 4 > when we are optimizing for size (-Os or -Oz)?Which target architecture? Joerg
Katya Romanova
2014-Feb-26 22:56 UTC
[LLVMdev] question about the alignment of the .text section
Joerg Sonnenberger <joerg <at> britannica.bec.de> writes:> > On Tue, Feb 25, 2014 at 07:13:35PM +0000, Romanova, Katya wrote: > > Is there a reason why the alignment of the .text section should be 4 > > when we are optimizing for size (-Os or -Oz)? > > Which target architecture? > > JoergHi Joerg, x86_64 Linux. I see 4 byte alignment for .text section when the compiler is optimizing for size. Thanks! Katya.
Maybe Matching Threads
- UBSan runtime options
- exploring possibilities for unifying ThinLTO and FullLTO frontend + initial optimization pipeline
- [LLVMdev] Jump Theading/GVN bug - moving discussion to llvm-dev
- exploring possibilities for unifying ThinLTO and FullLTO frontend + initial optimization pipeline
- exploring possibilities for unifying ThinLTO and FullLTO frontend + initial optimization pipeline