mirror of
https://git.yoctoproject.org/poky
synced 2026-07-17 04:07:06 +00:00
binutils: Upgrade 2.23.1 -> 2.23.2
(From OE-Core rev: 202f46b139ab20079e97cdeb147d59e23bcdfe01) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
+46
@@ -0,0 +1,46 @@
|
||||
The powerpc assembler can generate .PPC.EMB.apuinfo sections in some
|
||||
circumstances. These originate, I think, from the old e500 ABI; in
|
||||
any case, they are only defined for 32-bit ABIs, and there is a
|
||||
significant amount of code in bfd/elf32-ppc.c to handle them
|
||||
appropriately, none of which is in elf64-ppc.c. However, the
|
||||
assembler can generate them when building 64-bit code for processors
|
||||
such as e5500 (which uses PPC_OPCODE_E500MC). In such circumstances,
|
||||
they get generated as PROGBITS rather than NOTE sections, which
|
||||
reportedly can cause problems in a Linux kernel build.
|
||||
|
||||
Since these sections are only defined in 32-bit ABIs, I think it's
|
||||
most appropriate to avoid generating them for 64-bit output, which
|
||||
this patch does.
|
||||
|
||||
Upstream-Status: Backport
|
||||
|
||||
-Khem 2013/03/25
|
||||
|
||||
From d77411f56a85225e3f7b674e7172c712f6cd61cb Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Myers <joseph@codesourcery.com>
|
||||
Date: Fri, 25 Jan 2013 02:02:20 +0000
|
||||
Subject: [PATCH] * config/tc-ppc.c (md_assemble): Do not generate
|
||||
APUinfo sections for 64-bit output.
|
||||
|
||||
---
|
||||
gas/ChangeLog | 5 +++++
|
||||
gas/config/tc-ppc.c | 3 ++-
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
|
||||
index fd15bea..0929e52 100644
|
||||
--- a/gas/config/tc-ppc.c
|
||||
+++ b/gas/config/tc-ppc.c
|
||||
@@ -3249,7 +3249,8 @@ md_assemble (char *str)
|
||||
|
||||
#ifdef OBJ_ELF
|
||||
/* Do we need/want an APUinfo section? */
|
||||
- if ((ppc_cpu & (PPC_OPCODE_E500 | PPC_OPCODE_E500MC | PPC_OPCODE_VLE)) != 0)
|
||||
+ if ((ppc_cpu & (PPC_OPCODE_E500 | PPC_OPCODE_E500MC | PPC_OPCODE_VLE)) != 0
|
||||
+ && !ppc_obj64)
|
||||
{
|
||||
/* These are all version "1". */
|
||||
if (opcode->flags & PPC_OPCODE_SPE)
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
From e02bf9359f6ef7fe4d341aa5ac4f397f541b9ac3 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schwab <schwab@linux-m68k.org>
|
||||
Date: Fri, 4 Jan 2013 22:27:57 +0000
|
||||
Subject: [PATCH] * doc/binutils.texi (elfedit): Fix use of @itemx in @table.
|
||||
|
||||
---
|
||||
binutils/ChangeLog | 4 ++++
|
||||
binutils/doc/binutils.texi | 14 +++++++-------
|
||||
2 files changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
Upstream-Status: Backport
|
||||
Index: binutils-2.23.1/binutils/doc/binutils.texi
|
||||
===================================================================
|
||||
--- binutils-2.23.1.orig/binutils/doc/binutils.texi 2012-05-11 11:18:34.000000000 -0700
|
||||
+++ binutils-2.23.1/binutils/doc/binutils.texi 2013-02-26 12:41:51.785114224 -0800
|
||||
@@ -12,7 +12,7 @@
|
||||
@c man begin COPYRIGHT
|
||||
Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
||||
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||
-2010, 2011, 2012
|
||||
+2010, 2011, 2012, 2013
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
@@ -4375,7 +4375,7 @@
|
||||
|
||||
@table @env
|
||||
|
||||
-@itemx --input-mach=@var{machine}
|
||||
+@item --input-mach=@var{machine}
|
||||
Set the matching input ELF machine type to @var{machine}. If
|
||||
@option{--input-mach} isn't specified, it will match any ELF
|
||||
machine types.
|
||||
@@ -4383,21 +4383,21 @@
|
||||
The supported ELF machine types are, @var{L1OM}, @var{K1OM} and
|
||||
@var{x86-64}.
|
||||
|
||||
-@itemx --output-mach=@var{machine}
|
||||
+@item --output-mach=@var{machine}
|
||||
Change the ELF machine type in the ELF header to @var{machine}. The
|
||||
supported ELF machine types are the same as @option{--input-mach}.
|
||||
|
||||
-@itemx --input-type=@var{type}
|
||||
+@item --input-type=@var{type}
|
||||
Set the matching input ELF file type to @var{type}. If
|
||||
@option{--input-type} isn't specified, it will match any ELF file types.
|
||||
|
||||
The supported ELF file types are, @var{rel}, @var{exec} and @var{dyn}.
|
||||
|
||||
-@itemx --output-type=@var{type}
|
||||
+@item --output-type=@var{type}
|
||||
Change the ELF file type in the ELF header to @var{type}. The
|
||||
supported ELF types are the same as @option{--input-type}.
|
||||
|
||||
-@itemx --input-osabi=@var{osabi}
|
||||
+@item --input-osabi=@var{osabi}
|
||||
Set the matching input ELF file OSABI to @var{osabi}. If
|
||||
@option{--input-osabi} isn't specified, it will match any ELF OSABIs.
|
||||
|
||||
@@ -4407,7 +4407,7 @@
|
||||
@var{FreeBSD}, @var{TRU64}, @var{Modesto}, @var{OpenBSD}, @var{OpenVMS},
|
||||
@var{NSK}, @var{AROS} and @var{FenixOS}.
|
||||
|
||||
-@itemx --output-osabi=@var{osabi}
|
||||
+@item --output-osabi=@var{osabi}
|
||||
Change the ELF OSABI in the ELF header to @var{osabi}. The
|
||||
supported ELF OSABI are the same as @option{--input-osabi}.
|
||||
|
||||
+196
@@ -0,0 +1,196 @@
|
||||
From 935f85422863b42b6fbca30885885e3fa28eea36 Mon Sep 17 00:00:00 2001
|
||||
From: Nick Clifton <nickc@redhat.com>
|
||||
Date: Mon, 7 Jan 2013 12:11:11 +0000
|
||||
Subject: [PATCH] * ld.texinfo: Replace @ with @@ when it is part of
|
||||
the text. Correct ordering of M68HC11 entry.
|
||||
|
||||
* doc/binutils.texi: Fix ordering of top level nodes.
|
||||
Replace erroneous uses of @itemx with @item.
|
||||
|
||||
* bfd.texinfo: Replace @ with @@ when it is part of the text.
|
||||
---
|
||||
bfd/doc/ChangeLog | 4 ++++
|
||||
bfd/doc/bfd.texinfo | 12 +++++++-----
|
||||
binutils/ChangeLog | 5 +++++
|
||||
binutils/doc/binutils.texi | 8 ++++----
|
||||
ld/ChangeLog | 5 +++++
|
||||
ld/ld.texinfo | 26 ++++++++++++++------------
|
||||
6 files changed, 39 insertions(+), 21 deletions(-)
|
||||
|
||||
|
||||
Upstream-Status: Backport
|
||||
Index: binutils-2.23.1/bfd/doc/bfd.texinfo
|
||||
===================================================================
|
||||
--- binutils-2.23.1.orig/bfd/doc/bfd.texinfo 2010-10-28 04:40:25.000000000 -0700
|
||||
+++ binutils-2.23.1/bfd/doc/bfd.texinfo 2013-02-26 12:42:26.909115020 -0800
|
||||
@@ -1,7 +1,7 @@
|
||||
\input texinfo.tex
|
||||
@setfilename bfd.info
|
||||
@c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, 2000,
|
||||
-@c 2001, 2002, 2003, 2006, 2007, 2008, 2009
|
||||
+@c 2001, 2002, 2003, 2006, 2007, 2008, 2009, 2013
|
||||
@c Free Software Foundation, Inc.
|
||||
@c
|
||||
@synindex fn cp
|
||||
@@ -16,7 +16,8 @@
|
||||
@copying
|
||||
This file documents the BFD library.
|
||||
|
||||
-Copyright @copyright{} 1991, 2000, 2001, 2003, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
+Copyright @copyright{} 1991, 2000, 2001, 2003, 2006, 2007, 2008, 2013
|
||||
+Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
@@ -64,7 +65,8 @@
|
||||
@end tex
|
||||
|
||||
@vskip 0pt plus 1filll
|
||||
-Copyright @copyright{} 1991, 2001, 2003, 2006, 2008 Free Software Foundation, Inc.
|
||||
+Copyright @copyright{} 1991, 2001, 2003, 2006, 2008, 2013
|
||||
+Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3
|
||||
@@ -322,7 +324,7 @@
|
||||
@printindex cp
|
||||
|
||||
@tex
|
||||
-% I think something like @colophon should be in texinfo. In the
|
||||
+% I think something like @@colophon should be in texinfo. In the
|
||||
% meantime:
|
||||
\long\def\colophon{\hbox to0pt{}\vfill
|
||||
\centerline{The body of this manual is set in}
|
||||
@@ -333,7 +335,7 @@
|
||||
\centerline{{\sl\fontname\tensl\/}}
|
||||
\centerline{are used for emphasis.}\vfill}
|
||||
\page\colophon
|
||||
-% Blame: doc@cygnus.com, 28mar91.
|
||||
+% Blame: doc@@cygnus.com, 28mar91.
|
||||
@end tex
|
||||
|
||||
@bye
|
||||
Index: binutils-2.23.1/binutils/doc/binutils.texi
|
||||
===================================================================
|
||||
--- binutils-2.23.1.orig/binutils/doc/binutils.texi 2013-02-26 12:41:51.000000000 -0800
|
||||
+++ binutils-2.23.1/binutils/doc/binutils.texi 2013-02-26 12:42:26.913115010 -0800
|
||||
@@ -148,18 +148,18 @@
|
||||
* objcopy:: Copy and translate object files
|
||||
* objdump:: Display information from object files
|
||||
* ranlib:: Generate index to archive contents
|
||||
-* readelf:: Display the contents of ELF format files
|
||||
* size:: List section sizes and total size
|
||||
* strings:: List printable strings from files
|
||||
* strip:: Discard symbols
|
||||
-* elfedit:: Update the ELF header of ELF files
|
||||
* c++filt:: Filter to demangle encoded C++ symbols
|
||||
* cxxfilt: c++filt. MS-DOS name for c++filt
|
||||
* addr2line:: Convert addresses to file and line
|
||||
* nlmconv:: Converts object code into an NLM
|
||||
-* windres:: Manipulate Windows resources
|
||||
* windmc:: Generator for Windows message resources
|
||||
+* windres:: Manipulate Windows resources
|
||||
* dlltool:: Create files needed to build and use DLLs
|
||||
+* readelf:: Display the contents of ELF format files
|
||||
+* elfedit:: Update the ELF header of ELF files
|
||||
* Common Options:: Command-line options for all utilities
|
||||
* Selecting the Target System:: How these utilities determine the target
|
||||
* Reporting Bugs:: Reporting Bugs
|
||||
@@ -2898,7 +2898,7 @@
|
||||
@c man end
|
||||
@end ignore
|
||||
|
||||
-@node c++filt, addr2line, elfedit, Top
|
||||
+@node c++filt, addr2line, strip, Top
|
||||
@chapter c++filt
|
||||
|
||||
@kindex c++filt
|
||||
Index: binutils-2.23.1/ld/ld.texinfo
|
||||
===================================================================
|
||||
--- binutils-2.23.1.orig/ld/ld.texinfo 2013-02-19 14:26:56.571782665 -0800
|
||||
+++ binutils-2.23.1/ld/ld.texinfo 2013-02-26 12:45:20.677119476 -0800
|
||||
@@ -1,7 +1,8 @@
|
||||
\input texinfo
|
||||
@setfilename ld.info
|
||||
@c Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
-@c 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
|
||||
+@c 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
|
||||
+@c 2012, 2013
|
||||
@c Free Software Foundation, Inc.
|
||||
@syncodeindex ky cp
|
||||
@c man begin INCLUDE
|
||||
@@ -55,7 +56,8 @@
|
||||
version @value{VERSION}.
|
||||
|
||||
Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
|
||||
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||
+2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012, 2013
|
||||
+Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3
|
||||
@@ -93,8 +95,8 @@
|
||||
@vskip 0pt plus 1filll
|
||||
@c man begin COPYRIGHT
|
||||
Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
||||
-1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
|
||||
-Software Foundation, Inc.
|
||||
+1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
|
||||
+2012, 2013 Free Software Foundation, Inc.
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
under the terms of the GNU Free Documentation License, Version 1.3
|
||||
@@ -142,12 +144,12 @@
|
||||
@ifset ARM
|
||||
* ARM:: ld and the ARM family
|
||||
@end ifset
|
||||
-@ifset HPPA
|
||||
-* HPPA ELF32:: ld and HPPA 32-bit ELF
|
||||
-@end ifset
|
||||
@ifset M68HC11
|
||||
* M68HC11/68HC12:: ld and the Motorola 68HC11 and 68HC12 families
|
||||
@end ifset
|
||||
+@ifset HPPA
|
||||
+* HPPA ELF32:: ld and HPPA 32-bit ELF
|
||||
+@end ifset
|
||||
@ifset M68K
|
||||
* M68K:: ld and Motorola 68K family
|
||||
@end ifset
|
||||
@@ -6003,6 +6005,9 @@
|
||||
@ifset I960
|
||||
* i960:: @command{ld} and the Intel 960 family
|
||||
@end ifset
|
||||
+@ifset M68HC11
|
||||
+* M68HC11/68HC12:: @code{ld} and the Motorola 68HC11 and 68HC12 families
|
||||
+@end ifset
|
||||
@ifset ARM
|
||||
* ARM:: @command{ld} and the ARM family
|
||||
@end ifset
|
||||
@@ -6018,9 +6023,6 @@
|
||||
@ifset MSP430
|
||||
* MSP430:: @command{ld} and MSP430
|
||||
@end ifset
|
||||
-@ifset M68HC11
|
||||
-* M68HC11/68HC12:: @code{ld} and the Motorola 68HC11 and 68HC12 families
|
||||
-@end ifset
|
||||
@ifset POWERPC
|
||||
* PowerPC ELF32:: @command{ld} and PowerPC 32-bit ELF Support
|
||||
@end ifset
|
||||
@@ -7868,7 +7870,7 @@
|
||||
@printindex cp
|
||||
|
||||
@tex
|
||||
-% I think something like @colophon should be in texinfo. In the
|
||||
+% I think something like @@colophon should be in texinfo. In the
|
||||
% meantime:
|
||||
\long\def\colophon{\hbox to0pt{}\vfill
|
||||
\centerline{The body of this manual is set in}
|
||||
@@ -7879,7 +7881,7 @@
|
||||
\centerline{{\sl\fontname\tensl\/}}
|
||||
\centerline{are used for emphasis.}\vfill}
|
||||
\page\colophon
|
||||
-% Blame: doc@cygnus.com, 28mar91.
|
||||
+% Blame: doc@@cygnus.com, 28mar91.
|
||||
@end tex
|
||||
|
||||
@bye
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
Upstream-Status: Backport
|
||||
|
||||
* elf32-xtensa.c
|
||||
* (free_section_cache): Renamed from clear_section_cache.
|
||||
* (section_cache_section): Remove ineffectual zero of cache.
|
||||
Call init_section_cache instead.
|
||||
|
||||
binutils build might fail on recent Linux distros:
|
||||
binutils-2.23.1/bfd/elf32-xtensa.c:6078:36: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
|
||||
memset (sec_cache, 0, sizeof (sec_cache));
|
||||
^
|
||||
binutils-2.23.1/bfd/elf32-xtensa.c:6120:32: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess]
|
||||
memset (sec_cache, 0, sizeof (sec_cache));
|
||||
|
||||
The original commit is http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf32-xtensa.c.diff?r1=1.135&r2=1.136&cvsroot=src
|
||||
|
||||
Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
|
||||
|
||||
--- binutils-2.23.1/bfd/elf32-xtensa.c.org 2013-03-12 03:04:29.000000000 -0500
|
||||
+++ binutils-2.23.1/bfd/elf32-xtensa.c 2013-03-12 03:06:37.000000000 -0500
|
||||
@@ -6067,7 +6067,7 @@
|
||||
|
||||
|
||||
static void
|
||||
-clear_section_cache (section_cache_t *sec_cache)
|
||||
+free_section_cache (section_cache_t *sec_cache)
|
||||
{
|
||||
if (sec_cache->sec)
|
||||
{
|
||||
@@ -6075,7 +6075,6 @@
|
||||
release_internal_relocs (sec_cache->sec, sec_cache->relocs);
|
||||
if (sec_cache->ptbl)
|
||||
free (sec_cache->ptbl);
|
||||
- memset (sec_cache, 0, sizeof (sec_cache));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6116,8 +6115,8 @@
|
||||
goto err;
|
||||
|
||||
/* Fill in the new section cache. */
|
||||
- clear_section_cache (sec_cache);
|
||||
- memset (sec_cache, 0, sizeof (sec_cache));
|
||||
+ free_section_cache (sec_cache);
|
||||
+ init_section_cache (sec_cache);
|
||||
|
||||
sec_cache->sec = sec;
|
||||
sec_cache->contents = contents;
|
||||
@@ -8272,8 +8271,9 @@
|
||||
#endif /* DEBUG */
|
||||
|
||||
error_return:
|
||||
- if (prop_table) free (prop_table);
|
||||
- clear_section_cache (&target_sec_cache);
|
||||
+ if (prop_table)
|
||||
+ free (prop_table);
|
||||
+ free_section_cache (&target_sec_cache);
|
||||
|
||||
release_contents (sec, contents);
|
||||
release_internal_relocs (sec, internal_relocs);
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
Upstream-Status: Backport
|
||||
|
||||
* arc-dis.c (write_comments_): Don't use strncat due to
|
||||
the size of state->commentBuffer pointer isn't predictable.
|
||||
|
||||
binutils build will fail on Fedora18+.
|
||||
binutils-2.23.1/opcodes/arc-dis.c:430:13: error: argument to 'sizeof' in '__builtin_strncat' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess]
|
||||
sizeof (state->commentBuffer));
|
||||
^
|
||||
|
||||
The original commit is http://sourceware.org/cgi-bin/cvsweb.cgi/src/opcodes/arc-dis.c.diff?r1=1.17&r2=1.18&cvsroot=src
|
||||
|
||||
Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
|
||||
|
||||
--- binutils-2.23.1/opcodes/arc-dis.c.orig 2013-03-13 00:10:27.978498158 -0500
|
||||
+++ binutils-2.23.1/opcodes/arc-dis.c 2013-03-13 00:11:28.297499381 -0500
|
||||
@@ -426,8 +426,7 @@
|
||||
strcpy (state->commentBuffer, comment_prefix);
|
||||
else
|
||||
strcat (state->commentBuffer, ", ");
|
||||
- strncat (state->commentBuffer, state->comm[i],
|
||||
- sizeof (state->commentBuffer));
|
||||
+ strcat (state->commentBuffer, state->comm[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
Add the armv5e architecture to binutils
|
||||
|
||||
Binutils has a comment that indicates it is supposed to match gcc for all of
|
||||
the support "-march=" settings, but it was lacking the armv5e setting. This
|
||||
was a simple way to add it, as thumb instructions shouldn't be generated by
|
||||
the compiler anyway.
|
||||
|
||||
Upstream-Status: Denied
|
||||
Upstream maintainer indicated that we should not be using armv5e, even though
|
||||
it is a legal archicture defined by our gcc.
|
||||
|
||||
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
|
||||
Index: binutils-2.22.90/gas/config/tc-arm.c
|
||||
===================================================================
|
||||
--- binutils-2.22.90.orig/gas/config/tc-arm.c 2012-07-24 09:38:32.000000000 -0700
|
||||
+++ binutils-2.22.90/gas/config/tc-arm.c 2012-08-07 23:41:59.822564075 -0700
|
||||
@@ -23162,6 +23162,7 @@
|
||||
ARM_ARCH_OPT ("armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA),
|
||||
ARM_ARCH_OPT ("armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA),
|
||||
ARM_ARCH_OPT ("armv5", ARM_ARCH_V5, FPU_ARCH_VFP),
|
||||
+ ARM_ARCH_OPT ("armv5e", ARM_ARCH_V5TE, FPU_ARCH_VFP),
|
||||
ARM_ARCH_OPT ("armv5t", ARM_ARCH_V5T, FPU_ARCH_VFP),
|
||||
ARM_ARCH_OPT ("armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP),
|
||||
ARM_ARCH_OPT ("armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP),
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
Upstream-Status: Pending
|
||||
|
||||
binutils build fails on Fedora18+ due to over array bounds issue:
|
||||
binutils-2.23.1/opcodes/rl78-dis.c:230:13: error: array subscript is above array bounds [-Werror=array-bounds]
|
||||
if (oper->use_es && indirect_type (oper->type))
|
||||
^
|
||||
|
||||
Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
|
||||
|
||||
--- binutils-2.23.1/opcodes/rl78-dis.c.orig 2013-03-12 22:17:47.664361066 -0500
|
||||
+++ binutils-2.23.1/opcodes/rl78-dis.c 2013-03-12 23:39:51.383460914 -0500
|
||||
@@ -221,7 +221,7 @@
|
||||
|
||||
case '0':
|
||||
case '1':
|
||||
- oper = opcode.op + *s - '0';
|
||||
+ oper = &opcode.op[*s - '0'];
|
||||
if (do_bang)
|
||||
PC ('!');
|
||||
|
||||
@@ -0,0 +1,259 @@
|
||||
Upstream-Status: Inappropriate [distribution: codesourcery]
|
||||
|
||||
Patch originally created by Mark Hatle, forward-ported to
|
||||
binutils 2.21 by Scott Garman.
|
||||
|
||||
purpose: warn for uses of system directories when cross linking
|
||||
|
||||
Code Merged from Sourcery G++ binutils 2.19 - 4.4-277
|
||||
|
||||
2008-07-02 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
ld/
|
||||
* ld.h (args_type): Add error_poison_system_directories.
|
||||
* ld.texinfo (--error-poison-system-directories): Document.
|
||||
* ldfile.c (ldfile_add_library_path): Check
|
||||
command_line.error_poison_system_directories.
|
||||
* ldmain.c (main): Initialize
|
||||
command_line.error_poison_system_directories.
|
||||
* lexsup.c (enum option_values): Add
|
||||
OPTION_ERROR_POISON_SYSTEM_DIRECTORIES.
|
||||
(ld_options): Add --error-poison-system-directories.
|
||||
(parse_args): Handle new option.
|
||||
|
||||
2007-06-13 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
ld/
|
||||
* config.in: Regenerate.
|
||||
* ld.h (args_type): Add poison_system_directories.
|
||||
* ld.texinfo (--no-poison-system-directories): Document.
|
||||
* ldfile.c (ldfile_add_library_path): Check
|
||||
command_line.poison_system_directories.
|
||||
* ldmain.c (main): Initialize
|
||||
command_line.poison_system_directories.
|
||||
* lexsup.c (enum option_values): Add
|
||||
OPTION_NO_POISON_SYSTEM_DIRECTORIES.
|
||||
(ld_options): Add --no-poison-system-directories.
|
||||
(parse_args): Handle new option.
|
||||
|
||||
2007-04-20 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
Merge from Sourcery G++ binutils 2.17:
|
||||
|
||||
2007-03-20 Joseph Myers <joseph@codesourcery.com>
|
||||
Based on patch by Mark Hatle <mark.hatle@windriver.com>.
|
||||
ld/
|
||||
* configure.in (--enable-poison-system-directories): New option.
|
||||
* configure, config.in: Regenerate.
|
||||
* ldfile.c (ldfile_add_library_path): If
|
||||
ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib,
|
||||
/usr/lib, /usr/local/lib or /usr/X11R6/lib.
|
||||
|
||||
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
|
||||
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
|
||||
|
||||
Index: binutils-2.22.90/ld/config.in
|
||||
===================================================================
|
||||
--- binutils-2.22.90.orig/ld/config.in 2012-05-17 08:13:21.000000000 -0700
|
||||
+++ binutils-2.22.90/ld/config.in 2012-08-07 23:09:34.834490113 -0700
|
||||
@@ -11,6 +11,9 @@
|
||||
language is requested. */
|
||||
#undef ENABLE_NLS
|
||||
|
||||
+/* Define to warn for use of native system library directories */
|
||||
+#undef ENABLE_POISON_SYSTEM_DIRECTORIES
|
||||
+
|
||||
/* Additional extension a shared object might have. */
|
||||
#undef EXTRA_SHLIB_EXTENSION
|
||||
|
||||
Index: binutils-2.22.90/ld/configure
|
||||
===================================================================
|
||||
--- binutils-2.22.90.orig/ld/configure 2012-08-07 23:08:50.000000000 -0700
|
||||
+++ binutils-2.22.90/ld/configure 2012-08-07 23:09:34.838490177 -0700
|
||||
@@ -776,6 +776,7 @@
|
||||
enable_targets
|
||||
enable_64_bit_bfd
|
||||
with_sysroot
|
||||
+enable_poison_system_directories
|
||||
enable_gold
|
||||
enable_got
|
||||
enable_werror
|
||||
@@ -1432,6 +1433,8 @@
|
||||
(and sometimes confusing) to the casual installer
|
||||
--enable-targets alternative target configurations
|
||||
--enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
|
||||
+ --enable-poison-system-directories
|
||||
+ warn for use of native system library directories
|
||||
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
|
||||
--enable-got=<type> GOT handling scheme (target, single, negative,
|
||||
multigot)
|
||||
@@ -4344,7 +4347,18 @@
|
||||
fi
|
||||
|
||||
|
||||
+# Check whether --enable-poison-system-directories was given.
|
||||
+if test "${enable_poison_system_directories+set}" = set; then :
|
||||
+ enableval=$enable_poison_system_directories;
|
||||
+else
|
||||
+ enable_poison_system_directories=no
|
||||
+fi
|
||||
+
|
||||
+if test "x${enable_poison_system_directories}" = "xyes"; then
|
||||
|
||||
+$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h
|
||||
+
|
||||
+fi
|
||||
|
||||
# Check whether --enable-got was given.
|
||||
if test "${enable_got+set}" = set; then :
|
||||
Index: binutils-2.22.90/ld/configure.in
|
||||
===================================================================
|
||||
--- binutils-2.22.90.orig/ld/configure.in 2012-05-17 08:13:23.000000000 -0700
|
||||
+++ binutils-2.22.90/ld/configure.in 2012-08-07 23:09:34.838490177 -0700
|
||||
@@ -70,6 +70,16 @@
|
||||
AC_SUBST(TARGET_SYSTEM_ROOT)
|
||||
AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
|
||||
|
||||
+AC_ARG_ENABLE([poison-system-directories],
|
||||
+ AS_HELP_STRING([--enable-poison-system-directories],
|
||||
+ [warn for use of native system library directories]),,
|
||||
+ [enable_poison_system_directories=no])
|
||||
+if test "x${enable_poison_system_directories}" = "xyes"; then
|
||||
+ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES],
|
||||
+ [1],
|
||||
+ [Define to warn for use of native system library directories])
|
||||
+fi
|
||||
+
|
||||
dnl Use --enable-gold to decide if this linker should be the default.
|
||||
dnl "install_as_default" is set to false if gold is the default linker.
|
||||
dnl "installed_linker" is the installed BFD linker name.
|
||||
Index: binutils-2.22.90/ld/ldfile.c
|
||||
===================================================================
|
||||
--- binutils-2.22.90.orig/ld/ldfile.c 2012-07-13 06:20:26.000000000 -0700
|
||||
+++ binutils-2.22.90/ld/ldfile.c 2012-08-07 23:30:35.166538044 -0700
|
||||
@@ -116,6 +116,23 @@
|
||||
new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL);
|
||||
else
|
||||
new_dirs->name = xstrdup (name);
|
||||
+
|
||||
+#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES
|
||||
+ if (command_line.poison_system_directories
|
||||
+ && ((!strncmp (name, "/lib", 4))
|
||||
+ || (!strncmp (name, "/usr/lib", 8))
|
||||
+ || (!strncmp (name, "/usr/local/lib", 14))
|
||||
+ || (!strncmp (name, "/usr/X11R6/lib", 14))))
|
||||
+ {
|
||||
+ if (command_line.error_poison_system_directories)
|
||||
+ einfo (_("%X%P: error: library search path \"%s\" is unsafe for "
|
||||
+ "cross-compilation\n"), name);
|
||||
+ else
|
||||
+ einfo (_("%P: warning: library search path \"%s\" is unsafe for "
|
||||
+ "cross-compilation\n"), name);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
}
|
||||
|
||||
/* Try to open a BFD for a lang_input_statement. */
|
||||
Index: binutils-2.22.90/ld/ld.h
|
||||
===================================================================
|
||||
--- binutils-2.22.90.orig/ld/ld.h 2012-07-09 23:50:55.000000000 -0700
|
||||
+++ binutils-2.22.90/ld/ld.h 2012-08-07 23:09:34.838490177 -0700
|
||||
@@ -203,6 +203,14 @@
|
||||
/* If TRUE we'll just print the default output on stdout. */
|
||||
bfd_boolean print_output_format;
|
||||
|
||||
+ /* If TRUE (the default) warn for uses of system directories when
|
||||
+ cross linking. */
|
||||
+ bfd_boolean poison_system_directories;
|
||||
+
|
||||
+ /* If TRUE (default FALSE) give an error for uses of system
|
||||
+ directories when cross linking instead of a warning. */
|
||||
+ bfd_boolean error_poison_system_directories;
|
||||
+
|
||||
/* Big or little endian as set on command line. */
|
||||
enum endian_enum endian;
|
||||
|
||||
Index: binutils-2.22.90/ld/ldmain.c
|
||||
===================================================================
|
||||
--- binutils-2.22.90.orig/ld/ldmain.c 2012-07-13 06:20:26.000000000 -0700
|
||||
+++ binutils-2.22.90/ld/ldmain.c 2012-08-07 23:09:34.846490172 -0700
|
||||
@@ -265,6 +265,8 @@
|
||||
command_line.warn_search_mismatch = TRUE;
|
||||
command_line.check_section_addresses = -1;
|
||||
command_line.disable_target_specific_optimizations = -1;
|
||||
+ command_line.poison_system_directories = TRUE;
|
||||
+ command_line.error_poison_system_directories = FALSE;
|
||||
|
||||
/* We initialize DEMANGLING based on the environment variable
|
||||
COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the
|
||||
Index: binutils-2.22.90/ld/ld.texinfo
|
||||
===================================================================
|
||||
--- binutils-2.22.90.orig/ld/ld.texinfo 2012-07-09 23:50:55.000000000 -0700
|
||||
+++ binutils-2.22.90/ld/ld.texinfo 2012-08-07 23:09:34.850490143 -0700
|
||||
@@ -2147,6 +2147,18 @@
|
||||
|
||||
Passing @code{none} for @var{style} disables the setting from any
|
||||
@code{--build-id} options earlier on the command line.
|
||||
+
|
||||
+@kindex --no-poison-system-directories
|
||||
+@item --no-poison-system-directories
|
||||
+Do not warn for @option{-L} options using system directories such as
|
||||
+@file{/usr/lib} when cross linking. This option is intended for use
|
||||
+in chroot environments when such directories contain the correct
|
||||
+libraries for the target system rather than the host.
|
||||
+
|
||||
+@kindex --error-poison-system-directories
|
||||
+@item --error-poison-system-directories
|
||||
+Give an error instead of a warning for @option{-L} options using
|
||||
+system directories when cross linking.
|
||||
@end table
|
||||
|
||||
@c man end
|
||||
Index: binutils-2.22.90/ld/lexsup.c
|
||||
===================================================================
|
||||
--- binutils-2.22.90.orig/ld/lexsup.c 2012-07-13 06:20:26.000000000 -0700
|
||||
+++ binutils-2.22.90/ld/lexsup.c 2012-08-07 23:09:34.850490143 -0700
|
||||
@@ -496,6 +496,14 @@
|
||||
TWO_DASHES },
|
||||
{ {"wrap", required_argument, NULL, OPTION_WRAP},
|
||||
'\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES },
|
||||
+ { {"no-poison-system-directories", no_argument, NULL,
|
||||
+ OPTION_NO_POISON_SYSTEM_DIRECTORIES},
|
||||
+ '\0', NULL, N_("Do not warn for -L options using system directories"),
|
||||
+ TWO_DASHES },
|
||||
+ { {"error-poison-system-directories", no_argument, NULL,
|
||||
+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES},
|
||||
+ '\0', NULL, N_("Give an error for -L options using system directories"),
|
||||
+ TWO_DASHES },
|
||||
};
|
||||
|
||||
#define OPTION_COUNT ARRAY_SIZE (ld_options)
|
||||
@@ -1424,6 +1432,14 @@
|
||||
einfo (_("%P%X: --hash-size needs a numeric argument\n"));
|
||||
}
|
||||
break;
|
||||
+
|
||||
+ case OPTION_NO_POISON_SYSTEM_DIRECTORIES:
|
||||
+ command_line.poison_system_directories = FALSE;
|
||||
+ break;
|
||||
+
|
||||
+ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES:
|
||||
+ command_line.error_poison_system_directories = TRUE;
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
|
||||
Index: binutils-2.22.90/ld/ldlex.h
|
||||
===================================================================
|
||||
--- binutils-2.22.90.orig/ld/ldlex.h 2012-05-26 04:13:19.000000000 -0700
|
||||
+++ binutils-2.22.90/ld/ldlex.h 2012-08-07 23:34:17.122546581 -0700
|
||||
@@ -135,6 +135,8 @@
|
||||
#endif /* ENABLE_PLUGINS */
|
||||
OPTION_DEFAULT_SCRIPT,
|
||||
OPTION_PRINT_OUTPUT_FORMAT,
|
||||
+ OPTION_NO_POISON_SYSTEM_DIRECTORIES,
|
||||
+ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES
|
||||
};
|
||||
|
||||
/* The initial parser states. */
|
||||
@@ -0,0 +1,40 @@
|
||||
Upstream-Status: Pending
|
||||
|
||||
Index: binutils-2.22/configure
|
||||
===================================================================
|
||||
--- binutils-2.22.orig/configure
|
||||
+++ binutils-2.22/configure
|
||||
@@ -3130,7 +3130,7 @@ case "${target}" in
|
||||
;;
|
||||
s390-*-* | s390x-*-*)
|
||||
;;
|
||||
- sh-*-* | sh[34]*-*-*)
|
||||
+ sh*-*-* | sh[34]*-*-*)
|
||||
;;
|
||||
sh64-*-* | sh5*-*-*)
|
||||
;;
|
||||
@@ -3570,7 +3570,7 @@ case "${target}" in
|
||||
mips*-*-*)
|
||||
noconfigdirs="$noconfigdirs gprof"
|
||||
;;
|
||||
- sh-*-* | sh64-*-*)
|
||||
+ sh*-*-* | sh64-*-*)
|
||||
case "${target}" in
|
||||
sh*-*-elf)
|
||||
;;
|
||||
Index: binutils-2.22/gprof/configure
|
||||
===================================================================
|
||||
--- binutils-2.22.orig/gprof/configure
|
||||
+++ binutils-2.22/gprof/configure
|
||||
@@ -6103,6 +6103,11 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
+linux-uclibc*)
|
||||
+ lt_cv_deplibs_check_method=pass_all
|
||||
+ lt_cv_file_magic_test_file=`echo /lib/libuClibc-*.so`
|
||||
+ ;;
|
||||
+
|
||||
netbsd*)
|
||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
#!/bin/sh -e
|
||||
## 001_ld_makefile_patch.dpatch
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Description: correct where ld scripts are installed
|
||||
## DP: Author: Chris Chimelis <chris@debian.org>
|
||||
## DP: Upstream status: N/A
|
||||
## DP: Date: ??
|
||||
|
||||
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 -p1 < $0;;
|
||||
-unpatch) patch $patch_opts -p1 -R < $0;;
|
||||
*)
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Upstream-Status: Inappropriate [debian patch]
|
||||
|
||||
@DPATCH@
|
||||
Index: binutils-2.22/ld/Makefile.am
|
||||
===================================================================
|
||||
--- binutils-2.22.orig/ld/Makefile.am
|
||||
+++ binutils-2.22/ld/Makefile.am
|
||||
@@ -37,7 +37,7 @@ endif
|
||||
# We put the scripts in the directory $(scriptdir)/ldscripts.
|
||||
# We can't put the scripts in $(datadir) because the SEARCH_DIR
|
||||
# directives need to be different for native and cross linkers.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
|
||||
EMUL = @EMUL@
|
||||
EMULATION_OFILES = @EMULATION_OFILES@
|
||||
Index: binutils-2.22/ld/Makefile.in
|
||||
===================================================================
|
||||
--- binutils-2.22.orig/ld/Makefile.in
|
||||
+++ binutils-2.22/ld/Makefile.in
|
||||
@@ -366,7 +366,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
|
||||
# We put the scripts in the directory $(scriptdir)/ldscripts.
|
||||
# We can't put the scripts in $(datadir) because the SEARCH_DIR
|
||||
# directives need to be different for native and cross linkers.
|
||||
-scriptdir = $(tooldir)/lib
|
||||
+scriptdir = $(libdir)
|
||||
BASEDIR = $(srcdir)/..
|
||||
BFDDIR = $(BASEDIR)/bfd
|
||||
INCDIR = $(BASEDIR)/include
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
#!/bin/sh -e
|
||||
## 006_better_file_error.dpatch by David Kimdon <dwhedon@gordian.com>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Specify which filename is causing an error if the filename is a
|
||||
## DP: directory. (#45832)
|
||||
|
||||
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 -p1 < $0;;
|
||||
-unpatch) patch $patch_opts -p1 -R < $0;;
|
||||
*)
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Upstream-Status: Inappropriate [debian patch]
|
||||
|
||||
@DPATCH@
|
||||
Index: binutils-2.22/bfd/opncls.c
|
||||
===================================================================
|
||||
--- binutils-2.22.orig/bfd/opncls.c
|
||||
+++ binutils-2.22/bfd/opncls.c
|
||||
@@ -197,6 +197,13 @@ bfd_fopen (const char *filename, const c
|
||||
{
|
||||
bfd *nbfd;
|
||||
const bfd_target *target_vec;
|
||||
+ struct stat s;
|
||||
+
|
||||
+ if (stat (filename, &s) == 0)
|
||||
+ if (S_ISDIR(s.st_mode)) {
|
||||
+ bfd_set_error (bfd_error_file_not_recognized);
|
||||
+ return NULL;
|
||||
+ }
|
||||
|
||||
nbfd = _bfd_new_bfd ();
|
||||
if (nbfd == NULL)
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
#!/bin/sh -e
|
||||
## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
|
||||
##
|
||||
## All lines beginning with `## DP:' are a description of the patch.
|
||||
## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
|
||||
## DP: cases where -rpath isn't specified. (#151024)
|
||||
|
||||
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 -p1 < $0;;
|
||||
-unpatch) patch $patch_opts -p1 -R < $0;;
|
||||
*)
|
||||
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
|
||||
exit 1;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Upstream-Status: Inappropriate [debian patch]
|
||||
|
||||
@DPATCH@
|
||||
Index: binutils-2.22/ld/emultempl/elf32.em
|
||||
===================================================================
|
||||
--- binutils-2.22.orig/ld/emultempl/elf32.em
|
||||
+++ binutils-2.22/ld/emultempl/elf32.em
|
||||
@@ -1273,6 +1273,8 @@ fragment <<EOF
|
||||
&& command_line.rpath == NULL)
|
||||
{
|
||||
lib_path = (const char *) getenv ("LD_RUN_PATH");
|
||||
+ if ((lib_path) && (strlen (lib_path) == 0))
|
||||
+ lib_path = NULL;
|
||||
if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
|
||||
force))
|
||||
break;
|
||||
@@ -1500,6 +1502,8 @@ gld${EMULATION_NAME}_before_allocation (
|
||||
rpath = command_line.rpath;
|
||||
if (rpath == NULL)
|
||||
rpath = (const char *) getenv ("LD_RUN_PATH");
|
||||
+ if ((rpath) && (strlen (rpath) == 0))
|
||||
+ rpath = NULL;
|
||||
|
||||
for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
|
||||
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
|
||||
@@ -0,0 +1,38 @@
|
||||
Source: Khem Raj <raj.khem@gmail.com>
|
||||
Disposition: submit upstream.
|
||||
Upstream-Status: Pending
|
||||
|
||||
Description:
|
||||
|
||||
We do not need to have the libtool patch anymore for binutils after
|
||||
libtool has been updated upstream it include support for it. However
|
||||
for building gas natively on uclibc systems we have to link it with
|
||||
-lm so that it picks up missing symbols.
|
||||
|
||||
/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_from_double':
|
||||
floatformat.c:(.text+0x1ec): undefined reference to `frexp'
|
||||
floatformat.c:(.text+0x2f8): undefined reference to `ldexp'
|
||||
/local/build_area/BUILD/arm_v5t_le_uclibc/binutils-2.17.50/objdir/libiberty/pic/libiberty.a(floatformat.o): In function `floatformat_to_double':
|
||||
floatformat.c:(.text+0x38a): undefined reference to `ldexp'
|
||||
floatformat.c:(.text+0x3d2): undefined reference to `ldexp'
|
||||
floatformat.c:(.text+0x43e): undefined reference to `ldexp' floatformat.c:(.text+0x4e2): undefined reference to `ldexp'
|
||||
collect2: ld returned 1 exit status
|
||||
make[4]: *** [as-new] Error 1
|
||||
|
||||
Index: binutils-2.22/gas/configure.tgt
|
||||
===================================================================
|
||||
--- binutils-2.22.orig/gas/configure.tgt
|
||||
+++ binutils-2.22/gas/configure.tgt
|
||||
@@ -428,6 +428,12 @@ case ${generic_target} in
|
||||
*-*-netware) fmt=elf em=netware ;;
|
||||
esac
|
||||
|
||||
+case ${generic_target} in
|
||||
+ arm-*-*uclibc*)
|
||||
+ need_libm=yes
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
case ${cpu_type} in
|
||||
alpha | arm | i386 | ia64 | microblaze | mips | ns32k | pdp11 | ppc | sparc | z80 | z8k)
|
||||
bfd_gas=yes
|
||||
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh -e
|
||||
## 127_x86_64_i386_biarch.dpatch
|
||||
##
|
||||
## DP: Description: Add (/usr)/lib32 to the search paths on x86_64.
|
||||
## DP: Author: Aurelien Jarno <aurel32.debian.org>
|
||||
## DP: Upstream status: Debian specific
|
||||
#
|
||||
# Hacked to apply with quilt
|
||||
# Adapted to binutils 2.18.50.0.7
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Index: binutils-2.22/ld/emulparams/elf_i386.sh
|
||||
===================================================================
|
||||
--- binutils-2.22.orig/ld/emulparams/elf_i386.sh
|
||||
+++ binutils-2.22/ld/emulparams/elf_i386.sh
|
||||
@@ -14,3 +14,13 @@ GENERATE_PIE_SCRIPT=yes
|
||||
NO_SMALL_DATA=yes
|
||||
SEPARATE_GOTPLT=12
|
||||
IREL_IN_PLT=
|
||||
+
|
||||
+# Linux modify the default library search path to first include
|
||||
+# a 32-bit specific directory.
|
||||
+case "$target" in
|
||||
+ x86_64*-linux* | i[3-7]86*-linux* | x86_64*-kfreebsd*-gnu | i[3-7]86*-kfreebsd*-gnu)
|
||||
+ case "$EMULATION_NAME" in
|
||||
+ *i386*) LIBPATH_SUFFIX=32 ;;
|
||||
+ esac
|
||||
+ ;;
|
||||
+esac
|
||||
@@ -0,0 +1,22 @@
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
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 <nitin.a.kamble@intel.com>
|
||||
Index: binutils-2.22/libiberty/Makefile.in
|
||||
===================================================================
|
||||
--- binutils-2.22.orig/libiberty/Makefile.in
|
||||
+++ binutils-2.22/libiberty/Makefile.in
|
||||
@@ -350,7 +350,8 @@ install-strip: install
|
||||
# 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
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,39 @@
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
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 <richard.purdie@linuxfoundation.org>
|
||||
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
|
||||
|
||||
Index: binutils-2.22/ltmain.sh
|
||||
===================================================================
|
||||
--- binutils-2.22.orig/ltmain.sh
|
||||
+++ binutils-2.22/ltmain.sh
|
||||
@@ -8035,9 +8035,11 @@ EOF
|
||||
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 @@ EOF
|
||||
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"
|
||||
@@ -0,0 +1,49 @@
|
||||
for mips64*-*-linux we change the default emulations to be
|
||||
N64 instead of N32
|
||||
|
||||
Upstream-Status: Inappropriate [ OE configuration Specific]
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
Index: binutils-2.22/bfd/config.bfd
|
||||
===================================================================
|
||||
--- binutils-2.22.orig/bfd/config.bfd 2011-07-28 15:35:13.000000000 -0700
|
||||
+++ binutils-2.22/bfd/config.bfd 2012-04-23 21:07:44.151578222 -0700
|
||||
@@ -970,13 +970,13 @@
|
||||
;;
|
||||
#ifdef BFD64
|
||||
mips64*el-*-linux*)
|
||||
- targ_defvec=bfd_elf32_ntradlittlemips_vec
|
||||
- targ_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec"
|
||||
+ targ_defvec=bfd_elf64_tradlittlemips_vec
|
||||
+ targ_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf64_tradbigmips_vec"
|
||||
want64=true
|
||||
;;
|
||||
mips64*-*-linux*)
|
||||
- targ_defvec=bfd_elf32_ntradbigmips_vec
|
||||
- targ_selvecs="bfd_elf32_ntradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
|
||||
+ targ_defvec=bfd_elf64_tradbigmips_vec
|
||||
+ targ_selvecs="bfd_elf32_ntradbigmips_vec bfd_elf32_ntradlittlemips_vec bfd_elf32_tradbigmips_vec bfd_elf32_tradlittlemips_vec bfd_elf64_tradlittlemips_vec"
|
||||
want64=true
|
||||
;;
|
||||
#endif
|
||||
Index: binutils-2.22/ld/configure.tgt
|
||||
===================================================================
|
||||
--- binutils-2.22.orig/ld/configure.tgt 2011-11-21 01:29:37.000000000 -0800
|
||||
+++ binutils-2.22/ld/configure.tgt 2012-04-23 21:05:34.183571931 -0700
|
||||
@@ -395,11 +395,11 @@
|
||||
mips*-*-vxworks*) targ_emul=elf32ebmipvxworks
|
||||
targ_extra_emuls="elf32elmipvxworks" ;;
|
||||
mips*-*-windiss) targ_emul=elf32mipswindiss ;;
|
||||
-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32
|
||||
- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
|
||||
+mips64*el-*-linux-*) targ_emul=elf64ltsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls ;;
|
||||
-mips64*-*-linux-*) targ_emul=elf32btsmipn32
|
||||
- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
|
||||
+mips64*-*-linux-*) targ_emul=elf64btsmip
|
||||
+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
|
||||
targ_extra_libpath=$targ_extra_emuls ;;
|
||||
mips*el-*-linux-*) targ_emul=elf32ltsmip
|
||||
targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"
|
||||
@@ -0,0 +1,49 @@
|
||||
Upstream-Status: Inappropriate [SDK specific]
|
||||
|
||||
This patch will modify the ELF linker scripts so that the crosssdk linker will
|
||||
generate binaries with a 4096 bytes PT_INTERP section. When the binaries will
|
||||
be relocated, at SDK install time, the interpreter path can be easily changed
|
||||
by the relocating script.
|
||||
|
||||
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
||||
|
||||
Index: binutils_git/ld/genscripts.sh
|
||||
===================================================================
|
||||
--- binutils_git.orig/ld/genscripts.sh 2012-11-21 11:58:23.325441925 +0200
|
||||
+++ binutils_git/ld/genscripts.sh 2012-11-21 12:03:42.106815400 +0200
|
||||
@@ -290,6 +290,7 @@
|
||||
LD_FLAG=r
|
||||
DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
|
||||
DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
|
||||
+PARTIAL_LINKING=" "
|
||||
( echo "/* Script for ld -r: link without relocation */"
|
||||
. ${CUSTOMIZER_SCRIPT}
|
||||
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
@@ -298,10 +299,12 @@
|
||||
LD_FLAG=u
|
||||
DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
|
||||
CONSTRUCTING=" "
|
||||
+PARTIAL_LINKING=" "
|
||||
( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
|
||||
. ${CUSTOMIZER_SCRIPT}
|
||||
. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
|
||||
) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
|
||||
+unset PARTIAL_LINKING
|
||||
|
||||
LD_FLAG=
|
||||
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
|
||||
Index: binutils_git/ld/scripttempl/elf.sc
|
||||
===================================================================
|
||||
--- binutils_git.orig/ld/scripttempl/elf.sc 2012-11-21 12:02:26.800377384 +0200
|
||||
+++ binutils_git/ld/scripttempl/elf.sc 2012-11-21 12:04:16.166109621 +0200
|
||||
@@ -124,8 +124,8 @@
|
||||
DATA_SEGMENT_END=". = DATA_SEGMENT_END (.);"
|
||||
DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
|
||||
fi
|
||||
-if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}"; then
|
||||
- INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp) }"
|
||||
+if test -z "${INITIAL_READONLY_SECTIONS}${CREATE_SHLIB}${PARTIAL_LINKING}"; then
|
||||
+ INITIAL_READONLY_SECTIONS=".interp ${RELOCATING-0} : { *(.interp); . = 0x1000; }"
|
||||
fi
|
||||
if test -z "$PLT"; then
|
||||
IPLT=".iplt ${RELOCATING-0} : { *(.iplt) }"
|
||||
Reference in New Issue
Block a user