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: The location counter and OVERLAY command in linker script


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

> Through some experiments, I think the problem is due to the linker
> doesn't update the location couter properly for OVERLAY command.
> According to the manual, "At the end of the overlay, the value of .
> is set to the start address of the overlay plus the size of the
> largest section." I don't understand why the location counter is
> plused by the size of largest section rather than the size of
> all the sections in OVERLAY.

Because we more or less expect that the overlay sections will use a
different LMA, via the > modifier.  Then the location counter '.' will
be the VMA, and the sections will actually be loaded elsewhere and
tracked by the memory region.

Ian


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