Commit Graph

129 Commits

Author SHA1 Message Date
Nathan Whitehorn
0a0025449d Fix a manifestation of GCC bug 16625 that caused ld >= 2.17 to fail on
64-bit PowerPC when linking multiple C++ files referencing the same
method, defined in a common header, when that method had a switch
statement with more than 4 cases. This change fixes compilation of LLVM
tblgen on 64-bit PPC with binutils 2.17.

Lots of help from:	dim
Upstream after:		more testing
2010-10-25 21:49:59 +00:00
Dimitry Andric
e208fc20ab Apply commit f6c8fecc6fe3d5532691867a7f27820bb1c426a9 from upstream
(still under GPLv2 at that time):

Author: H.J. Lu <hjl@lucon.org>
Date:   Wed Sep 27 04:18:16 2006 +0000

PR ld/3223
PR ld/3267
* bfd/elf.c (assign_file_positions_for_non_load_sections): Don't warn
  zero size allocated sections.
* ld/ldlang.h (lang_output_section_statement_type): Add
  section_relative_symbol.
* ld/ldlang.c (strip_excluded_output_sections): Don't strip a section
  with a symbol relative to it.
  (lang_size_sections_1): Mark if an output section has a symbol symbol
  relative to it.

This prevents warnings like the following during stripping of debug info
from kernel modules on i386:

===> zlib (all)
...
objcopy --only-keep-debug zlib.ko.debug zlib.ko.symbols
objcopy --strip-debug --add-gnu-debuglink=zlib.ko.symbols zlib.ko.debug zlib.ko
BFD: zlib.ko: warning: allocated section `.plt' not in segment
BFD: zlib.ko: warning: allocated section `.got' not in segment
2010-10-25 19:43:22 +00:00
Dimitry Andric
9be9d08fde Make contrib/binutils/bfd/coff-x86_64.c compile without warnings. 2010-10-22 18:06:58 +00:00
Dimitry Andric
dfd2f2d4bb Merge ^vendor/binutils/dist@214082 into contrib/binutils. 2010-10-21 19:11:14 +00:00
Dimitry Andric
c9a933bd0b Merge ^vendor/binutils/dist@214033 into contrib/binutils.
The change made to bfd/elf.c in upstream revision 1.217.4.3 (which was a
revert of an earlier change), caused objcopy on powerpc to fail to copy
debug info from kernel modules.  This had to be fixed by applying the
diff from upstream revision 1.243 on top of it.
2010-10-19 20:14:32 +00:00
Dimitry Andric
d1728c43cb Merge ^vendor/binutils/dist@213996 into contrib/binutils. Skip adding
any files we do not need, delete some files that were removed upstream,
but keep our own customizations and backports from later binutils.
2010-10-18 20:57:43 +00:00
Rui Paulo
c5c0eabc00 Add support for the BFD target efi-app-x86_64.
This uses only GPL2 source code and is a requirement for a 64 bit EFI
boot loader.
2010-09-29 14:41:03 +00:00
Nathan Whitehorn
2cf64c8006 Teach our toolchain how to generate 64-bit PowerPC binaries. This fixes
a variety of bugs in binutils related to handling of 64-bit PPC ELF,
provides a GCC configuration for 64-bit PowerPC on FreeBSD, and
associated build systems tweaks.

Obtained from:	projects/ppc64
2010-07-10 02:29:22 +00:00
Juli Mallett
5619a3e4bf Add/improve mips64r2, Octeon, n32 and n64 support in the toolchain.
o) Add TARGET_ABI to the MIPS toolchain build process.  This sets the default
   ABI to one of o32, n32 or n64.  If it is not set, o32 is assumed as that is
   the current default.
o) Set the default GCC cpu type to any specified TARGET_CPUTYPE.  This is
   necessary to have a working "cc" if e.g. mips64 is specified, as binutils
   will refuse to link objects using different ISAs in some cases.
o) Add support for n32 and n64 ABIs to binutils and GCC.
o) Add additional required libgcc2 stubs for n32 and n64.
o) Add support for the "mips64r2" architecture to GCC.  Add the "octeon"
o) When static linking, wrap default libraries in --start-group and
   --end-group.  This is required for static linking to work on n64 with the
   interdependencies between libraries there.  This is what other OSes that
   support n64 seem to do, as well.
o) Fix our GCC spec to define __mips64 for 64-bit targets, not __mips64__, the
   former being what libgcc, etc., check and the latter seemingly being a
   misspelling of a hand merge from a Linux spec.
