How to split memory in linker script to get the lower address as start of .text?

Jeffi Edward.J j.jeffi@yahoo.co.in
Tue May 4 11:54:00 GMT 2010




Ian Lance Taylor-3 wrote:
> 
> "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
> 
> 

Yes Ian. Thats what I want. My image physical address should start at
0x8450020.
Thanks for the info. regarding .bss, .sbss section.

-- 
View this message in context: http://old.nabble.com/How-to-split-memory-in-linker-script-to-get-the-lower-address-as-start-of-.text--tp28251238p28446396.html
Sent from the gcc - Help mailing list archive at Nabble.com.



More information about the Gcc-help mailing list