This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: fix memory regions with displaced BSS data
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Nathan Sidwell <nathan at codesourcery dot com>
- Cc: binutils <binutils at sources dot redhat dot com>
- Date: Fri, 22 May 2009 10:06:35 +0930
- Subject: Re: fix memory regions with displaced BSS data
- References: <4A13DC74.7090402@codesourcery.com>
On Wed, May 20, 2009 at 11:33:24AM +0100, Nathan Sidwell wrote:
> Ideally we'd do two checks, one on LMAs, for LOAD sections and one on
> VMAs skipping overlay sections. Unfortunately, AFAICT, we don't know at
> this point what sections are overlay sections -- that information is in
> the linker script statement tree, not the output section list.
Right.
> *** ld/ldlang.c 15 May 2009 14:22:35 -0000 1.308
> --- ld/ldlang.c 19 May 2009 15:46:38 -0000
> *************** lang_check_section_addresses (void)
> *** 4498,4504 ****
> for (s = link_info.output_bfd->sections; s != NULL; s = s->next)
> {
> /* Only consider loadable sections with real contents. */
> ! if (IGNORE_SECTION (s) || s->size == 0)
> continue;
>
> sections[count] = s;
> --- 4498,4504 ----
> for (s = link_info.output_bfd->sections; s != NULL; s = s->next)
> {
> /* Only consider loadable sections with real contents. */
> ! if ((s->flags & SEC_NEVER_LOAD) || !(s->flags & SEC_LOAD))
> continue;
>
> sections[count] = s;
Please leave the s->size == 0 test here. OK with that change.
--
Alan Modra
Australia Development Lab, IBM