o) When no TARGET_CPUTYPE is specified at build time, make GCC take the default
   ISA from the ABI.  Our old defaults were too liberal and assumed that 64-bit
   ABIs should default to the MIPS64 ISA and that 32-bit ABIs should default to
   the MIPS32 ISA, when we are supporting or will support some systems based on
   earlier 32-bit and 64-bit ISAs, most notably MIPS-III.
o) Merge a new opcode file (and support code) from a later version of binutils
   and add flags and code necessary to support Octeon-specific instructions.
   This should also make merging opcodes for other modern architectures easier.

Reviewed by:	imp
2010-06-02 11:06:03 +00:00
Warner Losh
8a07366ec2 Add armeb-*-freebsd* to the list of known architectures. This is like
arm-*-freebsd*, except it defaults to big endian builds instead of
little endian builds.
2010-04-14 19:03:27 +00:00
David E. O'Brien
f51ee0a16d Rename vendor/binutils/*/contrib to vendor/binutils/*/x
Binutils has a "contrib" subdirectory - thus flattening cannot happen
without renaming the upper level contrib directory in a first pass.

Also, don't record this move and remove any keyword expansion.
2009-01-19 17:25:17 +00:00
Warner Losh
d9964624bd Push mips support into the tree. 2008-12-11 08:22:20 +00:00
David E. O'Brien
bd7d47734a Bring these back to HEAD.
(I thought ncvs@ had rm'ed these MIPS files a long time ago... SVN had
better work out - else 7 more files off the vendor branch.)
2008-05-29 02:43:05 +00:00
David E. O'Brien
b7e4108c6b Import of Binutils from the FSF 2.15 branch (just post-.0 release).
These bits are taken from the FSF anoncvs repo on 23-May-2004 04:41:00 UTC.
2008-05-29 02:29:59 +00:00
David E. O'Brien
de582f44b4 This commit was generated by cvs2svn to compensate for changes in r179404,
which included commits to RCS files with non-trunk default branches.
2008-05-29 02:29:59 +00:00
Marius Strobl
2ce641c5c4 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
non-shared object, do not reserve space in .plt and .rela.plt
for regular symbols neither defined nor referenced in shared objects.

This is a backport of rev. 1.101 (sourceware.org repository) to
Binutils 2.15 which fixes the creation of bogus relocations in the
PLT of Firefox and Thunderbird binaries and which in turn caused
them to segfault in rtld(1). This is committed to the vendor branch
as it doesn't represent a local change but the original vendor fix
is from after elf_link_hash_flags was replaced with bitfields.

PR:		sparc64/89486
Approved by:	maintainer timeout
Obtained from:	NetBSD
MFC after:	1 week
2006-06-08 13:10:51 +00:00
Marius Strobl
ef75316994 This commit was generated by cvs2svn to compensate for changes in r159399,
which included commits to RCS files with non-trunk default branches.
2006-06-08 13:10:51 +00:00
David E. O'Brien
e74f71ff7f Import of Binutils from the FSF 2.15 branch (just post-.0 release).
These bits are taken from the FSF anoncvs repo on 23-May-2004 04:41:00 UTC.
2004-07-06 19:16:23 +00:00
David E. O'Brien
3cc52aa5e0 This commit was generated by cvs2svn to compensate for changes in r131722,
which included commits to RCS files with non-trunk default branches.
2004-07-06 19:16:23 +00:00
David E. O'Brien
6c81463f56 Update HEAD with the stock binutils_2_15_20040523 file. 2004-06-16 06:55:49 +00:00
David E. O'Brien
b543ed2b74 Merge rev 1.2 (configuration changes to support FreeBSD) into Binutils 2.15. 2004-06-16 06:13:06 +00:00
David E. O'Brien
3358ced985 Merge our ELF branding into Binutils 2.15. 2004-06-16 06:02:14 +00:00
David E. O'Brien
da03bc7002 Import of Binutils from the FSF 2.15 branch (just post-.0 release).
These bits are taken from the FSF anoncvs repo on 23-May-2004 04:41:00 UTC.
2004-06-16 05:45:41 +00:00
David E. O'Brien
ad6e3f2b73 This commit was generated by cvs2svn to compensate for changes in r130561,
which included commits to RCS files with non-trunk default branches.
2004-06-16 05:45:41 +00:00
David E. O'Brien
34d258e905 From FSF Binutils CVS repo:
2003-04-09  Richard Henderson  <rth@redhat.com>
	* elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
	Ignore relocations against r_symndx == 0.

