This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Linker script section assignment issue
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at eliasoenal dot com
- Cc: binutils at sourceware dot org
- Date: Fri, 4 Apr 2014 10:47:07 +1030
- Subject: Re: Linker script section assignment issue
- Authentication-results: sourceware.org; auth=none
- References: <533DC42C dot 2010302 at eliasoenal dot com>
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