Patch fixes PR32024.
Sections that were not marked as Live has null output section.
Previously we tried to access that field and segfaulted.
Differential D30188
[ELF] - Do not segfault when using --gc-sections with linker script grimar on Feb 21 2017, 1:12 AM. Authored by
Details Patch fixes PR32024. Sections that were not marked as Live has null output section.
Diff Detail Event TimelineComment Actions I'm not yet familiar enough with LLD to know the policy with asserts, but would it make sense to assert after that if statement (possibly inside switchTo()) to check that IB->OutSec is not null? That way if there are any other cases either currently or in the future where OutSec is null we'll get a nicer failure, at least in Debug builds.
Comment Actions We usually do not check arguments with asserts I think. Mostly using them to check logic flow conditions.
|
Do we really need these first two CHECKs?