This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GOLD ALIGN ISSUE


Takis Psarogiannakopoulos <takis@XFree86.Org> writes:

> This is a typical exe on some native system
>  objdymp -p ...
>
>  DYNAMIC off    0x000008e0 vaddr 0x080498e0 paddr 0x080498e0 align 2**0
>          filesz 0x000000c0 memsz 0x000000c0 flags rwx
>
> Now this is what gold does on newly created exe.
>
>  DYNAMIC off    0x00000830 vaddr 0x08049830 paddr 0x08049830 align 2**2
>          filesz 0x00000098 memsz 0x00000098 flags rw-
>
> I had asked before about that, and Ive been told I would get default 2**0.
> But i am getting 2**2. How we force 2**0 (Ian) ?

The alignment of the program segment is set based on the alignment of
the sections which are stored in the segment.  In this case since the
.dynamic section has an alignment of 2**2, the PT_DYNAMIC segment gets
an alignment of 2**2.  That seems entirely correct to me, and your
other linker seems wrong (although in practice it doesn't matter).

Is it really important to change this?

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]