This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: ALIGN directive showing different behavior than documented
- From: Alan Modra <amodra at gmail dot com>
- To: Sandra Loosemore <sandra at codesourcery dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Sat, 1 Aug 2015 17:11:21 +0930
- Subject: Re: ALIGN directive showing different behavior than documented
- Authentication-results: sourceware.org; auth=none
- References: <55BBE88A dot 5080802 at codesourcery dot com>
On Fri, Jul 31, 2015 at 03:28:42PM -0600, Sandra Loosemore wrote:
> For the test program, nothing is being allocated to these sections. Without
> the patch, the map file shows:
>
> .cs3.internalram
> 0x1ffc0000 0x0 load address 0xa00003b8
> 0x1ffc0000 __cs3_region_start_internalram = .
> *(.cs3.region-head.internalram)
> *(.internalram)
> 0x1ffc0000 . = ALIGN (0x8)
>
> .cs3.internalram.bss
> 0x1ffc0000 0x0 load address 0xa00003b8
> *(.internalram.b .bss.internalram)
> 0x1ffc0000 . = ALIGN (0x8)
>
> 0x00000000 __cs3_region_init_size_internalram = (LOADADDR
> (.cs3.internalram.bss) - LOADADDR (.cs3.internalram))
>
> And with the patch, we get:
>
> .cs3.internalram
> 0x1ffc0000 0x0 load address 0xa00003c0
> 0x1ffc0000 __cs3_region_start_internalram = .
> *(.cs3.region-head.internalram)
> *(.internalram)
> 0x1ffc0000 . = ALIGN (0x8)
>
> .cs3.internalram.bss
> 0x1ffc0000 0x0 load address 0xa00003bc
> *(.internalram.b .bss.internalram)
> 0x1ffc0000 . = ALIGN (0x8)
>
>
> 0xfffffffc __cs3_region_init_size_internalram = (LOADADDR
> (.cs3.internalram.bss) - LOADADDR (.cs3.internalram))
The change in ALIGN behaviour only affected those ". = ALIGN (8)"
statements, not the align on the section here:
.cs3.internalram : ALIGN (8)
Yet the LMA for .cs3.internalram has changed. This indicates to me
that something before the snippet you posted caused the problem.
I'm not sure how the LMA is going backwards. Even if
.cs3.internalram.bss was stripped from the output, it still should
have its LMA updated on each phase of lang_size_sections. Can you
post a complete testcase?
--
Alan Modra
Australia Development Lab, IBM