diff options
author | Amy Fong <amy.fong@windriver.com> | 2015-10-06 14:41:12 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2015-10-13 11:29:57 -0400 |
commit | 7817649098ea61e8d3e31600a589e856fc254006 (patch) | |
tree | e61e2ba11e3c5328dbe7cede35edfd9fe7c6ee52 | |
parent | 4988689b73150d333905329b1ce0277afe4cdf9e (diff) | |
download | meta-virtualization-7817649098ea61e8d3e31600a589e856fc254006.tar.gz |
Backport go-cross: set alignment for the .rel.plt section on 32-bit architectures
submitted to upstream https://github.com/errordeveloper/oe-meta-go
go-cross: set alignment for the .rel.plt section on 32-bit architectures
This patch is cherry picked from golang's upstream, and this patch will
fix the package of etcd's following build error:
ERROR: debugedit failed with exit code 256 (cmd was 'bitbake_build/tmp/sysroots/x86_64-linux/usr/lib/rpm/bin/debugedit' -b 'bitbake_build/tmp/work/cortexa7t2hf-vfp-neon-wrs-linux-gnueabi' -d '/usr/src/debug' -i -l 'bitbake_build/tmp/work/cortexa7t2hf-vfp-neon-wrs-linux-gnueabi/etcd/git-r0/debugsources.list' 'bitbake_build/tmp/work/cortexa7t2hf-vfp-neon-wrs-linux-gnueabi/etcd/git-r0/package/usr/bin/etcd'):
bitbake_build/tmp/sysroots/x86_64-linux/usr/lib/rpm/bin/debugedit: elf_update: invalid section alignment
ERROR: Function failed: split_and_strip_files
ERROR: Logfile of failure stored in: bitbake_build/tmp/work/cortexa7t2hf-vfp-neon-wrs-linux-gnueabi/etcd/git-r0/temp/do_package/log.do_package.109414
ERROR: Task 12 (layers/meta-overc/meta-pod/recipes-connectivity/etcd/etcd_git.bb, do_package) failed with exit code '1'
Signed-off-by: fupan li <fupan.li@windriver.com>
Signed-off-by: Amy Fong <amy.fong@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r-- | recipes-devtools/go-cross/files/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch | 30 | ||||
-rw-r--r-- | recipes-devtools/go-cross/go-cross_1.3.bb | 1 |
2 files changed, 31 insertions, 0 deletions
diff --git a/recipes-devtools/go-cross/files/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch b/recipes-devtools/go-cross/files/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch new file mode 100644 index 00000000..4cfa9d1b --- /dev/null +++ b/recipes-devtools/go-cross/files/0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 855145d5c03c4b4faf60736c38d7a299c682af4a Mon Sep 17 00:00:00 2001 | ||
2 | From: Shenghou Ma <minux@golang.org> | ||
3 | Date: Sat, 7 Feb 2015 14:06:02 -0500 | ||
4 | Subject: [PATCH] cmd/ld: set alignment for the .rel.plt section on 32-bit | ||
5 | architectures | ||
6 | |||
7 | Fixes #9802. | ||
8 | |||
9 | Change-Id: I22c52a37bdb23a14cc4615c9519431bb14ca81ca | ||
10 | Reviewed-on: https://go-review.googlesource.com/4170 | ||
11 | Reviewed-by: Ian Lance Taylor <iant@golang.org> | ||
12 | --- | ||
13 | src/cmd/ld/elf.c | 1 + | ||
14 | 1 file changed, 1 insertion(+) | ||
15 | |||
16 | diff --git a/src/cmd/ld/elf.c b/src/cmd/ld/elf.c | ||
17 | index 12ced98..97ed4bd 100644 | ||
18 | --- a/src/cmd/ld/elf.c | ||
19 | +++ b/src/cmd/ld/elf.c | ||
20 | @@ -1363,6 +1363,7 @@ asmbelf(vlong symo) | ||
21 | sh->type = SHT_REL; | ||
22 | sh->flags = SHF_ALLOC; | ||
23 | sh->entsize = ELF32RELSIZE; | ||
24 | + sh->addralign = 4; | ||
25 | sh->link = elfshname(".dynsym")->shnum; | ||
26 | shsym(sh, linklookup(ctxt, ".rel.plt", 0)); | ||
27 | |||
28 | -- | ||
29 | 1.9.1 | ||
30 | |||
diff --git a/recipes-devtools/go-cross/go-cross_1.3.bb b/recipes-devtools/go-cross/go-cross_1.3.bb index d689e61a..1fb48700 100644 --- a/recipes-devtools/go-cross/go-cross_1.3.bb +++ b/recipes-devtools/go-cross/go-cross_1.3.bb | |||
@@ -20,6 +20,7 @@ SRC_URI[sha256sum] = "eb983e6c5b2b9838f482c5442b1ac1856f610f2b21f3c123b3fedb48ff | |||
20 | SRC_URI += "\ | 20 | SRC_URI += "\ |
21 | file://bsd_svid_source.patch \ | 21 | file://bsd_svid_source.patch \ |
22 | file://ccache.patch \ | 22 | file://ccache.patch \ |
23 | file://0001-cmd-ld-set-alignment-for-the-.rel.plt-section-on-32-.patch \ | ||
23 | " | 24 | " |
24 | 25 | ||
25 | do_compile() { | 26 | do_compile() { |