From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8497 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: [0pf] musl/SH-FDPIC progress Date: Fri, 11 Sep 2015 23:29:50 -0400 Message-ID: <20150912032950.GZ17773@brightrain.aerifal.cx> References: <20150911014850.GA18775@brightrain.aerifal.cx> <20150911190522.GW17773@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1442028612 11919 80.91.229.3 (12 Sep 2015 03:30:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Sep 2015 03:30:12 +0000 (UTC) Cc: 0pf@nommu.org To: musl@lists.openwall.com Original-X-From: musl-return-8509-gllmg-musl=m.gmane.org@lists.openwall.com Sat Sep 12 05:30:07 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ZabVu-0000yc-It for gllmg-musl@m.gmane.org; Sat, 12 Sep 2015 05:30:06 +0200 Original-Received: (qmail 27811 invoked by uid 550); 12 Sep 2015 03:30:03 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 27790 invoked from network); 12 Sep 2015 03:30:03 -0000 Content-Disposition: inline In-Reply-To: <20150911190522.GW17773@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:8497 Archived-At: On Fri, Sep 11, 2015 at 03:05:22PM -0400, Rich Felker wrote: > On Thu, Sep 10, 2015 at 09:48:50PM -0400, Rich Felker wrote: > > I now have a working prototype of static-linked FDPIC binary support > > in musl libc using gcc 5.2 (with the forward-ported SH-FDPIC patch) > > and binutils 2.25.1. I've tested simple example programs and some > > non-trivial examples with threads and they work both under qemu-sh4eb > > with FDPIC support added (needs a small patch) and on real J2 > > hardware, where they successfully share text/execute-in-place. > > > > The gcc patch is presently against gcc with all the other patches from > > my musl-cross-make repo applied, so some refactoring will be needed to > > propose it upstream, but I think it's ready for initial review. After > > a little bit more cleanup (mainly bad specs logic) I'll go ahead and > > put a version of this patch in the toolchain repo. > > I've posted the current version of my patches in my toolchain repo: > > https://github.com/richfelker/musl-cross-make/commit/3a0c9775b69ae311d89b6a9df6788d43f206cf6c > > As noted in the commit message, a patch on the musl side is needed to > get actual working binaries. I'll post a version of this (not > appropriate for upstream) soon. Actually I just went ahead and got the static-linking-only part suitable for upstream and committed it. As of this commit to musl: http://git.musl-libc.org/cgit/musl/commit/?id=d4c82d05b8d0ee97f6356d60986799a95ed5bd74 it should be possible to get a working fdpic build. Note that PIE is not supported yet and my toolchain build has a GCC patch to always force -pie. So patches/gcc-5.2.0/0006-defaultpie.diff needs to be removed before starting to get a working fdpic toolchain right now. Rich