This is the mail archive of the binutils@sources.redhat.com 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: Need help on OVERLAY command in linker script...


Tao Zhang <zhangtao@cc.gatech.edu> writes:

> > Does it help to link with the -n or -N options?
> >
> 
> Your suggestion helps. I found my linker will try to align the sections at
> a 2^7 boundary in the program binary, though the memory alignment of the
> sections is 2^6. So that means maybe the load address of a section is
> 0x1040, but in the program binary, the offset of it is 0x1080. Using -n
> will prevent the alignment in binary. But according to the manual, -n
> turns off page alignment of sections, I don't know what "page" it is
> referring to. A memory page? It is certainly not 2^7 in my RH8 X86 system.

Each linker target has a page size which affects the linker script.
On x86 GNU/Linux I believe this page size is 0x1000.

The -n option really just changes the linker script.  Use --verbose to
the new linker script.

Ian


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