binutils-2.20.1: Change source package to binutils-2.20.1a
PATCH v2 1/1 binutils-2.20.1: Change source package to binutils-2.20.1a
From: Ulf Samuelsson <[email protected]>
2.20.1 is now 2.20.1a.
Patches and diff -r1 backported from openembedded-core meta-openembedded/meta-oe/recipes-devtools/binutils
When extracting the 2.20.1a sources, the directory name is still 2.20.1
$ LANG=C diff -rq binutils-2.20.1 binutils-2.20.1a Only in binutils-2.20.1a: cgen Files binutils-2.20.1/md5.sum and binutils-2.20.1a/md5.sum differ Files binutils-2.20.1/opcodes/m32c-desc.c and binutils-2.20.1a/opcodes/m32c-desc.c differ Files binutils-2.20.1/opcodes/mep-asm.c and binutils-2.20.1a/opcodes/mep-asm.c differ Files binutils-2.20.1/opcodes/mep-opc.c and binutils-2.20.1a/opcodes/mep-opc.c differ
Signed-off-by Ulf Samuelsson <[email protected]>
--- .../152_arm_branches_to_weak_symbols.patch | 240 +++++++++++++++++++ .../binutils-2.20.1/200_elflink_%B_fixes.patch | 65 +++++ .../201_elflink_improve_noaddneeded_errors.patch | 70 ++++++ .../202_elflink_noaddneeded_vs_weak.patch | 87 +++++++ .../binutils-2.20.1/binutils-mips-pie.patch | 29 +++ .../binutils/binutils-2.20.1/binutils-poison.patch | 253 ++++++++++++++++++++ .../binutils-2.20.1/libiberty_path_fix.patch | 20 ++ .../binutils-2.20.1/libtool-rpath-fix.patch | 36 +++ recipes/binutils/binutils_2.20.1.bb | 16 +- 9 files changed, 812 insertions(+), 4 deletions(-) create mode 100644 recipes/binutils/binutils-2.20.1/152_arm_branches_to_weak_symbols.patch create mode 100644 recipes/binutils/binutils-2.20.1/200_elflink_%B_fixes.patch create mode 100644 recipes/binutils/binutils-2.20.1/201_elflink_improve_noaddneeded_errors.patch create mode 100644 recipes/binutils/binutils-2.20.1/202_elflink_noaddneeded_vs_weak.patch create mode 100644 recipes/binutils/binutils-2.20.1/binutils-mips-pie.patch create mode 100644 recipes/binutils/binutils-2.20.1/binutils-poison.patch create mode 100644 recipes/binutils/binutils-2.20.1/libiberty_path_fix.patch create mode 100644 recipes/binutils/binutils-2.20.1/libtool-rpath-fix.patch
recipes/binutils/binutils-2.20.1/152_arm_branches_to_weak_symbols.patch new file +240 -0
@@ -0,0 +1,240 @@ +#!/bin/sh -e +## 152_arm_branches_to_weak_symbols.dpatch +## +## DP: Description: http://sourceware.org/ml/binutils/2010-04/msg00446.html +## DP: Description: taken from the trunk + +if [ $# -ne 1 ]; then + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1 +fi + +[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts +patch_opts="${patch_opts:--f --no-backup-if-mismatch}" + +case "$1" in + -patch) patch $patch_opts -p0 < $0;; + -unpatch) patch $patch_opts -p0 -R < $0;; + *) + echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" + exit 1;; +esac + +exit 0 + +gas/ + +2010-05-04 Nick Clifton <[email protected]> + + * write.c (fixup_segment): Revert previous delta. + * config/tc-arm.h (TC_FORCE_RELOCATION_LOCAL): Also force the + generation of relocations for fixups against weak symbols. + +2010-04-29 Nathan Sidwell <[email protected]> + + * write.c (fixup_segment): Do not assume we know the section a + defined weak symbol is in. + * config/tc-arm.c (relax_adr, relax_branch, md_apply_fix): Treat + weak symbols as not known to be in the same section, even if they + are defined. + +gas/testsuite/ + +2010-04-29 Nathan Sidwell <[email protected]> + + * gas/arm/weakdef-1.s: New. + * gas/arm/weakdef-1.d: New. + * gas/arm/weakdef-2.s: New. + * gas/arm/weakdef-2.d: New. + * gas/arm/weakdef-2.l: New. + +@DPATCH@ +diff -urN gas.orig/config/tc-arm.c gas/config/tc-arm.c +--- a/gas/config/tc-arm.c 2010-02-22 08:06:52.000000000 +0000 ++++ b/gas/config/tc-arm.c 2010-05-06 12:52:25.391085365 +0000 +@@ -18207,7 +18207,8 @@ + + /* Assume worst case for symbols not known to be in the same section. */ + if (!S_IS_DEFINED (fragp->fr_symbol) +- || sec != S_GET_SEGMENT (fragp->fr_symbol)) ++ || sec != S_GET_SEGMENT (fragp->fr_symbol) ++ || S_IS_WEAK (fragp->fr_symbol)) + return 4; + + val = relaxed_symbol_addr (fragp, stretch); +@@ -18250,7 +18251,8 @@ + + /* Assume worst case for symbols not known to be in the same section. */ + if (!S_IS_DEFINED (fragp->fr_symbol) +- || sec != S_GET_SEGMENT (fragp->fr_symbol)) ++ || sec != S_GET_SEGMENT (fragp->fr_symbol) ++ || S_IS_WEAK (fragp->fr_symbol)) + return 4; + + #ifdef OBJ_ELF +@@ -19463,22 +19465,23 @@ + not have a reloc for it, so tc_gen_reloc will reject it. */ + fixP->fx_done = 1; + +- if (fixP->fx_addsy +- && ! S_IS_DEFINED (fixP->fx_addsy)) ++ if (fixP->fx_addsy) + { +- as_bad_where (fixP->fx_file, fixP->fx_line, +- _("undefined symbol %s used as an immediate value"), +- S_GET_NAME (fixP->fx_addsy)); +- break; +- } ++ const char *msg = 0; + +- if (fixP->fx_addsy +- && S_GET_SEGMENT (fixP->fx_addsy) != seg) +- { +- as_bad_where (fixP->fx_file, fixP->fx_line, +- _("symbol %s is in a different section"), +- S_GET_NAME (fixP->fx_addsy)); +- break; ++ if (! S_IS_DEFINED (fixP->fx_addsy)) ++ msg = _("undefined symbol %s used as an immediate value"); ++ else if (S_GET_SEGMENT (fixP->fx_addsy) != seg) ++ msg = _("symbol %s is in a different section"); ++ else if (S_IS_WEAK (fixP->fx_addsy)) ++ msg = _("symbol %s is weak and may be overridden later"); ++ ++ if (msg) ++ { ++ as_bad_where (fixP->fx_file, fixP->fx_line, ++ msg, S_GET_NAME (fixP->fx_addsy)); ++ break; ++ } + } + + newimm = encode_arm_immediate (value); +@@ -19504,24 +19507,25 @@ + unsigned int highpart = 0; + unsigned int newinsn = 0xe1a00000; /* nop. */ + +- if (fixP->fx_addsy +- && ! S_IS_DEFINED (fixP->fx_addsy)) ++ if (fixP->fx_addsy) + { +- as_bad_where (fixP->fx_file, fixP->fx_line, +- _("undefined symbol %s used as an immediate value"), +- S_GET_NAME (fixP->fx_addsy)); +- break; +- } ++ const char *msg = 0; + +- if (fixP->fx_addsy +- && S_GET_SEGMENT (fixP->fx_addsy) != seg) +- { +- as_bad_where (fixP->fx_file, fixP->fx_line, +- _("symbol %s is in a different section"), +- S_GET_NAME (fixP->fx_addsy)); +- break; ++ if (! S_IS_DEFINED (fixP->fx_addsy)) ++ msg = _("undefined symbol %s used as an immediate value"); ++ else if (S_GET_SEGMENT (fixP->fx_addsy) != seg) ++ msg = _("symbol %s is in a different section"); ++ else if (S_IS_WEAK (fixP->fx_addsy)) ++ msg = _("symbol %s is weak and may be overridden later"); ++ ++ if (msg) ++ { ++ as_bad_where (fixP->fx_file, fixP->fx_line, ++ msg, S_GET_NAME (fixP->fx_addsy)); ++ break; ++ } + } +- ++ + newimm = encode_arm_immediate (value); + temp = md_chars_to_number (buf, INSN_SIZE); + +diff -urN gas.orig/config/tc-arm.h gas/config/tc-arm.h +--- a/gas/config/tc-arm.h 2009-09-01 00:24:01.000000000 +0000 ++++ b/gas/config/tc-arm.h 2010-05-06 12:53:42.784835970 +0000 +@@ -183,6 +183,7 @@ + (!(FIX)->fx_pcrel \ + || (FIX)->fx_r_type == BFD_RELOC_ARM_GOT32 \ + || (FIX)->fx_r_type == BFD_RELOC_32 \ ++ || ((FIX)->fx_addsy != NULL && S_IS_WEAK ((FIX)->fx_addsy)) \ + || TC_FORCE_RELOCATION (FIX)) + + /* Force output of R_ARM_REL32 relocations against thumb function symbols. +diff -urN gas.orig/testsuite/gas/arm/weakdef-1.d gas/testsuite/gas/arm/weakdef-1.d +--- a/gas/testsuite/gas/arm/weakdef-1.d 1970-01-01 00:00:00.000000000 +0000 ++++ b/gas/testsuite/gas/arm/weakdef-1.d 2010-05-06 12:52:25.391085365 +0000 +@@ -0,0 +1,20 @@ ++# name: Thumb branch to weak ++# as: ++# objdump: -dr ++# This test is only valid on ELF based ports. ++#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* ++ ++.*: +file format .*arm.* ++ ++ ++Disassembly of section .text: ++ ++0+000 <Weak>: ++ 0: e7fe b.n 2 <Strong> ++ 0: R_ARM_THM_JUMP11 Strong ++ ++0+002 <Strong>: ++ 2: f7ff bffe b.w 0 <Random> ++ 2: R_ARM_THM_JUMP24 Random ++ 6: f7ff bffe b.w 0 <Weak> ++ 6: R_ARM_THM_JUMP24 Weak +diff -urN gas.orig/testsuite/gas/arm/weakdef-1.s gas/testsuite/gas/arm/weakdef-1.s +--- a/gas/testsuite/gas/arm/weakdef-1.s 1970-01-01 00:00:00.000000000 +0000 ++++ b/gas/testsuite/gas/arm/weakdef-1.s 2010-05-06 12:52:25.391085365 +0000 +@@ -0,0 +1,18 @@ ++ .syntax unified ++ .text ++ .thumb ++ ++ .globl Weak ++ .weak Weak ++ .thumb_func ++ .type Weak, %function ++Weak: ++ b Strong ++ .size Weak, .-Weak ++ ++ .globl Strong ++ .type Strong, %function ++Strong: ++ b Random ++ b Weak ++ .size Strong, .-Strong +diff -urN gas.orig/testsuite/gas/arm/weakdef-2.d gas/testsuite/gas/arm/weakdef-2.d +--- a/gas/testsuite/gas/arm/weakdef-2.d 1970-01-01 00:00:00.000000000 +0000 ++++ b/gas/testsuite/gas/arm/weakdef-2.d 2010-05-06 12:52:25.391085365 +0000 +@@ -0,0 +1,5 @@ ++# name: adr of weak ++# as: ++# error-output: weakdef-2.l ++# This test is only valid on ELF based ports. ++#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* +diff -urN gas.orig/testsuite/gas/arm/weakdef-2.l gas/testsuite/gas/arm/weakdef-2.l +--- a/gas/testsuite/gas/arm/weakdef-2.l 1970-01-01 00:00:00.000000000 +0000 ++++ b/gas/testsuite/gas/arm/weakdef-2.l 2010-05-06 12:52:25.391085365 +0000 +@@ -0,0 +1,3 @@ ++[^:]*: Assembler messages: ++[^:]*:9: Error: symbol Weak is weak and may be overridden later ++[^:]*:10: Error: symbol Weak is weak and may be overridden later +diff -urN gas.orig/testsuite/gas/arm/weakdef-2.s gas/testsuite/gas/arm/weakdef-2.s +--- a/gas/testsuite/gas/arm/weakdef-2.s 1970-01-01 00:00:00.000000000 +0000 ++++ b/gas/testsuite/gas/arm/weakdef-2.s 2010-05-06 12:52:25.391085365 +0000 +@@ -0,0 +1,10 @@ ++ .syntax unified ++ .text ++ .globl Strong ++Strong: ++ adrl r0,Strong ++ adr r0,Strong ++ .globl Weak ++ .weak Weak ++Weak: adrl r0,Weak ++ adr r0,Weak
recipes/binutils/binutils-2.20.1/200_elflink_%B_fixes.patch new file +65 -0
65 lines not on this page · raw message
recipes/binutils/binutils-2.20.1/201_elflink_improve_noaddneeded_errors.patch new file +70 -0
70 lines not on this page · raw message
recipes/binutils/binutils-2.20.1/202_elflink_noaddneeded_vs_weak.patch new file +87 -0
87 lines not on this page · raw message
recipes/binutils/binutils-2.20.1/binutils-mips-pie.patch new file +29 -0
@@ -0,0 +1,29 @@ +# "-fPIE" always triggers segmentation fault in ld.so.1 on mips platform, +# which was first saw on dbus-daemon. Below borrow the binutils fix from +# binutils bugzilla: +# +# http://sourceware.org/bugzilla/show_bug.cgi?id=10858 +# +# Its commit message says: +# * elfxx-mips.c (mips_elf_create_dynamic_relocation): Use section +# sym dynindx for relocs against defined syms in PIEs. +# +# It's in upstream CVS now (rev 1.267), but not in current release +# +# By Kevin Tian <[email protected]>, 2010-07-15 + +diff --git a/elfxx-mips.c b/elfxx-mips.c +index 3a1c8ba..f6c2c1c 100644 +--- binutils-2.20.1.orig/bfd/elfxx-mips.c ++++ binutils-2.20.1/bfd/elfxx-mips.c +@@ -5688,9 +5688,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd, + + /* We must now calculate the dynamic symbol table index to use + in the relocation. */ +- if (h != NULL +- && (!h->root.def_regular +- || (info->shared && !info->symbolic && !h->root.forced_local))) ++ if (h != NULL && ! SYMBOL_REFERENCES_LOCAL (info, &h->root)) + { + indx = h->root.dynindx; + if (SGI_COMPAT (output_bfd))
recipes/binutils/binutils-2.20.1/binutils-poison.patch new file +253 -0
253 lines not on this page · raw message
recipes/binutils/binutils-2.20.1/libiberty_path_fix.patch new file +20 -0
@@ -0,0 +1,20 @@ +don't let the distro compiler point to the wrong installation location + +Thanks to RP for helping find the source code causing the issue. + +2010/08/13 +Nitin A Kamble <[email protected]> +Index: binutils-2.20.1/libiberty/Makefile.in +=================================================================== +--- binutils-2.20.1.orig/libiberty/Makefile.in ++++ binutils-2.20.1/libiberty/Makefile.in +@@ -327,7 +327,8 @@ install: install_to_$(INSTALL_DEST) inst + # multilib-specific flags, it's overridden by FLAGS_TO_PASS from the + # default multilib, so we have to take CFLAGS into account as well, + # since it will be passed the multilib flags. +-MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` ++#MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` ++MULTIOSDIR = "" + install_to_libdir: all + ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR) + $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n
recipes/binutils/binutils-2.20.1/libtool-rpath-fix.patch new file +36 -0
@@ -0,0 +1,36 @@ +Enabling sysroot support in libtool exposed a bug where the final +library had an RPATH encoded into it which still pointed to the +sysroot. This works around the issue until it gets sorted out +upstream. + +Fix suggested by Richard Purdie <[email protected]> +Signed-off-by: Scott Garman <[email protected]> + +diff -urN binutils-2.21.orig//ltmain.sh binutils-2.21/ltmain.sh +--- binutils-2.21.orig//ltmain.sh 2011-01-18 11:50:40.821710085 -0800 ++++ binutils-2.21/ltmain.sh 2011-01-18 11:51:38.774952785 -0800 +@@ -8035,9 +8035,11 @@ + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" + for libdir in $rpath; do + if test -n "$hardcode_libdir_flag_spec"; then ++ func_replace_sysroot "$libdir" ++ libdir=$func_replace_sysroot_result ++ func_stripname '=' '' "$libdir" ++ libdir=$func_stripname_result + if test -n "$hardcode_libdir_separator"; then +- func_replace_sysroot "$libdir" +- libdir=$func_replace_sysroot_result + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir" + else +@@ -8770,6 +8772,10 @@ + hardcode_libdirs= + for libdir in $compile_rpath $finalize_rpath; do + if test -n "$hardcode_libdir_flag_spec"; then ++ func_replace_sysroot "$libdir" ++ libdir=$func_replace_sysroot_result ++ func_stripname '=' '' "$libdir" ++ libdir=$func_stripname_result + if test -n "$hardcode_libdir_separator"; then + if test -z "$hardcode_libdirs"; then + hardcode_libdirs="$libdir"
recipes/binutils/binutils_2.20.1.bb +12 -4
@@ -1,13 +1,13 @@ require binutils.inc LICENSE = "GPLv3" -PR = "${INC_PR}.4" +PR = "${INC_PR}.5" EXTRA_OECONF += "--disable-werror" #COMPATIBLE_TARGET_SYS = "." SRC_URI = "\ - ${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2;name=tarball \ + ${GNU_MIRROR}/binutils/binutils-${PV}a.tar.bz2;name=tarball \ file://binutils-uclibc-100-uclibc-conf.patch \ file://110-arm-eabi-conf.patch \ file://binutils-uclibc-300-001_ld_makefile_patch.patch \
@@ -16,7 +16,15 @@ SRC_URI = "\ file://binutils-uclibc-gas-needs-libm.patch \ file://binutils-x86_64_i386_biarch.patch \ ${@['file://libtool-update.patch','file://libtool-2.4-update.patch'][bb.data.getVar('LIBTOOL_HAS_SYSROOT', d, 1) == 'yes']} \ + file://binutils-mips-pie.patch \ file://binutils-2.19.1-ld-sysroot.patch \ + file://libiberty_path_fix.patch \ + file://binutils-poison.patch \ + file://libtool-rpath-fix.patch \ + file://152_arm_branches_to_weak_symbols.patch \ + file://200_elflink_%B_fixes.patch \ + file://201_elflink_improve_noaddneeded_errors.patch \ + file://202_elflink_noaddneeded_vs_weak.patch \ " SRC_URI_append_nios2 =" \
@@ -24,8 +32,8 @@ SRC_URI_append_nios2 =" \ file://binutils-nios2.patch \ " -SRC_URI[tarball.sha256sum] = "228b84722d87e88e7fdd36869e590e649ab523a0800a7d53df906498afe6f6f8" -SRC_URI[tarball.md5sum] = "9cdfb9d6ec0578c166d3beae5e15c4e5" +SRC_URI[tarball.sha256sum] = "71d37c96451333c5c0b84b170169fdcb138bbb27397dc06281905d9717c8ed64" +SRC_URI[tarball.md5sum] = "2b9dc8f2b7dbd5ec5992c6e29de0b764" # powerpc patches SRC_URI += "\
Signature · 1 line
1.7.5.4