Hi, I am compiling node-wrtc from source to target the armv6zk (arm1176jzf-s), which is the cpu used by the Raspberry PI Zero SBC.
Using Ubuntu18.04 (x86), after building CMake, CrossCompiler (Crosstool-NG), and learning the basics of gn and Ninja, I was able to understand the needed args/switches and was able to successfuly compile node-wrtc from source for the armv6zk...
WebRTC portion is compiled with provided tool/clang compiler, and the node-wrtc portion is compiled with the crosscompiler created with Crosstool-NG...
I tested the result on a RPIZero, it works OK (for datachannel)!
(I am ONLY interested in using WebRTC DataChannel, and don't have any intention of using audio or video streaming... so, this is where my test and usage is going.)
I found a "concern", and this is the topic of the present message...
Inside the WebRTC portion of the code, out of 2871 generated binaries, 12 of them (listed below) shows "VFPv3" and "NEON" machine code inside the binary object file...
The "problem" is that, according to the ARM datasheet, arm1176jzf-s hardware is (only) capable of VFPv2 and CANNOT run NEON instructions...
The flags/args used instruct the compiler:
arm_version=6,
arm_float_abi="hard",
arm_use_neon=false,
arm_arch="armv6zk"
which is the reason why all the others binaries (2871 - 12) are created with VFPv2 and NO NEON code...
The following is the output from "readelf -A":
./third_party/boringssl/boringssl_asm/sha512-armv4.o
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "arm1176jzf-s"
Tag_CPU_arch: v6
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_CPU_unaligned_access: None
Tag_Virtualization_use: TrustZone
./third_party/boringssl/boringssl_asm/ghashv8-armx32.o
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "arm1176jzf-s"
Tag_CPU_arch: v6
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_CPU_unaligned_access: None
Tag_Virtualization_use: TrustZone
./third_party/boringssl/boringssl_asm/sha1-armv4-large.o
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "arm1176jzf-s"
Tag_CPU_arch: v6
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_CPU_unaligned_access: None
Tag_Virtualization_use: TrustZone
./third_party/boringssl/boringssl_asm/x25519-asm-arm.o
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "arm1176jzf-s"
Tag_CPU_arch: v6
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_CPU_unaligned_access: None
Tag_Virtualization_use: TrustZone
./third_party/boringssl/boringssl_asm/ghash-armv4.o
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "arm1176jzf-s"
Tag_CPU_arch: v6
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_CPU_unaligned_access: None
Tag_Virtualization_use: TrustZone
./third_party/boringssl/boringssl_asm/aesv8-armx32.o
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "arm1176jzf-s"
Tag_CPU_arch: v6
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_CPU_unaligned_access: None
Tag_Virtualization_use: TrustZone
./third_party/boringssl/boringssl_asm/bsaes-armv7.o
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "arm1176jzf-s"
Tag_CPU_arch: v6
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_CPU_unaligned_access: None
Tag_Virtualization_use: TrustZone
./third_party/boringssl/boringssl_asm/armv4-mont.o
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "arm1176jzf-s"
Tag_CPU_arch: v6
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_CPU_unaligned_access: None
Tag_Virtualization_use: TrustZone
./third_party/boringssl/boringssl_asm/chacha-armv4.o
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "arm1176jzf-s"
Tag_CPU_arch: v6
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_CPU_unaligned_access: None
Tag_Virtualization_use: TrustZone
./third_party/boringssl/boringssl_asm/poly1305_arm_asm.o
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "arm1176jzf-s"
Tag_CPU_arch: v6
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_CPU_unaligned_access: None
Tag_Virtualization_use: TrustZone
./third_party/boringssl/boringssl_asm/sha256-armv4.o
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "arm1176jzf-s"
Tag_CPU_arch: v6
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_CPU_unaligned_access: None
Tag_Virtualization_use: TrustZone
./third_party/opus/opus/celt_pitch_xcorr_arm_gnu.o
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "arm1176jzf-s"
Tag_CPU_arch: v6
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_CPU_unaligned_access: None
Tag_Virtualization_use: TrustZone
Looking at the names of the files, the "asm" part probably implicates that these are assembly instructions explicitly targeting VFPv3 and NEONv1 machine code...
My questions:
1) What happens when these specifics portion of the code are called, with VFPv3 and NEONv1 (inside a Raspberry PI Zero)?
2) Is there any other way to interpret the abouve output of readelf utility?
3) What those codes are for, in what cases are they invoked?
4) Last question: for datachannel ONLY, do I need those boringssl stuff?
I want to make clear again that, for the Raspberry PI Zero, right now, I am only interested in WebRTC DATACHANNEL...
Does anybody have any info to help clarify the matter?
Thanks in advance,
Valter
PS. As a side note, unrelated with my work on this matter, I am listing below the output of readelf on the provided official Chromium Browser (v74.0.3729) for the current Raspbian Buster 10 O.S. for the Raspberry PI Zero...
pi@raspberrypi:/usr/lib/chromium-browser $ readelf -A chromium-browser
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "6"
Tag_CPU_arch: v6
Tag_CPU_arch_profile: Application
Tag_ARM_ISA_use: Yes
Tag_THUMB_ISA_use: Thumb-1
Tag_FP_arch: VFPv3
Tag_Advanced_SIMD_arch: NEONv1
Tag_ABI_PCS_GOT_use: GOT-indirect
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_align_needed: 8-byte
Tag_ABI_enum_size: int
Tag_ABI_VFP_args: VFP registers
Tag_CPU_unaligned_access: v6
Tag_ABI_FP_16bit_format: IEEE 754
Tag_Virtualization_use: TrustZone
The VFPv3 and NEONv1 instructions also appears on this official build...!?!?
Does it means that the binary that I compiled is, also, "safe"?
Or, does it mean that both may share similiar "issues", if not the same?