Package: golang Version: 2:1.2-2 Severity: wishlist Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu trusty ubuntu-patch
Dear Maintainer, In Ubuntu, the attached patch was applied to achieve the following: * 016-armhf-elf-header.patch: Use correct ELF header for armhf binaries. This resolved linking issues that we saw on armhf in Ubuntu; I *think* that this is OK to hold in Debian as well despite that fact that you don't see the same linking issue due to dpkg differences. Thanks for considering the patch. -- System Information: Debian Release: wheezy/sid APT prefers trusty-updates APT policy: (500, 'trusty-updates'), (500, 'trusty-security'), (500, 'trusty'), (100, 'trusty-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.12.0-7-generic (SMP w/4 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -Nru golang-1.2/debian/changelog golang-1.2/debian/changelog diff -Nru golang-1.2/debian/patches/016-armhf-elf-header.patch golang-1.2/debian/patches/016-armhf-elf-header.patch --- golang-1.2/debian/patches/016-armhf-elf-header.patch 1970-01-01 01:00:00.000000000 +0100 +++ golang-1.2/debian/patches/016-armhf-elf-header.patch 2013-07-15 09:52:57.000000000 +0100 @@ -0,0 +1,21 @@ +Description: Use correct ELF header for armhf binaries. +Author: Adam Conrad <adcon...@ubuntu.com> +Last-Update: 2013-07-08 + +Index: golang-1.1/src/cmd/ld/elf.c +=================================================================== +--- golang-1.1.orig/src/cmd/ld/elf.c 2013-07-08 08:25:34.246800925 -0600 ++++ golang-1.1/src/cmd/ld/elf.c 2013-07-08 08:25:56.254801274 -0600 +@@ -57,7 +57,11 @@ + case '5': + // we only use EABI on linux/arm + if(HEADTYPE == Hlinux) +- hdr.flags = 0x5000002; // has entry point, Version5 EABI ++#ifdef __ARM_PCS_VFP ++ hdr.flags = 0x5000402; // has entry point, Version5 EABI, hard-float ABI ++#else ++ hdr.flags = 0x5000202; // has entry point, Version5 EABI, soft-float ABI ++#endif + // fallthrough + default: + hdr.phoff = ELF32HDRSIZE; /* Must be be ELF32HDRSIZE: first PHdr must follow ELF header */ diff -Nru golang-1.2/debian/patches/series golang-1.2/debian/patches/series --- golang-1.2/debian/patches/series 2013-12-31 17:24:50.000000000 +0000 +++ golang-1.2/debian/patches/series 2014-01-06 09:35:45.000000000 +0000 @@ -1 +1,2 @@ add-src-pkg-debug-elf-testdata-hello.patch +016-armhf-elf-header.patch