Requested by:	kris,re(scottl)
2003-05-28 03:32:33 +00:00
David E. O'Brien
7f158db49d Junk that never should have gotten imported. 2003-03-02 19:01:31 +00:00
David E. O'Brien
a46000f2ca Update HEAD with the stock files. 2002-12-02 09:39:02 +00:00
David E. O'Brien
332649695e Remove our custom ELF branding -- we have moved to our own ELF vectors
that DTRT.
2002-12-02 09:22:58 +00:00
David E. O'Brien
702c8f15ef Merge our ELF branding into Binutils 2_13_2_20021127 snapshot. 2002-12-02 09:17:49 +00:00
David E. O'Brien
ca88f70eac GC some stuff I thought was long gone. 2002-12-02 09:14:25 +00:00
David E. O'Brien
898696a8b3 Import of Binutils from the FSF 2.13 branch (just pre-.2 release).
These bits are taken from the FSF anoncvs repo on 27-Oct-2002 21:12:00 EST.
2002-12-02 09:06:04 +00:00
David E. O'Brien
6c3a332e94 This commit was generated by cvs2svn to compensate for changes in r107492,
which included commits to RCS files with non-trunk default branches.
2002-12-02 09:06:04 +00:00
David E. O'Brien
e4c6a19966 Try to keep CVS from pissing over the next binutils import by returning
to purely stock files.
2002-12-02 08:42:08 +00:00
David E. O'Brien
0320623115 Import of Binutils from the FSF 2.13 branch (just pre-.1 release).
These bits are taken from the FSF anoncvs repo on 11-Oct-2002 22:39:35 PDT.
2002-10-11 09:15:11 +00:00
David E. O'Brien
a77c19c987 This commit was generated by cvs2svn to compensate for changes in r104871,
which included commits to RCS files with non-trunk default branches.
2002-10-11 09:15:11 +00:00
David E. O'Brien
a85f4d8e6e We use the stock version of this file. 2002-10-11 06:11:27 +00:00
David E. O'Brien
7f08766508 Merge rev 1.6 (ELF_DYNAMIC_INTERPRETER) into Binutils 2.13_20021110. 2002-10-11 06:11:03 +00:00
David E. O'Brien
8fe9bb17ae Merge rev 1.8 ("ELF_DYNAMIC_INTERPRETER") into Binutils 2.13_20021110 snap. 2002-10-11 06:10:28 +00:00
David E. O'Brien
8e7b167431 On second thought, garbage collect the OLD_BRANDELF_METHOD. FreeBSD 5.0
is a good point to break from this historical ABI-breaking method.
2002-10-11 06:09:39 +00:00
David E. O'Brien
03dc1f6999 Merge our ELF branding into Binutils 2_13_20021011 snapshot.
(note that this will be the last Binutils update to offer our original
method of ELF branding (WANT_OLD_BRANDELF_METHOD))
2002-10-11 06:08:01 +00:00
David E. O'Brien
88e5f95a93 Import of Binutils from the FSF 2.13 branch (just pre-.1 release).
These bits are taken from the FSF anoncvs repo on 11-Oct-2002 22:39:35 PDT.
2002-10-11 06:01:20 +00:00
David E. O'Brien
8febaae8e2 This commit was generated by cvs2svn to compensate for changes in r104834,
which included commits to RCS files with non-trunk default branches.
2002-10-11 06:01:20 +00:00
David E. O'Brien
bde4025733 Remove these MIPS (and stragglers) from the vendor branch so I won't
accidently import them again.
2002-08-31 20:49:15 +00:00
David E. O'Brien
961b726450 Merge rev 1.6 (ELF_DYNAMIC_INTERPRETER) into Binutils 2.12_20020720. 2002-08-31 20:38:58 +00:00
David E. O'Brien
f862c555e6 Import of Binutils from the FSF 2.12 branch (post-.1 release). 2002-08-31 20:20:07 +00:00
David E. O'Brien
a00bb00510 This commit was generated by cvs2svn to compensate for changes in r102729,
which included commits to RCS files with non-trunk default branches.
2002-08-31 20:20:07 +00:00
David E. O'Brien
86c6456a3e We use the stock version of this file. 2002-07-05 20:34:21 +00:00
David E. O'Brien
7f8f70d5f8 Merge rev 1.6 (ELF_DYNAMIC_INTERPRETER) into Binutils 2.12_20020622 snap. 2002-07-05 20:32:42 +00:00
David E. O'Brien
c563f5ced3 Merge our ELF branding into Binutils 2.12_20020622 snapshot.
(note that this will be the last Binutils update to offer our original
method of ELF branding (WANT_OLD_BRANDELF_METHOD))
2002-07-05 20:30:48 +00:00
David E. O'Brien
c7549e32a4 Import of Binutils from the FSF 2.12 branch (just post-.1 release).
These bits are taken from the FSF anoncvs repo on 22-June-2002 23:28:00 EDT.
2002-07-05 20:16:34 +00:00