aboutsummaryrefslogtreecommitdiff
path: root/contrib/binutils
Commit message (Collapse)AuthorAgeFilesLines
...
* Add pregenerated documentation for as(1) and ld(1)Baptiste Daroussin2015-01-045-0/+20604
| | | | Notes: svn path=/head/; revision=276651
* Fix generating documentation with modern texinfoBaptiste Daroussin2015-01-041-1/+1
| | | | Notes: svn path=/head/; revision=276650
* Fix generating documents with modern texinfoBaptiste Daroussin2015-01-042-8/+8
| | | | Notes: svn path=/head/; revision=276647
* In contrib/binutils/bfd/elf32-ppc.c, avoid warnings about case valuesDimitry Andric2014-12-291-1/+1
| | | | | | | | | | not being in the enumerated type 'enum elf_ppc_reloc_type', by casting the switch argument to int. MFC after: 3 days Notes: svn path=/head/; revision=276352
* In contrib/binutils/gas/config/tc-ppc.c, fix a few -Wformat-securityDimitry Andric2014-12-281-3/+3
| | | | | | | | | warnings. MFC after: 3 days Notes: svn path=/head/; revision=276346
* Backport fix for binutils 11867: .quad directive not assembled correctlyPedro F. Giffuni2014-12-262-10/+34
| | | | | | | | | | | Alan Modra (and Alan's employer) graciously permitted use of his patch under GPLv2. Obtained from: OpenBSD MFC after: 5 days Notes: svn path=/head/; revision=276229
* gas: use memmove instead of bogus memcpy.Pedro F. Giffuni2014-12-261-1/+1
| | | | | | | | | | | | partial_where points into the buffer that begins with buffer_start so we need to use memmove() to handle the overlap. Sourceware-PR 11456. Obtained from: OpenBSD (CVS rev. 1.2) MFC after: 3 days Notes: svn path=/head/; revision=276228
* Make gas parse '__tls_get_addr(foo@tlsgd)'.Justin Hibbits2014-12-181-91/+141
| | | | | | | | | | | | | Corresponds to 727fc41e077139570ea8b8ddfd6c546b2a55627c. This allows us to use -no-integrated-as with clang, if we prefer. Obtained from: binutils-gdb (Relicensed from Alan Modra as GPLv2) MFC after: 2 weeks X-MFC-with: r275718 Notes: svn path=/head/; revision=275873
* Add new PowerPC relocations to binutilsJustin Hibbits2014-12-1211-822/+1424
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: LLVM/Clang generates relocations that our binutils doesn't understand, but newer binutils does. I got permission from the author of a series of patches to relicense them as GPLv2 for use in FreeBSD. The upstream git hashes are: ac2df442ac7901f00af15b272fc48b594b433713 2b95367962dc14f69d3c338c4d54195266e2e169 102890f04c44b64cf5cef4588267dd9f24086ac7 b7fcf6f6bb53b5027e111107f5416769cb9a5798 1d483afedd5a628dc84fb58d1d570f79fdfbfa7b 90aecf7a80c1cefeb45fc10a6cd02c8338e34b4c 3a71aa26df2a372a58e9c11ef9ba51fd0e83320a 727fc41e077139570ea8b8ddfd6c546b2a55627c With the import of clang 3.5, and a few backported patches, we should be able to move powerpc and powerpc64 to clang-as-cc soon. Test Plan: Passes make tinderbox, so no regressions. Binaries built with clang run on powerpc64. Reviewers: #committers, dim Reviewed By: dim Differential Revision: https://reviews.freebsd.org/D1297 Obtained from: Alan Modra, upstream binutils-gdb git MFC after: 3 weeks Relnotes: yes Notes: svn path=/head/; revision=275718
* Fix mrc and mrc2 with APSR_nzcv. Binutils encodes it internally as 0 whereAndrew Turner2014-12-071-1/+5
| | | | | | | | | | | we need it to be set to 15 for it to be equivalent to r15. MFC after: 1 week X-MFC with: r275415 Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=275584
* Allow the UAL APSR_nzcv format for the mrc and mrc2 instructions. The clangAndrew Turner2014-12-021-2/+2
| | | | | | | | | | | integrated assembler only allows these forms so binutils will need to support them. MFC after: 1 Week Sponsored by: AB Systems Ltd Notes: svn path=/head/; revision=275415
* Let GNU ld be less obscure about missing symbols and DSOs. If the BFDDimitry Andric2014-12-022-4/+33
| | | | | | | | | | | | | | | | | 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 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D1152 Notes: svn path=/head/; revision=275386
* Use llabs when getting the absolute value of a long long.Andrew Turner2014-11-301-10/+10
| | | | | | | Sponsored by: ABT Ststems Ltd Notes: svn path=/head/; revision=275336
* Implement --no-fatal-warning for compatibility with newer ldBaptiste Daroussin2014-11-291-0/+10
| | | | | | | | what ever order the options are passed to ld(1) the --no-fatal-warning always disable --fatal-warning Notes: svn path=/head/; revision=275240
* Avoid undefined behaviour in gas's rotate_left() macro for n == 0.Dimitry Andric2014-11-221-1/+1
| | | | | | | | | | | | Otherwise, clang can effectively remove the first iteration of the for loops where this macro is invoked, and as a result, "cmp r0, #99" fails to assemble. Obtained from: joerg at netbsd MFC after: 3 days Notes: svn path=/head/; revision=274856
* Improve support for XSAVE with debuggers.John Baldwin2014-11-212-0/+3
| | | | | | | | | | | | | | | | | | | | | | - Dump an NT_X86_XSTATE note if XSAVE is in use. This note is designed to match what Linux does in that 1) it dumps the entire XSAVE area including the fxsave state, and 2) it stashes a copy of the current xsave mask in the unused padding between the fxsave state and the xstate header at the same location used by Linux. - Teach readelf() to recognize NT_X86_XSTATE notes. - Change PT_GET/SETXSTATE to take the entire XSAVE state instead of only the extra portion. This avoids having to always make two ptrace() calls to get or set the full XSAVE state. - Add a PT_GET_XSTATE_INFO which returns the length of the current XSTATE save area (so the size of the buffer needed for PT_GETXSTATE) and the current XSAVE mask (%xcr0). Differential Revision: https://reviews.freebsd.org/D1193 Reviewed by: kib MFC after: 2 weeks Notes: svn path=/head/; revision=274817
* Rename elf*-powerpc into elf*-powerpc-freebsd in binutilsBaptiste Daroussin2014-10-105-3/+6
| | | | | | | | | | | | | | | | The powerpc support was the only supported architecture not prepending the elf format name with "-freebsd" in base this change makes it consistent with other architectures. On newer version of binutils the powerpc format is also prepended with "-freebsd". Also modify the kernel ldscripts in that regards. As a result it is now possible cross build the kernel on powerpc using newer binutils Differential Revision: https://reviews.freebsd.org/D926 Differential Revision: https://reviews.freebsd.org/D928 Notes: svn path=/head/; revision=272888
* Merge the big-endian ARM targets together, and the little-endian ARMAndrew Turner2014-10-051-10/+2
| | | | | | | | targets. With this we assume any ARM target containing eb is big-endian, otherwise it is little-endian. Notes: svn path=/head/; revision=272564
* Silence a warning about Tag_Virtualization_use being unknown. We don'tAndrew Turner2014-10-042-1/+4
| | | | | | | handle merging this tag correctly, however it's unused. Notes: svn path=/head/; revision=272524
* Add movw and movt relocations to the list of relocations against functionAndrew Turner2014-10-041-0/+6
| | | | | | | | | | | names that must nnot be adjusted. This fixes a bug where code such as: movw r2, :lower16:symbol movt r2, :upper16:symbol It is common for clang to generate such code when targeting armv7. Notes: svn path=/head/; revision=272519
* Allow vld and vst instructions to use the canonical form from ARM ARM whenAndrew Turner2014-10-031-0/+17
| | | | | | | | | | | | | including an alignment. Previously binutils would only allow instructions in the form "vld1.64 {d0, d1}, [r0, :128]" where the final comma should not be there, instead the above instruction should be "vld1.64 {d0, d1}, [r0:128]". This change duplicates the alignment code from within the function to handle this case. Notes: svn path=/head/; revision=272476
* Add all the dmb/dsb optional limitations, including the alternative values.Andrew Turner2014-10-031-4/+12
| | | | | | | These are needed for some code llvm generates when targeting ARMv7. Notes: svn path=/head/; revision=272473
* Allow the optional limitation on dmb instructions as is already the caseAndrew Turner2014-10-031-0/+1
| | | | | | | with dsb instructions. Notes: svn path=/head/; revision=272472
* In r253839 the default behaviour of ld(1) was changed such that allTijl Coosemans2014-08-281-10/+11
| | | | | | | | | | | | | | | | | | | | | | | libraries that need to be linked into an executable or library have to be listed on the command line explicitly. This commit fixes a bug in ld(1) where it would scan dependencies of the libraries on the command line and link them if needed if they were also found in ld.so.cache. The important bit of the patch is the initialisation of needed.by such that libraries found by scanning dependencies are marked as such and not used in the link. The patch is a backport of binutils git commit d5c8b1f8561426b41aa5330ed60f578178fe6be2 The author gave permission to use it under GPLv2 terms. PR: 192062 Exp-run by: antoine MFC after: 1 week Notes: svn path=/head/; revision=270757
* Teach as(1) to handle the arm .arch_extension pseudo-op, which acceptsIan Lepore2014-08-011-0/+31
| | | | | | | | | | | | | | the same values as the -march= command line option. Add support for the "sec" extension (security extensions). We've been getting away without support for the sec extension because it's bogusly enabled even on arches where its presence is optional. This support for .arch_extension is being added mainly so that we can use the right directives in our source code, and that helps folks using external toolchains (and will help us when we finally update our toolchain). Notes: svn path=/head/; revision=269394
* Fix an bug in as(1) parsing of arm -march=arch+ext options. Compare theIan Lepore2014-08-011-1/+1
| | | | | | | arch name to just the characters before the '+' in 'arch+ext'. Notes: svn path=/head/; revision=269393
* Add support for the 'rdseed' instruction.John Baldwin2014-05-183-1/+22
| | | | Notes: svn path=/head/; revision=266391
* For GNU as, add two missing modes for each of the fcomip and fucomipDimitry Andric2014-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 Notes: svn path=/head/; revision=264238
* Add a new ARM TARGET_ARCH, armv6hf. This is considered experimental.Andrew Turner2014-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. Notes: svn path=/head/; revision=263660
* Make gas accept any PowerPC instruction by default. This is a local change,Justin Hibbits2014-02-031-1/+1
| | | | | | | | | | and will not be submitted upstream. Discussed with: nwhitehorn,rdivacky MFC after: 1 month Notes: svn path=/head/; revision=261422
* binutils: add support for Intel SMAP-related instructionsPedro F. Giffuni2014-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 Notes: svn path=/head/; revision=261175
* Fix cross-compilation of ia64 target code with clang.Marcel Moolenaar2013-12-282-6/+6
| | | | Notes: svn path=/head/; revision=260021
* cxxfilt: small changes from Apple's developer toolsPedro F. Giffuni2013-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/ Notes: svn path=/head/; revision=258017
* Queisce warning about attempting to add char * together and use explicitSean Bruno2013-10-311-22/+22
| | | | | | | array indexing to indicate what is meant to be done Notes: svn path=/head/; revision=257464
* Queisce warning about attempting to add char * together and use explicitSean Bruno2013-10-311-1/+1
| | | | | | | array indexing to indicate what is meant to be done Notes: svn path=/head/; revision=257463
* Queisce warning about empty bodies in these loops by bumping the ;; to theSean Bruno2013-10-292-3/+6
| | | | | | | next line. Notes: svn path=/head/; revision=257360
* binutils/bfd: fix printf-like format strings for "bfd *" argumentsEygene Ryabinkin2013-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 Notes: svn path=/head/; revision=257302
* Don't force 64-bit DWARF2 on MIPSEd Maste2013-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 Notes: svn path=/head/; revision=256859
* Merge from projects/arm_eabi_vfp r255380:Andrew Turner2013-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. Notes: svn path=/head/; revision=256790
* Fix .debug_line prologue header length calculation for 64-bit DWARFEd Maste2013-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 Notes: svn path=/head/; revision=256692
* Add support for assembling and disassembling Intel Random NumberDimitry Andric2013-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 Notes: svn path=/head/; revision=256112
* Use correct size for MIPS .rld_map sectionEd Maste2013-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) Notes: svn path=/head/; revision=255982
* Fix a bug in ld, where indirect symbols are not handled properly duringDimitry Andric2013-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 Notes: svn path=/head/; revision=255931
* Add an elf note on ARM to store the MACHINE_ARCH an executable was builtAndrew Turner2013-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) Notes: svn path=/head/; revision=255874
* Improve readelf notes output for Linux ELF filesEd Maste2013-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) Notes: svn path=/head/; revision=255522
* Add support for the 'invpcid' instruction to binutils and DDB'sJohn Baldwin2013-09-034-3/+26
| | | | | | | | | disassembler on amd64. MFC after: 1 month Notes: svn path=/head/; revision=255192
* Silence a warning that is incorrect on ARMv6 and later. In the smull, umull,Andrew Turner2013-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. Notes: svn path=/head/; revision=254449
* Change default behaviour of ld(1) to not recursively copy DT_NEEDEDBaptiste Daroussin2013-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. Notes: svn path=/head/; revision=253839
* Correct ELF note decoding for non-core filesEd Maste2013-07-191-3/+16
| | | | | | | Requested by: kib Notes: svn path=/head/; revision=253461
* Correct alignment in note outputEd Maste2013-07-181-1/+1
| | | | Notes: svn path=/head/; revision=253454