forked from OSchip/llvm-project
[lld/mac] Don't crash on absolute symbols in unwind info generation
Fixes a regression from d6565a2dbc
and PR50820.
This commit is contained in:
parent
e5f2b035dd
commit
dbbc8d8333
|
@ -297,7 +297,9 @@ static void addEntriesForFunctionsWithoutUnwindInfo(
|
|||
// Add explicit "has no unwind info" entries for all global and local symbols
|
||||
// without unwind info.
|
||||
auto markNoUnwindInfo = [&cuVector, &hasUnwindInfo](const Defined *d) {
|
||||
if (d->isLive() && isCodeSection(d->isec)) {
|
||||
// FIXME: The d->isec null check might be incorrect for symbols
|
||||
// from LTO files.
|
||||
if (d->isLive() && d->isec && isCodeSection(d->isec)) {
|
||||
Ptr ptr = d->getVA();
|
||||
if (!hasUnwindInfo.count(ptr))
|
||||
cuVector.push_back({ptr, 0, 0, 0, 0});
|
||||
|
|
|
@ -110,6 +110,9 @@ _main:
|
|||
_quux:
|
||||
ret
|
||||
|
||||
.globl _abs
|
||||
_abs = 4
|
||||
|
||||
.p2align 2
|
||||
_baz:
|
||||
.cfi_startproc
|
||||
|
|
Loading…
Reference in New Issue