0
votes

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.

1

1 Answers

0
votes

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);
}