PR18452, ld allows overlapping sections
authorAlan Modra <amodra@gmail.com>
Wed, 30 Mar 2016 07:05:14 +0000 (17:35 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 30 Mar 2016 07:20:03 +0000 (17:50 +1030)
commita87dd97a2098b7e18ff2574a4e81ae521ef7e6f2
tree7de7b1e3c838657894badf93aecbe54c264fcc63
parentca62bc4a869267105a4b492223ed46d59e04c27c
PR18452, ld allows overlapping sections

PR 18452
* ldlang.c (maybe_overlays): New static var.
(lang_size_sections_1): Set it here.
(struct check_sec): New.
(sort_sections_by_lma): Adjust for array of structs.
(sort_sections_by_vma): New function.
(lang_check_section_addresses): Check both LMA and VMA for overlap.
* testsuite/ld-scripts/rgn-over7.d: Adjust.
ld/ChangeLog
ld/ldlang.c
ld/testsuite/ld-scripts/rgn-over7.d