[PATCH] D93267: [lld-macho] Handle overflow beyond the 127 common encodings limit
Greg McGary via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 14 18:53:03 PST 2020
gkm created this revision.
gkm added a reviewer: lld-macho.
gkm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
The common encodings table holds only 127 entries. The encodings index for compact entries is 8 bits wide, and indexes 127..255 are stored locally to each second-level page. Prior to this diff, lld would `fatal()` if encodings overflowed the 127 limit.
This diff populates a per-second-level-page encodings table as needed. When the per-page encodings table hits its limit, we must terminate the page. If such early termination would consume fewer entries than a regular (non-compact) encoding page, then we prefer the regular format.
Caveat: one reason the common-encoding table might overflow is because of DWARF debug-info references, which are not yet implemented and will come with a later diff.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D93267
Files:
lld/MachO/UnwindInfoSection.cpp
lld/MachO/UnwindInfoSection.h
lld/test/MachO/tools/generate-cfi-funcs.py
lld/test/MachO/tools/validate-unwind-info.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93267.311769.patch
Type: text/x-patch
Size: 17351 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201215/99ff96e4/attachment.bin>
More information about the llvm-commits
mailing list