[PATCH] D87780: [lld-macho] Export trie addresses should be relative to the image base
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 16 11:23:15 PDT 2020
int3 created this revision.
int3 added a reviewer: lld-macho.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
int3 requested review of this revision.
We didn't notice this earlier this we were only testing the export trie
encoded in a dylib, whose image base starts at zero. But a regular
executable contains `__PAGEZERO`, which means it has a non-zero image
base. This bug was discovered after attempting to run some programs that
performed `dlopen` on an executable.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D87780
Files:
lld/MachO/ExportTrie.cpp
lld/MachO/ExportTrie.h
lld/MachO/SyntheticSections.cpp
lld/test/MachO/export-trie.s
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87780.292281.patch
Type: text/x-patch
Size: 4277 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200916/3ab9dae8/attachment.bin>
More information about the llvm-commits
mailing list