[PATCH] D105364: [lld-macho] Drop assertions that all symbols are in GOT
Vy Nguyen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 2 11:51:17 PDT 2021
oontvoo created this revision.
Herald added a reviewer: int3.
Herald added a reviewer: gkm.
Herald added a project: lld-macho.
Herald added a reviewer: lld-macho.
oontvoo requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Related bug: 50812
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D105364
Files:
lld/MachO/UnwindInfoSection.cpp
lld/test/MachO/bug_50812.s
Index: lld/test/MachO/bug_50812.s
===================================================================
--- lld/test/MachO/bug_50812.s
+++ lld/test/MachO/bug_50812.s
@@ -24,7 +24,7 @@
filesize: 120
maxprot: 7
initprot: 7
- nsects: 2
+ nsects: 3
flags: 0
Sections:
- sectname: __text
@@ -86,6 +86,29 @@
type: 0
scattered: false
value: 0
+ - sectname: __compact_unwind
+ segname: __LD
+ addr: 0x0000000000000058
+ size: 32
+ offset: 0x00000218
+ align: 3
+ reloff: 0x00000258
+ nreloc: 1
+ flags: 0x02000000
+ reserved1: 0x00000000
+ reserved2: 0x00000000
+ reserved3: 0x00000000
+ content: '0000000000000000120000000000000100000000000000000000000000000000'
+ relocations:
+ - address: 0x00000000
+ symbolnum: 10
+ pcrel: false
+ length: 3
+ extern: true
+ type: 0
+ scattered: false
+ value: 0
+
- cmd: LC_SYMTAB
cmdsize: 24
symoff: 608
@@ -104,6 +127,44 @@
n_sect: 2
n_desc: 0
n_value: 48
+
+ ## syms NOT in GOT
+ - n_strx: 26
+ n_type: 0x64
+ n_sect: 0
+ n_desc: 0
+ n_value: 0
+ - n_strx: 39
+ n_type: 0x64
+ n_sect: 0
+ n_desc: 0
+ n_value: 0
+ - n_strx: 47
+ n_type: 0x66
+ n_sect: 3
+ n_desc: 1
+ n_value: 1625174059
+ - n_strx: 1
+ n_type: 0x2E
+ n_sect: 1
+ n_desc: 0
+ n_value: 0
+ - n_strx: 66
+ n_type: 0x24
+ n_sect: 1
+ n_desc: 0
+ n_value: 0
+ - n_strx: 1
+ n_type: 0x24
+ n_sect: 0
+ n_desc: 0
+ n_value: 18
+ - n_strx: 1
+ n_type: 0x4E
+ n_sect: 1
+ n_desc: 0
+ n_value: 18
+
- n_strx: 1
n_type: 0x4E
n_sect: 1
Index: lld/MachO/UnwindInfoSection.cpp
===================================================================
--- lld/MachO/UnwindInfoSection.cpp
+++ lld/MachO/UnwindInfoSection.cpp
@@ -246,7 +246,6 @@
uint64_t referentVA = UINT64_MAX; // Tombstone value
if (auto *referentSym = r.referent.dyn_cast<Symbol *>()) {
if (!isa<Undefined>(referentSym)) {
- assert(referentSym->isInGot());
if (auto *defined = dyn_cast<Defined>(referentSym))
checkTextSegment(defined->isec);
// At this point in the link, we may not yet know the final address of
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105364.356239.patch
Type: text/x-patch
Size: 3195 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210702/b7082d92/attachment.bin>
More information about the llvm-commits
mailing list