summaryrefslogtreecommitdiffstats
path: root/contrib/binutils
Commit message (Collapse)AuthorAgeFilesLines
* For GNU as, add two missing modes for each of the fcomip and fucomipdim2014-04-072-0/+16
| | | | | | | | | instructions. Partially obtained from OpenBSD by Pedro Giffuni, while I added the fcomip variants. Apparently this should help with compiling certain variants of WebKit. MFC after: 3 days
* Add a new ARM TARGET_ARCH, armv6hf. This is considered experimental.andrew2014-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This targets the existing ARMv6 and ARMv7 SoCs that contain a VFP unit. This is an optional coprocessors may not be present in all devices, however it appears to be in all current SoCs we support. armv6hf targets the VFP variant of the ARM EABI and our copy of gcc is too old to support this. Because of this there are a number of WITH/WITHOUT options that are unsupported and must be left as the default value. The options and their required value are: * WITH_ARM_EABI * WITHOUT_GCC * WITHOUT_GNUCXX In addition, without an external toolchain, the following need to be left as their default: * WITH_CLANG * WITH_CLANG_IS_CC As there is a different method of passing float and double values to functions the ABI is incompatible with existing armv6 binaries. To use this a full rebuild of world is required. Because no floating point values are passed into the kernel an armv6 kernel with VFP enabled will work with an armv6hf userland and vice versa.
* Make gas accept any PowerPC instruction by default. This is a local change,jhibbits2014-02-031-1/+1
| | | | | | | and will not be submitted upstream. Discussed with: nwhitehorn,rdivacky MFC after: 1 month
* binutils: add support for Intel SMAP-related instructionspfg2014-01-264-2/+19
| | | | | | | | | | Add support for stac/clac instructions to manipulate the flag that controls the behaviour of Intel's Supervisor Mode Access Prevention (SMAP) feature. Tested by: dim Obtained from: OpenBSD MFC after: 5 days
* Fix cross-compilation of ia64 target code with clang.marcel2013-12-282-6/+6
|
* cxxfilt: small changes from Apple's developer toolspfg2013-11-111-2/+2
| | | | | | | | | | | | | | | | From Apple's Developer Tools 4.0 [1]: demangle.patch 2007-05-05 Geoffrey Keating (d_name): Detect local-source-name. (d_prefix): Likewise. (d_unqualified_name): Implement local-source-name. libiberty-printf.patch MFC after: 1 month [1] http://opensource.apple.com/source/cxxfilt/cxxfilt-9/patches/
* Queisce warning about attempting to add char * together and use explicitsbruno2013-10-311-22/+22
| | | | array indexing to indicate what is meant to be done
* Queisce warning about attempting to add char * together and use explicitsbruno2013-10-311-1/+1
| | | | array indexing to indicate what is meant to be done
* Queisce warning about empty bodies in these loops by bumping the ;; to thesbruno2013-10-292-3/+6
| | | | next line.
* binutils/bfd: fix printf-like format strings for "bfd *" argumentsrea2013-10-293-5/+5
| | | | | | | | | | | 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 Approved by: dim MFC after: 2 weeks
* Don't force 64-bit DWARF2 on MIPSemaste2013-10-212-19/+0
| | | | | | | 64-bit debug data is only necessary for objects with greater than 4GB of debug data, and is not used on other 64-bit FreeBSD targets. Sponsored by: DARPA, AFRL
* Merge from projects/arm_eabi_vfp r255380:andrew2013-10-201-4/+4
| | | | | | | | | | Fix the VCVT instruction. It must round towards zero when converting from a floating-point to an integer value. This was not the case causing issues when printing certain values. There is a VCVTR instruction that will round depending on the current rounding mode. We don't yet support this instruction, or setting the rounding mode.
* Fix .debug_line prologue header length calculation for 64-bit DWARFemaste2013-10-171-10/+8
| | | | | | | | The header_length field is the number of bytes following the field to the first byte of the line number program. The hard-coded constants previously here (4 + 2 + 4) were correct only for 32-bit DWARF. Sponsored by: DARPA, AFRL
* Add support for assembling and disassembling Intel Random Numberdim2013-10-074-8/+40
| | | | | | | | | Generator extensions (e.g. the 'rdrand' mnemonic) to our copy of binutils. Approved by: re (kib) Obtained from: OpenBSD, via pfg MFC after: 1 week
* 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
* Add an elf note on ARM to store the MACHINE_ARCH an executable was builtandrew2013-09-262-0/+3
| | | | | | | | | | for. This is useful for software needing to know which architecture a binary is built for as arm and armv6 have slight differences meaning only some binaries build for one will work as expected on the other. It is expected pkgng will be able to make use of this to simplify the logic to determine which package ABI to use. Approved by: re (kib)
* Improve readelf notes output for Linux ELF filesemaste2013-09-132-0/+30
| | | | | | | | | Add four ELF note constants: - NT_FILE and NT_SIGINFO (core file notes output by recent Linux kernels) - NT_GNU_ABI_TAG (was incorrectly reported as NT_VERSION) - NT_GNU_BUILD_ID (used for locating standalone debug files) Approved by: re (kib)
* Add support for the 'invpcid' instruction to binutils and DDB'sjhb2013-09-034-3/+26
| | | | | | disassembler on amd64. MFC after: 1 month
* Silence a warning that is incorrect on ARMv6 and later. In the smull, umull,andrew2013-08-171-2/+3
| | | | | | smlal, and umlal the output registers are allowed to be the same as either input registers, where in ARMv4 and ARMv5 they could only be the same as the last input register.
* Change default behaviour of ld(1) to not recursively copy DT_NEEDEDbapt2013-07-311-1/+1
| | | | | This is the default behaviour of the newer binutils as well as most alternative linkers. All the ports tree has been fixed to be able to link properly with this new behaviour.
* Correct ELF note decoding for non-core filesemaste2013-07-191-3/+16
| | | | Requested by: kib
* Correct alignment in note outputemaste2013-07-181-1/+1
|
* Remove accidentally cut-and-pasted colonsemaste2013-07-181-7/+7
|
* Handle FreeBSD-specific ELF notesemaste2013-07-182-3/+50
| | | | | | | | | | | | Add a function to return the specific type, when the note's Name field is 'FreeBSD'. r249558 added FreeBSD-specific ELF note types that reuse type numbers of existing generic / Linux types. This caused 'readelf -n' to produce incorrect output on FreeBSD core files. Sponsored by: DARPA, AFRL MFC after: 3 days
* Handle DW_TAG_rvalue_reference_typeemaste2013-06-121-0/+1
| | | | | | | | | | | | 2012-05-21 Jim Ingham <jingham@apple.com> * dwarf2read.c (process_die): Handle DW_TAG_rvalue_reference_type. (read_type_die): Ditto. (dwarf_tag_name): Ditto. * elf/dwarf2.h: Add DW_TAG_rvalue_reference_type. Obtained from: Apple, gdb-1820
* 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.
* Improve compatibility with recent flex from flex.sourceforge.net.jkim2013-05-032-6/+6
|
* Fix the value of NT_FREEBSD_TAG to be the same as ABI_NOTRTYPE in lib/csu.andrew2013-04-181-1/+2
| | | | | Add NT_FREEBSD_NOINIT_TAG for the value of CRT_NOINIT_NOTETYPE. Check for both of these when detecting a FreeBSD binary in gdb.
* Similar to r239870 and r239872, teach the other binutils tools about thedim2013-03-272-0/+9
| | | | | | | | 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
* do_vfp_vmrs and do_vfp_vmsr should not return anything.andrew2013-03-181-11/+7
|
* Add support for the vmsr and vmrs instructions. This supports the systemandrew2013-03-181-0/+66
| | | | | level version of the instructions. When used in userland the hardware only allows us to read/write FPSCR.
* Some ARM vmov similar to 'vmov.f32 s1, s2' will incorrectly have the secondandrew2013-03-181-4/+4
| | | | | | | | | register added to the symbol table by the assembler. On further investigation it was found the problem was with the my_get_expression function. This is called by parse_big_immediate. Fix this by moving the call to parse_big_immediate to the end of the if, else if, ..., else block.
* Clear the memory allocated to build the unwind tables. This fixes C++andrew2013-02-271-0/+2
| | | | exceptions on ARM EABI with static binaries.
* reorder so all the flags are together and make the PCLMUL flag unique..jmg2013-02-211-4/+5
| | | | | | | | This fixes the problem on amd64 miscompiling mpboot.s causing boot issues... We are still using gas for a few files in the kernel... Submitted by: kib MFC after: 1 month
* add support for AES and PCLMULQDQ instructions to binutils...jmg2013-02-194-13/+128
| | | | | | | | | Thanks to Mike Belopuhov for the pointer to the OpenBSD patch, though OpenBSD's gcc is very different that it only helped w/ where to modify, not how... Thanks to jhb for some early reviews... Reviewed by: imp, kib MFC after: 1 month
* Extend GDB to check the value in the .note.tag section along with theandrew2013-02-041-0/+4
| | | | | | | | .note.ABI-tag section. This helps on ARM EABI where the OS/ABI field is zero. It would be better to use the NOTES program header however this would require a more invasive change.
* Clean some 'svn:executable' properties in the tree.pfg2013-01-261-0/+0
| | | | | Submitted by: Christoph Mallon MFC after: 3 days
* 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
* Recognise vfpv2 as a value for the ARM .fpu asm directive. Clang generatesandrew2012-12-151-0/+1
| | | | | | these even when building soft floating-point code Submitted by: Daisuke Aoyama <aoyama AT peach.ne.jp>
* Clean up hardcoded ar(1) flags in the tree to use the global ARFLAGS ineadler2012-12-063-8/+8
| | | | | | | | | | | | share/mk/sys.mk instead. This is part of a medium term project to permit deterministic builds of FreeBSD. Submitted by: Erik Cederstrand <erik@cederstrand.dk> Reviewed by: imp, toolchain@ Approved by: cperciva MFC after: 2 weeks
* Fix a twelve year old bug in readelf: when process_dynamic_segment()dim2012-08-311-1/+1
| | | | | | | | | | | | encounters a DT_RUNPATH entry, the global dynamic_info[] array is overrun, causing some other global variable to be overwritten. In my testcase, this was the section_headers variable, leading to segfaults or jemalloc assertions when it was freed later on. Thanks to Koop Mast for providing samples of a few "bad" .so files. MFC after: 1 week
* Teach gdb about the DW_FORM_flag_present dwarf attribute, so it doesn'tdim2012-08-291-1/+2
| | | | | | | error out on files that contain it. (This attribute can be emitted by newer versions of clang.) MFC after: 2 weeks
* Merging of projects/armv6, part 3gonzo2012-08-153-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add support for the 'invept' and 'invvpid' instructions. Beyond simplyjhb2012-07-064-3/+58
| | | | | | | | adding appropriate table entries, the assembler had to be adjusted as these are the first non-SSE instructions to use a 3-byte opcode (and a mandatory prefix to boot). MFC after: 1 month
* Add support for the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', and 'xsetbv'jhb2012-07-045-11/+74
| | | | | | | | | | instructions. I reimplemented this from scratch based on the Intel manuals and the existing support for handling the fxsave and fxrstor instructions. This will let us use these instructions natively with GCC rather than hardcoding the opcodes in hex. Reviewed by: kib MFC after: 1 month
* Revert r234656, and apply a proper fix for binutils PR 10474, whichdim2012-05-071-0/+33
| | | | | | | | | | | | caused linking clang on 32-bit PowerPC to fail with "relocation truncated to fit: R_PPC_REL24" errors. Original diffs (relicensed under GPLv2 with permission from author): http://sourceware.org/git/?p=binutils.git;a=commit;h=1fd262ff7d7ea5adf4894c6b960e092e7e43e3cd http://sourceware.org/git/?p=binutils.git;a=commit;h=053c49fbff58bd33bd0d12200ea61302f92caceb Tested by: andreast MFC after: 1 week
* Rename the linker emulation name for powerpc and powerc64. This is needed thatandreast2011-11-191-0/+3
| | | | | we can also use the upstream binutils linker where we have to have a unique name for the FreeBSD emulation.
* Make GNU as recognize the ARM 'rrx' mnemonic, which can be generated bydim2011-06-231-0/+10
| | | | | | clang for certain expressions. Code taken from Apple cctools (GPLv2). Submitted by: damjan.marion@gmail.com
OpenPOWER on IntegriCloud