From owner-freebsd-arm@FreeBSD.ORG Tue Oct 7 16:24:35 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2471F9AA for ; Tue, 7 Oct 2014 16:24:35 +0000 (UTC) Received: from mail2.asahi-net.or.jp (mail2.asahi-net.or.jp [202.224.39.198]) by mx1.freebsd.org (Postfix) with ESMTP id EE1989BE for ; Tue, 7 Oct 2014 16:24:34 +0000 (UTC) Received: from localhost (w142149.ppp.asahi-net.or.jp [121.1.142.149]) by mailssl.asahi-net.or.jp (Postfix) with ESMTP id F17C2C77C5; Wed, 8 Oct 2014 01:24:26 +0900 (JST) Date: Wed, 08 Oct 2014 01:24:23 +0900 (JST) Message-Id: <20141008.012423.1241777167968112759.shigeru@os-hackers.jp> To: ronald-lists@klop.ws Subject: Re: Why are arm libs branded as SYSV? From: YAMAMOTO Shigeru In-Reply-To: References: X-Mailer: Mew version 6.6 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2014 16:24:35 -0000 Hi, >>>>> "Ronald" == Ronald Klop writes: > On my ARM Sheevaplug: > # file /usr/local/lib/libpcre.so.3 > /usr/local/lib/libpcre.so.3: ELF 32-bit LSB shared object, ARM, > EABI5 version 1 (SYSV), dynamically linked, stripped > On my amd64 computer: file /usr/local/lib/libpcre.so.3 > /usr/local/lib/libpcre.so.3: ELF 64-bit LSB shared object, x86-64, > version 1 (FreeBSD), dynamically linked, stripped > Because of this I can not run ldd on a shared library on my ARM > system. > # ldd -a /usr/local/lib/libpcre.so.3 ldd: > /usr/local/lib/libpcre.so.3: not a FreeBSD ELF shared object I modify src for RaspberryPi. # uname -a FreeBSD rpi.devel.os-hackers.jp 11.0-CURRENT FreeBSD 11.0-CURRENT #0 2b4736f34c78 (shigeru_raspberry_pi) tip: Sun Oct 5 12:18:07 JST 2014 root@nemesis.os-hackers.jp:/root/rpi/build/work/obj/arm.armv6/root/rpi/build/work/src.hg/sys/RPI-B-VIMAGE arm # ldd /usr/local/lib/libpcre.so.3 /usr/local/lib/libpcre.so.3: libthr.so.3 => /lib/libthr.so.3 (0x20297000) libc.so.7 => /lib/libc.so.7 (0x20100000) I change src follows, - 1. copy contrib/binutils/bfd/elf32-arm.c to gnu/usr.bin/binutils/libbfd/elf32-arm.c - 2. change gnu/usr.bin/binutils/libbfd/elf32-arm.c by following diff, diff -u contrib/binutils/bfd/elf32-arm.c - gnu/usr.bin/binutils/libbfd/elf32-arm.c --- contrib/binutils/bfd/elf32-arm.c 2014-10-05 03:00:54.100351377 +0900 +++ gnu/usr.bin/binutils/libbfd/elf32-arm.c 2014-10-05 - 03:00:54.147901348 +0900 @@ -9343,7 +9343,8 @@ i_ehdrp = elf_elfheader (abfd); - if (EF_ARM_EABI_VERSION (i_ehdrp->e_flags) == EF_ARM_EABI_UNKNOWN) + if (EF_ARM_EABI_VERSION (i_ehdrp->e_flags) == EF_ARM_EABI_UNKNOWN + || EF_ARM_EABI_VERSION (i_ehdrp->e_flags) == EF_ARM_EABI_VER5) i_ehdrp->e_ident[EI_OSABI] = ARM_ELF_OS_ABI_VERSION; else i_ehdrp->e_ident[EI_OSABI] = 0; --- YAMAMOTO Shigeru