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: fix memory regions with displaced BSS data


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


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