From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/11100 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Sturm Newsgroups: gmane.linux.lib.musl.general Subject: Static PIE with musl and clang Date: Sat, 4 Mar 2017 19:47:31 -0600 (CST) Message-ID: <1450280459.2314.1488678451062.JavaMail.zimbra@computervoice.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2313_2122165615.1488678451059" X-Trace: blaine.gmane.org 1488678469 3931 195.159.176.226 (5 Mar 2017 01:47:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 5 Mar 2017 01:47:49 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-11115-gllmg-musl=m.gmane.org@lists.openwall.com Sun Mar 05 02:47:45 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1ckLGx-0000Qk-PN for gllmg-musl@m.gmane.org; Sun, 05 Mar 2017 02:47:43 +0100 Original-Received: (qmail 19911 invoked by uid 550); 5 Mar 2017 01:47:46 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 19881 invoked from network); 5 Mar 2017 01:47:44 -0000 X-Virus-Scanned: amavisd-new at server03.computervoice.com X-Mailer: Zimbra 8.6.0_GA_1153 (ZimbraWebClient - GC51 (Win)/8.6.0_GA_1153) Thread-Topic: Static PIE with musl and clang Thread-Index: NxnXf3oHeMEehvVuQCS0NKi8oJGZrQ== Xref: news.gmane.org gmane.linux.lib.musl.general:11100 Archived-At: ------=_Part_2313_2122165615.1488678451059 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Has anyone managed to build static PIE with musl and clang, preferably linking with lld? I see that this has been done using GCC and rcrt1.o, but I cannot find a combination of command line parameters that will successfully link and execute with clang. I am using clang 4.0.0RC2 and musl 1.1.16. I have also tried to use binutils ld instead of llvm lld to no avail. ------=_Part_2313_2122165615.1488678451059 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
Has anyone managed to build static PIE with musl and clang, preferably linking with lld?

I see that this has been done using GCC and rcrt1.o, but I cannot find a combination of command line parameters that will successfully link and execute with clang.

I am using clang 4.0.0RC2 and musl 1.1.16. I have also tried to use binutils ld instead of llvm lld to no avail.
------=_Part_2313_2122165615.1488678451059--