|
Message-ID: <CAHu4ykg6K9wBU8dF3gkjC1LCK3UrH9xQxuodD8VepA7P=Qf7Wg@mail.gmail.com>
Date: Tue, 24 Dec 2019 22:38:49 +0800
From: Youren Shen <shenyouren@...il.com>
To: musl@...ts.openwall.com
Subject: [BUG] Force to use a dynamic linker in musl-clang wapper cause a
crash for static-pie c++ programs.
Hey, there,
Recently I'm trying to build a non-gnu toolchain with musl, clang, llvm,
libc++, compiler-rt. While static-pie feature is very useful in our
project, musl-clang force to link a dynamic linker into the binary. This
behavior will cause a crash in c++ programs with compiler-rt and libc++.
For more details and reproduction of this bug, you can read my previous
email to llvm-dev mail lists.[1]
I spend a few days to find the reason -- in function _dlstart_c, the
program will get a "base" of relocation in /lib/ld-musl-x86_64.so.1, which
is not right when it tries to relocate .rel.dyn section in the binary.
Overall, the static-pie program does not need a dynamic linker at all. So
maybe we should remove this argument in wrapper when static-pie is enabled.
Thank you very much.
[1]. https://groups.google.com/forum/#!msg/llvm-dev/XPrSPqD2zjM/YtH6Fi2YAgAJ
--
Best Regards.
Youren Shen.
Content of type "text/html" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.