This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ld manual and alignment
ali hagigat <hagigatali@gmail.com> writes:
> 3.6.3 Output Section Address
> The alignment requirement of the output section is the strictest
> alignment of any input section contained within the output section.
> --------------------------------------------------------
>
> I have copied part of GNU ld (linker) manual. I have two questions:
> 1) What "the strictest alignment of any input section" mean? The
> alignment of input sections are different?
> 2) My binutils package is:
> Name : binutils Relocations: (not relocatable)
> Version : 2.21.53.0.2 Vendor: Fedora Project
> Release : 1.fc17
> What is the alignment of the input sections?
When using an object file format like ELF, every input section in an
object file has a specified alignment. You can see it by, e.g., running
readelf -S and looking at the "Align" field. (I assume that is enough
to answer your question.)
Ian