This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to split memory in linker script to get the lower address as start of .text?
- From: Ian Lance Taylor <iant at google dot com>
- To: "Jeffi Edward.J" <j dot jeffi at yahoo dot co dot in>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 03 May 2010 20:24:29 -0700
- Subject: Re: How to split memory in linker script to get the lower address as start of .text?
- References: <28251238.post@talk.nabble.com> <mcrtyrct1zx.fsf@dhcp-172-17-9-151.mtv.corp.google.com> <28378457.post@talk.nabble.com> <mcrbpd4wh72.fsf@dhcp-172-17-9-151.mtv.corp.google.com> <28384449.post@talk.nabble.com> <mcroch3vhb7.fsf@dhcp-172-17-9-151.mtv.corp.google.com> <28432036.post@talk.nabble.com>
"Jeffi Edward.J" <j.jeffi@yahoo.co.in> writes:
> Here is the output of reasdelf -l on my .out file.
>
> -----------
> Entry point 0x8450d60
> There are three program headers starting at offset 52
> Program Headers:
> Type Offset Virtaddr PhysAddr
> FileSiz MemSiz Flg Align
> LOAD 0x010010 0x8050010 0x8050010 0x0
> 0x17e70 RW 0x10000
> LOAD 0x007e80 0x8067e80 0x8450020 0xd40
> 0xd40 RW 0x10000
> LOAD 0x010d60 0x8450d60 0x8450d60 0x22524
> 0x22524 RWX 0x10000
Although the segments are not in order by PhysAddr, I see that the
PhysAddr field starts at 0x8450020 and goes up. Isn't that what you
want?
> I really wonder why .sbss, .bss section are considered as loadable section.
They aren't really. Note that for .sbss and .bss the FileSiz is 0 but
the MemSiz is 0x10010. That is allocating memory space but not
loading anything from the file.
Ian