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.
. 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);
}
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more