diff options
author | Alan Modra <amodra@gmail.com> | 2020-07-29 17:30:15 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-07-29 17:38:01 +0930 |
commit | 5987401fcbc9933808fa0d84d1b01c93356c39a1 (patch) | |
tree | b57997323255d16f8694e1b30566fe043e913a53 | |
parent | 8ba83e9109a1a02f54f1c4793c8f231bb9256acd (diff) | |
download | gdb-5987401fcbc9933808fa0d84d1b01c93356c39a1.zip gdb-5987401fcbc9933808fa0d84d1b01c93356c39a1.tar.gz gdb-5987401fcbc9933808fa0d84d1b01c93356c39a1.tar.bz2 |
Don't assert at ldwrite.c:212
When excluding SHF_LINK_ORDER sections that happen to have SEC_KEEP
set, we need to set SEC_EXCLUDE here to avoid a problem later.
* ldelf.c (ldelf_before_place_orphans): Set SEC_EXCLUDE for
discarded sections.
-rw-r--r-- | ld/ChangeLog | 5 | ||||
-rw-r--r-- | ld/ldelf.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index 9cee3ca..5ee1a0e 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2020-07-29 Alan Modra <amodra@gmail.com> + + * ldelf.c (ldelf_before_place_orphans): Set SEC_EXCLUDE for + discarded sections. + 2020-07-28 Alan Modra <amodra@gmail.com> * ldlang.c (lang_check): Don't complain about relocs or merge @@ -2190,6 +2190,7 @@ ldelf_before_place_orphans (void) if (discarded_section (linked_to_sec)) { isec->output_section = bfd_abs_section_ptr; + isec->flags |= SEC_EXCLUDE; break; } } |