From owner-freebsd-java@FreeBSD.ORG Fri Oct 4 21:17:58 2013 Return-Path: Delivered-To: java@FreeBSD.org Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by hub.freebsd.org (Postfix) with ESMTP id 1EC63AEC; Fri, 4 Oct 2013 21:17:58 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Message-ID: <524F2FD2.3020801@FreeBSD.org> Date: Fri, 04 Oct 2013 17:14:58 -0400 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Konstantin Belousov , Sevan / Venture37 Subject: Re: JNA broken with r251668 as libc.so cant be loaded References: <524DFB7D.2000207@gmail.com> <20131004050824.GK41229@kib.kiev.ua> <524E934D.70303@gmail.com> <20131004152000.GS41229@kib.kiev.ua> In-Reply-To: <20131004152000.GS41229@kib.kiev.ua> X-Enigmail-Version: 1.5.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: jlh@freebsd.org, java@FreeBSD.org X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2013 21:17:58 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2013-10-04 11:20:00 -0400, Konstantin Belousov wrote: > On Fri, Oct 04, 2013 at 02:07:09PM +0400, Sevan / Venture37 wrote: >> On 04/10/2013 09:08, Konstantin Belousov wrote: >>> Does the source contain some workaround for Linux, already ? >>> Linux uses script for libc.so for very long time, and should >>> have the same issue unless code explicitely dlopen()s libc.so.6 >>> or such. >> >> >> No >> https://svn.java.net/svn/jna~svn/trunk/jnalib/test/com/sun/jna/LibraryLoadTest.java > >> > I do not know what should I see in the pointer you provided, and > how it implies the answer 'No' to my question. > > I just verified dlopen("libc.so") on some fresh Linux box, and the > function returned expected error '/lib/libc.so: invalid ELF > header'. I haven't verified it but it seems to have special case for Linux. Please see: https://github.com/twall/jna/blob/master/src/com/sun/jna/NativeLibrary.java#L206 https://github.com/twall/jna/blob/master/src/com/sun/jna/NativeLibrary.java#L741 https://github.com/twall/jna/blob/master/src/com/sun/jna/NativeLibrary.java#L768 Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.21 (FreeBSD) iQEcBAEBAgAGBQJSTy/SAAoJEHyflib82/FGiw8H/35A1rnLOGkTWY/kE3C/qmnn kkJnMHzKRlRr6ko44Y9TIjzxb20UDUR4QQZFZMqfnBbbaYgzuAdjgMCG1Q/XcHin UX0jqBqgC/TgXH5CYfTRBvtnNTRYkVQ5SCJCAevr39MvVK6INMc+ogiox1viXwRX CqoKvIarhRSXeYal7O0Tnv6StzlWLM4khmtt/Yc4+DXMnS+wDOH0o8Y+EcML1EQM BwKwnvgPOLTZRKC8adT0Cf1WrWrgJQRAm76RS8UXlj4Bv0YW7qXxjPknAnI855a6 M33cKl7g01FX0QABV66lEwMdjj0oDIFu+z7fou8zvTY6RC+E1EsZcmfICNj4Axs= =wc7o -----END PGP SIGNATURE-----