[llvm-bugs] [Bug 50411] New: lld-linked Chromium Framework can't be dlopen()ed on arm
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed May 19 20:31:08 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=50411
Bug ID: 50411
Summary: lld-linked Chromium Framework can't be dlopen()ed on
arm
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: MachO
Assignee: unassignedbugs at nondot.org
Reporter: nicolasweber at gmx.de
CC: gkm at fb.com, jezreel at gmail.com,
llvm-bugs at lists.llvm.org, smeenai at fb.com
Trying to get Chromium linked with lld on mac on arm now that the jump island
patch is in. This is the first crash; we don't even get to the real entry
point.
Repro:
https://drive.google.com/file/d/1mTSeMEHaqtcc8XWSea91OyvApN4U_r0A/view?usp=sharing
% ld @response.txt
Write a small loader (have to run this on an M1 machine since the repro
produces an arm image; almost everything is fine on intel)):
% cat main.cc
#include <dlfcn.h>
int main() {
void* library = dlopen("Chromium Framework",
RTLD_LAZY | RTLD_LOCAL | RTLD_FIRST);
if (!library)
return 1;
void* main = dlsym(library, "ChromeMain");
if (!main)
return 2;
}
% clang main.cc
% ./a.out ; echo $?
0
Works with ld64. But with lld:
% ~/src/llvm-project/out/gn/bin/ld64.lld @response.txt
ld64.lld: warning: Option `-dead_strip' is not yet implemented. Stay tuned...
% ./a.out ; echo $?
1
check-clang works fine with lld as host linker (even in a debug build where
clang is 455M so the branch islands generally seem to work and might not be
related) so things _generally_ work.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210520/46b1fe10/attachment-0001.html>
More information about the llvm-bugs
mailing list