bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/18452] ld allows overlapping sections


From: amodra at gmail dot com
Subject: [Bug ld/18452] ld allows overlapping sections
Date: Tue, 29 Mar 2016 00:12:39 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=18452

--- Comment #7 from Alan Modra <amodra at gmail dot com> ---
Since there seems to be enough interest in this bug for people to actually
write patches, here is what I think would work and be accepted:

In lang_size_sections_1, near the comment "A backwards move of dot", set a
static global var whenever seeing "dot < last->vma".  This should flag all
cases where overlays are used without false triggers.

Modify lang_check_section_addresses to check for vma overlap when no overlays
are detected.
- Use IGNORE_SECTION again to choose interesting sections (the attached patch
was wrong in treatment of .tbss)
- In the existing lma checking loop, ignore !SEC_LOAD sections.  Some rewriting
might be necessary to elegantly handle the case of the first section being
!SEC_LOAD.
- Write another loop to check vmas if overlays not present

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]