This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: How to split memory in linker script to get the lower address as start of .text?


"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


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