From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13879 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: luajit musl ppc32 bss-plt Date: Wed, 27 Feb 2019 08:10:28 -0500 Message-ID: <20190227131028.GS23599@brightrain.aerifal.cx> References: <120872320.5764335.1551244676399.ref@mail.yahoo.com> <120872320.5764335.1551244676399@mail.yahoo.com> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="194946"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-13895-gllmg-musl=m.gmane.org@lists.openwall.com Wed Feb 27 14:10:43 2019 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.89) (envelope-from ) id 1gyyyx-000oe6-N8 for gllmg-musl@m.gmane.org; Wed, 27 Feb 2019 14:10:43 +0100 Original-Received: (qmail 15614 invoked by uid 550); 27 Feb 2019 13:10:41 -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 15596 invoked from network); 27 Feb 2019 13:10:40 -0000 Content-Disposition: inline In-Reply-To: <120872320.5764335.1551244676399@mail.yahoo.com> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:13879 Archived-At: On Wed, Feb 27, 2019 at 05:17:56AM +0000, Doug Crawford wrote: > Just wondering if anyone else was successful in running luajit with musl on ppc32. > I have pretty much everything else working on our ppc32 target with > musl except luajit which segfaults very early in > __register_frame_info@got.plt > During the luajit build I noticed this output:DYNLINK  >  libluajit..so../powerpc-buildroot-linux-musl/bin/ld: bss-plt forced > due to lj_vm.o > I am guessing that something in luajit-2.0.5/src/lj_vm.s is forcing > the linker to use the older bss-plt. But, musl only supports > secure-plt so this probably is not going to work. That's correct. The difference in ABI is that the secure-plt form requires a particular GOT register to be loaded as part of the contract for calling a PLT entry. The function calls in the asm (and in jit-generated code, if it calls to C functions) need to be modified to either follow the secureplt ABI, or better yet, not to use the PLT at all, and instead just load the function address from the GOT and perform an indirect call/jmp to it (this is considerably more efficient than using a PLT anyway). Rich