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...


Hi, Ian

>
> > I changed the name of the original first .text section, then I got overlay
> > sections. But the "not enough room for program headers" problem is still
> > there.
>
> 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.

Thanks

Tao



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