Certain debug sections like ".debug_aranges" when built with GAS 2.36.1
are missing section symbols (presumably because they're not needed).
Instead, of segfaulting, simply don't include them if they're missing.
Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
list_for_each_entry(sec, &kelf->sections, list) {
if (is_debug_section(sec)) {
sec->include = 1;
- if (!is_rela_section(sec))
+ if (!is_rela_section(sec) && sec->secsym)
sec->secsym->include = 1;
}
}