Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Apr 2015 18:53:56 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Andrew Turner <andrew@fubar.geek.nz>
Cc:        freeBSD-arm@freebsd.org
Subject:   armv6hf target building libraries wrong...
Message-ID:  <7C137019-9108-4F56-A03E-CBD6B055EBD9@bsdimp.com>
In-Reply-To: <20150420230901.666fe888@bender.Home>
References:  <55316705.9020506@ignoranthack.me> <63DBA00A-509B-4B20-BA3E-07AC5F7C8885@gromit.dlib.vt.edu> <55356425.1030503@ignoranthack.me> <012688E4-7FB6-4807-A049-014C30BE80D4@bsdimp.com> <20150420230901.666fe888@bender.Home>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_7E11C2A5-863F-41E0-8E89-82ECC6CC3441
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8


> On Apr 20, 2015, at 4:09 PM, Andrew Turner <andrew@fubar.geek.nz> =
wrote:
>> Sadly, there=E2=80=99s no real way to tell them apart at runtime that =
I=E2=80=99ve
>> found except to grovel in the symbol table for =E2=80=98soft =
float=E2=80=99. Still
>> looking and hoping...
>=20
> There is an elf note containing the TARGET_ARCH. You can also use the
> Tag_ABI_VFP_args attribute [1].

Looking at the Linux armv6hl and armv7hl binaries, I think we=E2=80=99re =
building our
libraries wrong for the armv6hf target.

% readelf -h linux/libc-2.21.so
=E2=80=A6
  Flags:                             0x5000402, has entry point, =
Version5 EABI, <unknown>
...
% readelf -h freebsd/libc.so.7
=E2=80=A6
  Flags:                             0x5000002, has entry point, =
Version5 EABI
=E2=80=A6
%

0x400 is, per the spec, VFP floating used (hard float). Linux has this =
marking
and ours doesn=E2=80=99t. There=E2=80=99s a number of other minor =
differences as well:

% readelf -A linux/libc-2.21.s
Attribute Section: aeabi
File Attributes
  Tag_CPU_name: "7-A"
  Tag_CPU_arch: v7
  Tag_CPU_arch_profile: Application
  Tag_ARM_ISA_use: Yes
  Tag_THUMB_ISA_use: Thumb-2
  Tag_VFP_arch: VFPv3
  Tag_NEON_arch: NEONv1
  Tag_ABI_PCS_wchar_t: 4
  Tag_ABI_FP_rounding: Needed
  Tag_ABI_FP_denormal: Needed
  Tag_ABI_FP_exceptions: Needed
  Tag_ABI_FP_number_model: IEEE 754
  Tag_ABI_align8_needed: Yes
  Tag_ABI_enum_size: int
  Tag_ABI_HardFP_use: SP and DP
  Tag_ABI_VFP_args: VFP registers
  Tag_unknown_34: 1 (0x1)
% readelf -A freebsd/libc.so.7
Attribute Section: aeabi
File Attributes
%

I=E2=80=99d like to fix this in -current. Any objections?

Warner

--Apple-Mail=_7E11C2A5-863F-41E0-8E89-82ECC6CC3441
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJVNZ+lAAoJEGwc0Sh9sBEAS6oP/2WC4CMjWJQ6lifSnVvonv3w
aaaXgM5cHe9WqJ/+HfEKzLT4uF/C1ML8mM+ZjApkgT2r+Mls4qfReqQ1WhNl4b4o
1qDQHXE/vCO+1Q/D8blBpElZaQIPaRGNeHlhdMKMQtF0rg8DEjz/TlS8RyAsniaI
cYWUPkO0wlWsBCDe61BvMRwgavqllDo2ko7Y47gkk6J8BwkbBygizOnzMcSmUP7m
vfsF3z11FFCwH0gJ5vGZjPK7mRGWHOMGPTONCB7ymnhL1rw/fjPpr/rHEmZFo5Ky
3JugyM9L5aSnTIzPUBTmvhho+sgxsGk0cUT7YjKV065/JtA2XS0aP91JM/RyLkw5
WFmIfW1rwTgBI76mjdGBdRkXEx+xVc0cD7H1EFIIrSo/hGY27UzcVyNmqgC9jdgP
HyHSgt6vcY7cq5Pf3JRznjchhafHqx4Mem0ZL3AOCmNHRc91tX9It1LoGX7obHmz
hQUBZirZ14eh+PzqoxSOia3pMUFeJWfqOO9RTa/UNAwO0Lr0c21sX3cauYPyMM8d
hNpZ0uK1CNYiT2XkprM8WAGHQ4TWNw5gPWr1Qd1vecr/Q2H/LqlGb1M9qB32D4DH
Qym3vEzbU3dyZK3ozCcUAY3kWRjpOeReuFzKkVu44iWXhfn7Nh0UGrQ+Ww7XRzQU
JjZRI2892uv7mK5WxV6v
=l/go
-----END PGP SIGNATURE-----

--Apple-Mail=_7E11C2A5-863F-41E0-8E89-82ECC6CC3441--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7C137019-9108-4F56-A03E-CBD6B055EBD9>