This is the mail archive of the binutils@sourceware.org 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: Linker script section assignment issue


On Thu, Apr 03, 2014 at 10:27:24PM +0200, binutils@eliasoenal.com wrote:
> >Program Headers:
> >  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz Flg Align
> >  LOAD           0x008000 0x08010000 0x08010000 0x00000 0x00200 RW  0x8000
> >  LOAD           0x000200 0x08010200 0x08010200 0x24ca8 0x24ca8 R E 0x8000
> >  LOAD           0x028000 0x10000000 0x08034ea8 0x002c8 0x012b4 RW  0x8000
> >
> > Section to Segment mapping:
> >  Segment Sections...
> >   00     .header
> >   01     .isr_vector .text .rodata
> >   02     .data .bss

.header goes into a separate program header because it is a bss style
section.  You can't combine that first header with the second because
a PT_LOAD header always has file contents (if any) followed by bss
area (if any).  When you emit some data to .header it no longer is a
bss style section, even if the data was zeros.

-- 
Alan Modra
Australia Development Lab, IBM


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