Question on using a linker script
Alan Modra
amodra@gmail.com
Wed Oct 27 21:48:02 GMT 2021
On Tue, Oct 26, 2021 at 05:43:29PM +0800, Iru Cai via Binutils wrote:
> So what's wrong with my linker script, or is this a bug for ld?
It is a bug, triggered by the way ld specially treats empty output
sections. An empty output section normally doesn't result in the
linker's current address or dot to change. So for example a highly
aligned section won't result in an alignment gap for itself and
following sections if it is empty. That resulted in the value of dot
not being set correctly inside your empty .ram section.
--
Alan Modra
Australia Development Lab, IBM
More information about the Binutils
mailing list