This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: How to set file alignment for some special sections?
"PRC" <panruochen@gmail.com> writes:
> How about those sections which won't be loaded into memory, like .shstrtab,
> the section for string table?
> I've try
> . = ALIGN(4);
> .shstrtab 0 : { *(.shstrtab) }
> in my linker script, but the output binary isn't affected.
Thre is no way to align the .shstrtab section. The .shstrtab section
is treated specially by the linker.
If there were a way, it would be to do this:
.shstrtab 0 : ALIGN(4) { *(.shstrtab) }
but I'm fairly sure that won't actually work.
Ian