summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/bfd
Commit message (Collapse)AuthorAgeFilesLines
* MFC r279301: GNU nm: Avoid NULL dereferenceemaste2015-03-041-1/+2
| | | | | | | | | | bfd_dwarf2_find_line() calls find_line() with NULL functionname_ptr, which resulted in a crash on certain ELF objects. This change was implemented independently from upstream binutils, but I have checked that the crash does not happen there. Sponsored by: The FreeBSD Foundation
* MFC 275336:andrew2014-12-141-10/+10
| | | | | | Use llabs when getting the absolute value of a long long. Sponsored by: ABT Ststems Ltd
* MFC r275386:dim2014-12-092-4/+33
| | | | | | | | | | | | | | Let GNU ld be less obscure about missing symbols and DSOs. If the BFD object looks like a typical shared library, suggest adding '-l<foo>', where <foo> has the 'lib' prefix and '.so<bar>' or '.a' suffix removed. Otherwise, suggest adding '-l:<foo>', where <foo> is the full DT_SONAME. Submitted by: Conrad Meyer <conrad.meyer@isilon.com> Sponsored by: EMC / Isilon storage division Reviewed by: emaste PR: 194296 Differential Revision: https://reviews.freebsd.org/D1152
* MFC r257302 by rea:emaste2014-10-173-5/+5
| | | | | | | | | | binutils/bfd: fix printf-like format strings for "bfd *" arguments There is a special format argument '%B' that directly handles values of type 'bfd *', they must be used instead of '%s'. Manifestations of this bug can be seen in ld(1) error messages, for example, http://lists.freebsd.org/pipermail/freebsd-current/2013-August/043580.html http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045404.html
* Use correct size for MIPS .rld_map sectionemaste2013-10-021-1/+5
| | | | | | | | | | On MIPS .dynamic is read-only and so a special section .rld_map is used to store the pointer to the rtld information for debuggers. This section had a hard coded size of 4 bytes which is not correct for mips64. (Note that FreeBSD's rtld does not yet populate .rld_map.) Sponsored by: DARPA, AFRL Approved by: re (delphij)
* Fix a bug in ld, where indirect symbols are not handled properly duringdim2013-09-281-3/+19
| | | | | | | | | linking of a shared library, leading to corrupt indexes in the dynamic symbol table. This should fix the multimedia/ffmpegthumbnailer port. Approved by: re (kib) Reported by: swills MFC after: 2 weeks
* Revert: Use time_t instead of long for archive timestamps.pfg2013-06-017-24/+15
| | | | Back out for now: this breaks the i386 build and requires some revision.
* BFD: Use time_t instead of long for archive timestamps.pfg2013-06-017-15/+24
| | | | | | | | This basically follows the suggestion in the binutils code and is more in line with what BSD ar(1) does. Obtained from: OpenBSD MFC after: 2 weeks.
* Similar to r239870 and r239872, teach the other binutils tools about thedim2013-03-271-0/+3
| | | | | | | | DW_FORM_flag_present dwarf attribute, so they do not print errors or warnings on files that contain it. (This attribute can be emitted by newer versions of clang and gcc.) MFC after: 1 week
* Fix a bug in ld --gc-sections: it strips out .note sections, while itdim2012-12-221-0/+1
| | | | | | | | | should never do so. This can cause global constructors and destructors to not be executed at run-time, resulting in crashes and other strange behaviour. Reported by: rene MFC after: 1 week
* Merging of projects/armv6, part 3gonzo2012-08-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | r238211: Support TARGET_ARCH=armv6 and TARGET_ARCH=armv6eb This adds a new TARGET_ARCH for building on ARM processors that support the ARMv6K multiprocessor extensions. In particular, these processors have better support for TLS and mutex operations. This mostly touches a lot of Makefiles to extend existing patterns for inferring CPUARCH from ARCH. It also configures: * GCC to default to arm1176jz-s * GCC to predefine __FreeBSD_ARCH_armv6__ * gas to default to ARM_ARCH_V6K * uname -p to return 'armv6' * make so that MACHINE_ARCH defaults to 'armv6' It also changes a number of headers to use the compiler __ARM_ARCH_XXX__ macros to configure processor-specific support routines. Submitted by: Tim Kientzle <kientzle@freebsd.org>
* Fix clang warnings.benl2011-06-183-3/+3
| | | | Approved by: philip (mentor)
* In the upstream rev. 1.61 of elf64-sparc.c the following bug was fixed:marius2011-03-111-5/+11
| | | | | | | | | | | | | | | | | | | | | | | * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of dynamic relocs against section symbols for the output section vma. However, with the addition of TLS support in the upstream rev. 1.104 this fix was essentially reverted. After factoring out the common parts of elf32-sparc.c and elf64-sparc.c a comment was added to elfxx-sparc.c in the upstream rev. 1.27 as part of unrelated changes, saying that the fix from elf64-sparc.c rev. 1.61 indeed should be implemented, but given that some unspecified OS has a broken ld.so expecting broken relocations deliberately is omitted. As the current behavior actually violates the SPARC ABI, FreeBSD never had such a broken ld.so and this is actually causing problems with at least kernel modules linked with binutils 2.17.50 committed in r218822 without the workaround committed in r219340 in place, re-implement the above fix in a way so that is only applied if the output format is ELFOSABI_FREEBSD. In the upstream version it probably would make sense to invert this check and only skip adjusting the addend for the OS with the broken ld.so, once it's determine which one that is. Approved by: dim
* Merge binutils 2.17.50 to head. This brings a number of improvements todim2011-02-18219-68267/+107399
|\ | | | | | | | | | | | | | | | | x86 CPU support, better support for powerpc64, some new directives, and many other things. Bump __FreeBSD_version, and add a note to UPDATING. Thanks to the many people that have helped to test this. Obtained from: projects/binutils-2.17
| * Try a more generic version of the last two fixes. Assuming this is correct,nwhitehorn2010-12-071-4/+1
| | | | | | | | | | | | | | | | it should also be MI. The problem here arises when ld ends up linking a link-once section with relocations against sections that point back to it that are as yet unresolved. Instead of piecemeal finding sections we think are potentially subject to this issue, just defer processing for sections that have yet to be relocated instead of immediately bailing.
| * Fix another .got references-in-linkonce-sections issue with C++. There arenwhitehorn2010-12-071-0/+3
| | | | | | | | | | | | remaining issues here, and a more general solution is probably called for. Submitted by: Jakob van Santen <vansanten@wisc.edu>
| * For ia64, add a proper 'elf64-ia64-freebsd' output format to BFD, so thedim2010-12-052-0/+21
| | | | | | | | | | | | ELF branding for FreeBSD is done in the same way as amd64, i386 and sparc. Something similar should probably also be done for arm, mips and powerpc.
| * Sync: merge r215464 through r215708 from ^/head.dim2010-11-222-0/+40
| |\ | |/ |/|
| * Sync: merge r215189 through r215272 from ^/head.dim2010-11-141-4/+8
| |\
| * \ Sync: merge r214895 through r215140 from ^/head.dim2010-11-111-1/+1
| |\ \
| * | | Backport a fix for binutils PR7093, which caused segfaults in lddim2010-11-031-0/+3
| | | | | | | | | | | | | | | | | | | | targeting arm, when attempting to create object files from arbitrary binary file (e.g. firmware blobs).
| * | | Merge ^/vendor/binutils/dist@214571 into contrib/binutils, which bringsdim2010-11-01186-19860/+42529
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | us up to version 2.17.50.20070703, at the last GPLv2 commit. Amongst others, this added upstream support for some FreeBSD-specific things that we previously had to manually hack in, such as the OSABI label support, and so on. There are also quite a number of new files, some for cpu's (e.g. SPU) that we may or may not be interested in, but those can be cleaned up later on, if needed.
| * | | | Fix a manifestation of GCC bug 16625 that caused ld >= 2.17 to fail onnwhitehorn2010-10-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | | Apply commit f6c8fecc6fe3d5532691867a7f27820bb1c426a9 from upstreamdim2010-10-251-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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
| * | | | Make contrib/binutils/bfd/coff-x86_64.c compile without warnings.dim2010-10-221-0/+4
| | | | |
| * | | | Merge ^vendor/binutils/dist@214082 into contrib/binutils.dim2010-10-21193-48101/+73237
| |\ \ \ \ | | |/ / /
| | * | | Rename vendor/binutils/*/contrib to vendor/binutils/*/xobrien2009-01-19222-299774/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Merge ^vendor/binutils/dist@214033 into contrib/binutils.dim2010-10-199-211/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | Merge ^vendor/binutils/dist@213996 into contrib/binutils. Skip addingdim2010-10-182-8787/+0
| | | | | | | | | | | | | | | | | | | | | | | | | any files we do not need, delete some files that were removed upstream, but keep our own customizations and backports from later binutils.
* | | | | Add the ability for GDB to printout the thread name along with otherattilio2010-11-222-0/+40
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | thread specific informations. In order to do that, and in order to avoid KBI breakage with existing infrastructure the following semantic is implemented: - For live programs, a new member to the PT_LWPINFO is added (pl_tdname) - For cores, a new ELF note is added (NT_THRMISC) that can be used for storing thread specific, miscellaneous, informations. Right now it is just popluated with a thread name. GDB, then, retrieves the correct informations from the corefile via the BFD interface, as it groks the ELF notes and create appropriate pseudo-sections. Sponsored by: Sandvine Incorporated Tested by: gianni Discussed with: dim, kan, kib MFC after: 2 weeks
* | | | Default to little endian output when building for little endian. Thisimp2010-11-131-4/+8
| |_|/ |/| | | | | | | | | | | | | | | | | got lost as a result of a mismerge a few months back and I didn't notice until I collapsed tbemd into -head. Submitted by: similar patch by kan@
* | | Zero the buffer containing the .gnu_debuglink section before writingcperciva2010-11-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | into it. Prior to this commit the .gnu_debuglink section can have up to 3 bytes of uninitialized garbage; as a result, .ko files could change vary between builds. Approved by: dim MFC after: 7 days
* | | Prevent endless loop by detecting broken MIPS.optionsgonzo2010-11-071-0/+17
|/ /
* | Add support for the BFD target efi-app-x86_64.rpaulo2010-09-293-0/+821
| | | | | | | | | | This uses only GPL2 source code and is a requirement for a 64 bit EFI boot loader.
* | Teach our toolchain how to generate 64-bit PowerPC binaries. This fixesnwhitehorn2010-07-101-3/+11
| | | | | | | | | | | | | | | | 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
* | Add/improve mips64r2, Octeon, n32 and n64 support in the toolchain.jmallett2010-06-024-11/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Add armeb-*-freebsd* to the list of known architectures. This is likeimp2010-04-141-0/+4
| | | | | | | | | | arm-*-freebsd*, except it defaults to big endian builds instead of little endian builds.
* | Push mips support into the tree.imp2008-12-111-0/+4
| |
* | Bring these back to HEAD.obrien2008-05-296-0/+8747
| | | | | | | | | | (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.)
* | This commit was generated by cvs2svn to compensate for changes in r179404,obrien2008-05-297-0/+11407
|\ \ | |/ | | | | which included commits to RCS files with non-trunk default branches.
| * Import of Binutils from the FSF 2.15 branch (just post-.0 release).obrien2008-05-2913-0/+20154
| | | | | | | | These bits are taken from the FSF anoncvs repo on 23-May-2004 04:41:00 UTC.
* | This commit was generated by cvs2svn to compensate for changes in r159399,marius2006-06-081-1/+5
|\ \ | |/ | | | | which included commits to RCS files with non-trunk default branches.
| * * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking amarius2006-06-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | This commit was generated by cvs2svn to compensate for changes in r131722,obrien2004-07-062-0/+266
|\ \ | |/ | | | | which included commits to RCS files with non-trunk default branches.
| * Import of Binutils from the FSF 2.15 branch (just post-.0 release).obrien2004-07-062-0/+266
| | | | | | | | These bits are taken from the FSF anoncvs repo on 23-May-2004 04:41:00 UTC.
* | Update HEAD with the stock binutils_2_15_20040523 file.obrien2004-06-162-1455/+1379
| |
* | Merge rev 1.2 (configuration changes to support FreeBSD) into Binutils 2.15.obrien2004-06-161-6/+6
| |
* | Merge our ELF branding into Binutils 2.15.obrien2004-06-161-1151/+1325
| |
* | This commit was generated by cvs2svn to compensate for changes in r130561,obrien2004-06-16163-31137/+63483
|\ \ | |/ | | | | which included commits to RCS files with non-trunk default branches.
| * Import of Binutils from the FSF 2.15 branch (just post-.0 release).obrien2004-06-16167-33746/+66204
| | | | | | | | These bits are taken from the FSF anoncvs repo on 23-May-2004 04:41:00 UTC.
OpenPOWER on IntegriCloud