diff options
| author | Khem Raj <raj.khem@gmail.com> | 2012-06-09 09:42:59 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-06-11 13:49:49 +0100 |
| commit | 00330a3ad0db9437a5bcb3b71fe00bed4e085768 (patch) | |
| tree | 9880d7b6bb2838ee131a2e6dbab563b9553a1b10 /meta/recipes-devtools/binutils | |
| parent | 665f9083875a79aa8ba1690cb3b4f315d17738e5 (diff) | |
| download | poky-00330a3ad0db9437a5bcb3b71fe00bed4e085768.tar.gz | |
binutils_2.22: Backport to fix bogus textrels
This is reported by prelinker which does not
go well with textrels.
(From OE-Core rev: 7b1caeca8e5c0dd066bb940fe6d2dff4d22bf816)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils')
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils/0001-PR-ld-13470.patch | 82 | ||||
| -rw-r--r-- | meta/recipes-devtools/binutils/binutils_2.22.bb | 3 |
2 files changed, 84 insertions, 1 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/0001-PR-ld-13470.patch b/meta/recipes-devtools/binutils/binutils/0001-PR-ld-13470.patch new file mode 100644 index 0000000000..0a0e064451 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0001-PR-ld-13470.patch | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | From 82fdddd1c4e37881db9b4c6a944261521c6f10ac Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alan Modra <amodra@bigpond.net.au> | ||
| 3 | Date: Sat, 3 Dec 2011 00:57:59 +0000 | ||
| 4 | Subject: [PATCH] PR ld/13470 * elf32-ppc.c | ||
| 5 | (ppc_elf_copy_indirect_symbol): Revert substantive | ||
| 6 | change in 2011-07-01 commit. Comment. * | ||
| 7 | elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise. | ||
| 8 | |||
| 9 | --- | ||
| 10 | bfd/ChangeLog | 7 +++++++ | ||
| 11 | bfd/elf32-ppc.c | 14 ++++++++++---- | ||
| 12 | bfd/elf64-ppc.c | 14 ++++++++++---- | ||
| 13 | 3 files changed, 27 insertions(+), 8 deletions(-) | ||
| 14 | |||
| 15 | |||
| 16 | Upstream-Status: Backport | ||
| 17 | |||
| 18 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 19 | Index: binutils-2.22/bfd/elf32-ppc.c | ||
| 20 | =================================================================== | ||
| 21 | --- binutils-2.22.orig/bfd/elf32-ppc.c 2011-11-21 01:29:21.000000000 -0800 | ||
| 22 | +++ binutils-2.22/bfd/elf32-ppc.c 2012-05-31 14:28:48.273784929 -0700 | ||
| 23 | @@ -2987,10 +2987,6 @@ | ||
| 24 | edir->elf.needs_plt |= eind->elf.needs_plt; | ||
| 25 | edir->elf.pointer_equality_needed |= eind->elf.pointer_equality_needed; | ||
| 26 | |||
| 27 | - /* If we were called to copy over info for a weak sym, that's all. */ | ||
| 28 | - if (eind->elf.root.type != bfd_link_hash_indirect) | ||
| 29 | - return; | ||
| 30 | - | ||
| 31 | if (eind->dyn_relocs != NULL) | ||
| 32 | { | ||
| 33 | if (edir->dyn_relocs != NULL) | ||
| 34 | @@ -3022,6 +3018,16 @@ | ||
| 35 | eind->dyn_relocs = NULL; | ||
| 36 | } | ||
| 37 | |||
| 38 | + /* If we were called to copy over info for a weak sym, that's all. | ||
| 39 | + You might think dyn_relocs need not be copied over; After all, | ||
| 40 | + both syms will be dynamic or both non-dynamic so we're just | ||
| 41 | + moving reloc accounting around. However, ELIMINATE_COPY_RELOCS | ||
| 42 | + code in ppc_elf_adjust_dynamic_symbol needs to check for | ||
| 43 | + dyn_relocs in read-only sections, and it does so on what is the | ||
| 44 | + DIR sym here. */ | ||
| 45 | + if (eind->elf.root.type != bfd_link_hash_indirect) | ||
| 46 | + return; | ||
| 47 | + | ||
| 48 | /* Copy over the GOT refcount entries that we may have already seen to | ||
| 49 | the symbol which just became indirect. */ | ||
| 50 | edir->elf.got.refcount += eind->elf.got.refcount; | ||
| 51 | Index: binutils-2.22/bfd/elf64-ppc.c | ||
| 52 | =================================================================== | ||
| 53 | --- binutils-2.22.orig/bfd/elf64-ppc.c 2011-11-21 01:29:24.000000000 -0800 | ||
| 54 | +++ binutils-2.22/bfd/elf64-ppc.c 2012-05-31 14:28:48.285784951 -0700 | ||
| 55 | @@ -4435,10 +4435,6 @@ | ||
| 56 | edir->elf.ref_regular_nonweak |= eind->elf.ref_regular_nonweak; | ||
| 57 | edir->elf.needs_plt |= eind->elf.needs_plt; | ||
| 58 | |||
| 59 | - /* If we were called to copy over info for a weak sym, that's all. */ | ||
| 60 | - if (eind->elf.root.type != bfd_link_hash_indirect) | ||
| 61 | - return; | ||
| 62 | - | ||
| 63 | /* Copy over any dynamic relocs we may have on the indirect sym. */ | ||
| 64 | if (eind->dyn_relocs != NULL) | ||
| 65 | { | ||
| 66 | @@ -4471,6 +4467,16 @@ | ||
| 67 | eind->dyn_relocs = NULL; | ||
| 68 | } | ||
| 69 | |||
| 70 | + /* If we were called to copy over info for a weak sym, that's all. | ||
| 71 | + You might think dyn_relocs need not be copied over; After all, | ||
| 72 | + both syms will be dynamic or both non-dynamic so we're just | ||
| 73 | + moving reloc accounting around. However, ELIMINATE_COPY_RELOCS | ||
| 74 | + code in ppc64_elf_adjust_dynamic_symbol needs to check for | ||
| 75 | + dyn_relocs in read-only sections, and it does so on what is the | ||
| 76 | + DIR sym here. */ | ||
| 77 | + if (eind->elf.root.type != bfd_link_hash_indirect) | ||
| 78 | + return; | ||
| 79 | + | ||
| 80 | /* Copy over got entries that we may have already seen to the | ||
| 81 | symbol which just became indirect. */ | ||
| 82 | if (eind->elf.got.glist != NULL) | ||
diff --git a/meta/recipes-devtools/binutils/binutils_2.22.bb b/meta/recipes-devtools/binutils/binutils_2.22.bb index 9f62883ff3..7b6adef122 100644 --- a/meta/recipes-devtools/binutils/binutils_2.22.bb +++ b/meta/recipes-devtools/binutils/binutils_2.22.bb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | require binutils.inc | 1 | require binutils.inc |
| 2 | 2 | ||
| 3 | PR = "r8" | 3 | PR = "r9" |
| 4 | 4 | ||
| 5 | LIC_FILES_CHKSUM="\ | 5 | LIC_FILES_CHKSUM="\ |
| 6 | file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\ | 6 | file://src-release;endline=17;md5=4830a9ef968f3b18dd5e9f2c00db2d35\ |
| @@ -32,6 +32,7 @@ SRC_URI = "\ | |||
| 32 | file://binutils-powerpc-e5500.patch \ | 32 | file://binutils-powerpc-e5500.patch \ |
| 33 | file://binutils-armv5e.patch \ | 33 | file://binutils-armv5e.patch \ |
| 34 | file://mips64-default-ld-emulation.patch \ | 34 | file://mips64-default-ld-emulation.patch \ |
| 35 | file://0001-PR-ld-13470.patch \ | ||
| 35 | " | 36 | " |
| 36 | 37 | ||
| 37 | SRC_URI[md5sum] = "ee0f10756c84979622b992a4a61ea3f5" | 38 | SRC_URI[md5sum] = "ee0f10756c84979622b992a4a61ea3f5" |
