Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/link: add eabi tag to arm binary #5640
What steps will reproduce the problem? 1. Run "readelf -A -- /path/to/go/binary" What is the expected output? Something like the following, which is the result of running the same command on /bin/bash instead: 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_FP_arch: VFPv3-D16 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_align_preserved: 8-byte, except leaf SP Tag_ABI_enum_size: int Tag_ABI_HardFP_use: SP and DP Tag_ABI_VFP_args: VFP registers Tag_CPU_unaligned_access: v6 What do you see instead? No output; zero exit status. Which compiler are you using (5g, 6g, 8g, gccgo)? N/A Which operating system are you using? Ubuntu Saucy Which version are you using? (run 'go version') go version go1.1 linux/arm Please provide any additional information below. See https://bugs.launchpad.net/ubuntu/+source/golang/+bug/1187722 for a golang build problem this caused. The ARM Architecture ABI r2.09 Addenda specifies the "eabi" attribute tags. In this case, a Tag_ABI_VFP_args setting of VFP would allow tools to detect the binary as armhf. I think this could be achieved with: .eabi_attribute 28, 1 But note that this bug is a request to add all useful attributes in general, rather than the specific issue that prompted this report. I'm trying to find out if is a requirement that ARM executables specify this information if they want to link with system libraries that do. Nevertheless, it would be useful as a wishlist item for the go binaries to provide this information so that distribution tooling can make use of it.