PR24786, wrong LMA if first section in overlay is empty
authorAlan Modra <amodra@gmail.com>
Wed, 10 Jul 2019 14:05:18 +0000 (23:35 +0930)
committerAlan Modra <amodra@gmail.com>
Sat, 13 Jul 2019 00:27:50 +0000 (09:57 +0930)
commit7b2438015ca87297b2796c662182f796bb5358c2
tree41b7c77993f76651b6094c7bee583a874cad4069
parent0c951c25c6c7cfbf0f399d34277f73b0fdfc18cd
PR24786, wrong LMA if first section in overlay is empty

This stops the first overlay section being ignored when empty,
losing its LMA assignment

PR 24786
* ldlang.h (enum section_type): Add first_overlay_section.
* ldlang.c (lang_add_section): Adjust switch statement.
(map_input_to_output_sections): Likewise.
(lang_size_sections_1): Always set last_os for first overlay section.
(lang_leave_overlay): Set sectype to first_overlay_section.
ld/ChangeLog
ld/ldlang.c
ld/ldlang.h