Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
One can use the ALIGN and SUBALIGN directives to align sections within a linker script for an ELF. However, is it possible to pad a section to a particular alignment, so the size of the section in the ELF is correct? Thanks in advance.
On second thought:
. actually refers to the byte offset from the start of the current containing object.
So, this would work just fine:
.text : { ./crt.o(.text) . = ALIGN(16); }
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.