summaryrefslogtreecommitdiffstats
path: root/contrib/binutils
Commit message (Collapse)AuthorAgeFilesLines
* MFC r327164:dim2018-02-212-5/+5
| | | | | | | | | | | | | | | | | | | | Fix clang 6.0.0 compiler warnings in binutils Latest clang git has a warning -Wnull-pointer-arithmetic which will trigger a -Werror failure. Addition and subtraction from a null pointer is undefined behaviour and could be optimized into anything. Furthermore, using the difference between two pointers and casting the result back to a pointer is not portable since the size of ptrdiff_t does not necessary have to be the same as size of void* (this happens e.g. on CHERI). Using intptr_t instead fixes this portability issue and the compiler warning. Submitted by; Alexander Richardson Obtained from: CheriBSD Differential Revision: https://reviews.freebsd.org/D12928 (cherry picked from commit 0cd25a0c5807abc3eb947abf62bc29f95037eba2)
* MFC r318135:mmel2017-05-241-8/+8
| | | | Fix parsing of 'vmov Q<n>.F32,Q<n>.F32' instruction.
* MFC r312899: add octeon+ as an alias for octeon in GCC & binutilsemaste2017-03-031-0/+1
| | | | | | | | | | | | | | | | | | r208737 added support for the "mips64r2" architecture and "octeon" CPU, and the saa/saad instructions. Upstream binutils also added the "octeon+" CPU, and the saa/saad instructions are only available in octeon+, not octeon. Since our base system tool chain already accepts saa/saad with -march=octeon, just allow octeon+ as an alias. This allows the use of octeon+ in kernel config files, for use with both external tool chain and in-tree GCC/binutils. Also includes GCC FBSD_CC_VER bump (r313041 in HEAD) PR: 216516 Sponsored by: The FreeBSD Foundation
* MFC r310132:pfg2016-12-211-1/+1
| | | | | | | | | libbfd: make sure variables are initialized before using them. Initialize l_sec_contents to make sure that free(l_sec_contents) is called on valid pointers. Obtained from: OpenBSD (partial CVS rev 1.18)
* MFC r303147pfg2016-08-201-1/+1
| | | | | | | | | | | binutils: fix "Bad value" error in bfd for MIPS when using -Bsymbolic. From OpenBSD's log: Inspired by https://sourceware.org/ml/binutils/2010-08/msg00333.html, but expressed differently so there are no GPLv3 issues. Obtained from: OpenBSD (CVS rev. 1.7)
* Replace local prototype of basename() with an inclusion of <libgen.h>.ed2016-05-291-1/+1
| | | | | | | | | | | | | | | | | libiberty currently defines the prototype for basename() itself instead of using <libgen.h>. It still uses the BSD-style prototype instead of the POSIX one, meaning that if FreeBSD would switch over to the POSIX one, you wouldn't be able to use libiberty.h and libgen.h in a single source file. It turns out that kgdb does this. Patch up libiberty to just include <libgen.h>. I'm currently talking to upstream to see whether we can come up with a more complete solution that could be integrated, but for our unmaintained copy of GDB in base, let's just apply the simplest workaround possible. Reviewed by: pfg Differential Revision: https://reviews.freebsd.org/D6631
* gas: Implement the .inst assembler directive for arm.pfg2016-05-201-0/+32
| | | | | | | | We normally use the binutils from ports but on other systems this is required for building gcc 4.9. Obtained from: OpenBSD (CVS rev. 1.5) MFC after: 3 weeks
* gas/config/tc-arm.c: Minor re-sorting to match upstream history.pfg2016-05-201-2/+2
| | | | | | No functional change. MFC after: 2 weeks
* Fix a problem in ld, causing it to sometimes print messages similar todim2016-02-221-2/+2
| | | | | | | | | | | | "invalid string offset 65521 >= 27261 for section `.strtab'". for object files produced by recent versions of clang. In BFD's elf_create_symbuf() function, the size of the symbol buffer ('ssymbuf') is not calculated correctly, and the initial value for the 'ssym' variable is off by one, since 'ssymbuf' has shndx_count + 1 members. MFC after: 1 week
* Unconditionally set e_ident[OSABI]=ELFOSABI_FREEBSD in arm binary headers.ian2016-02-211-12/+2
| | | | | | | | | When the armv6 support was imported from a project branch, this complex conditional logic and related #define'd values came along, but it's really not clear what the intent of it all was. The effect, however, was that OSABI was always set to zero, which is "UNIX System V ABI". Having the wrong value there causes pkg(8) to avoid looking inside arm elf binaries to determine shared-lib required/provides info for packaging.
* Add the MOVT/MOVW types to the list of relocs which do not generate .pltian2015-12-301-6/+20
| | | | | | entries. This fixes the segfaults in arm userland code compiled with -march= or -mcpu= values that allow the compiler to generate movw/movt sequences to load 32-bit constants.
* Correct the code for sign-extending a 16 bit value. As near as I can tellian2015-12-291-1/+1
| | | | | this is effectively a no-op -- the addend term in MOVT/MOVW relocations always seems to be zero. But this is correct and the old code wasn't.
* In binutils' arm-dis.c, avoid left-shifting a negative number.dim2015-09-221-1/+1
| | | | | | Submitted by: dan.mcgregor_usask.ca (Dan McGregor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D3376
* In GNU as, avoid left-shifting negative integers, which is undefined.dim2015-08-091-2/+2
| | | | MFC after: 3 days
* Copy new attribute types when linking. bfd will copy attributes as needed,andrew2015-05-051-0/+3
| | | | | | | | | | however it will fail to output them if the type is not set correctly. This can happen when it finds an attribute it hasn't seen before, for example when building shared objects it will use the attributes from crti.o, hwever this file has no attributes set. Differential Revision: https://reviews.freebsd.org/D2413 Reviewed by: imp
* For eabi 5 (what FreeBSD uses), be sure to tag all executables andimp2015-05-031-0/+10
| | | | | | | shared libraries as either SOFT or HARD float to comply with the EABI standard. Differential Revision: https://reviews.freebsd.org/D2401
* When merging the floating point type attribute, and reporting an errorimp2015-05-031-1/+14
| | | | | | | when things don't match, report which file has them and which one doesn't correctly. Differential Revision: https://reviews.freebsd.org/D2400
* More ARM EABI object attributes in binutils. This adds support to binutilsandrew2015-04-033-3/+11
| | | | | | | | | | | | | | to include the Unaligned Access and Floating-point Half-precision attributes. the former marks ELF objects that may access ARMv6 style unaligned data, the latter that the binary uses the VFPv3/Advanced SIMD half-precision extension. These may be emmitted by clang so it's best to print a warning when the linker hits one of them. Differential Revision: http://reviews.freebsd.org/D2194 Submitted by: Michal Meloun <meloun@miracle.cz> MFC after: 1 week
* Remove pregenerated text version of the texinfo documentationbapt2015-03-022-20488/+0
|
* Generate manpage out of the texinfo files using texi2mdocbapt2015-03-024-0/+22381
|
* GNU nm: Avoid NULL dereferenceemaste2015-02-251-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. MFC after: 1 week Sponsored by: The FreeBSD Foundation
* Add some opcodes for assembling forthcoming VSX (Vector-Scalar eXtension)nwhitehorn2015-02-221-0/+5
| | | | | support in the kernel. Userspace programs are expected to rely on LLVM's integrated assembler or newer binutils.
* Fix ldscripts such that ld(1) collects the .fini_array section in the sametijl2015-02-111-1/+1
| | | | | | | | | | order as the .init_array section. Finalisation routines need to be called in the opposite order as their corresponding initialisation routines but rtld(1) handles that by calling the function pointers in .fini_array in reverse order. Reviewed by: kib MFC after: 2 weeks
* Add pregenerated documentation for as(1) and ld(1)bapt2015-01-045-0/+20604
|
* Fix generating documentation with modern texinfobapt2015-01-041-1/+1
|
* Fix generating documents with modern texinfobapt2015-01-042-8/+8
|
* In contrib/binutils/bfd/elf32-ppc.c, avoid warnings about case valuesdim2014-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
* In contrib/binutils/gas/config/tc-ppc.c, fix a few -Wformat-securitydim2014-12-281-3/+3
| | | | | | warnings. MFC after: 3 days
* Backport fix for binutils 11867: .quad directive not assembled correctlypfg2014-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
* gas: use memmove instead of bogus memcpy.pfg2014-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
* Make gas parse '__tls_get_addr(foo@tlsgd)'.jhibbits2014-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
* Add new PowerPC relocations to binutilsjhibbits2014-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
* Fix mrc and mrc2 with APSR_nzcv. Binutils encodes it internally as 0 whereandrew2014-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
* Allow the UAL APSR_nzcv format for the mrc and mrc2 instructions. The clangandrew2014-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
* Let GNU ld be less obscure about missing symbols and DSOs. If the BFDdim2014-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
* Use llabs when getting the absolute value of a long long.andrew2014-11-301-10/+10
| | | | Sponsored by: ABT Ststems Ltd
* Implement --no-fatal-warning for compatibility with newer ldbapt2014-11-291-0/+10
| | | | | what ever order the options are passed to ld(1) the --no-fatal-warning always disable --fatal-warning
* Avoid undefined behaviour in gas's rotate_left() macro for n == 0.dim2014-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
* Improve support for XSAVE with debuggers.jhb2014-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
* Rename elf*-powerpc into elf*-powerpc-freebsd in binutilsbapt2014-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
* Merge the big-endian ARM targets together, and the little-endian ARMandrew2014-10-051-10/+2
| | | | | targets. With this we assume any ARM target containing eb is big-endian, otherwise it is little-endian.
* Silence a warning about Tag_Virtualization_use being unknown. We don'tandrew2014-10-042-1/+4
| | | | handle merging this tag correctly, however it's unused.
* Add movw and movt relocations to the list of relocations against functionandrew2014-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.
* Allow vld and vst instructions to use the canonical form from ARM ARM whenandrew2014-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.
* Add all the dmb/dsb optional limitations, including the alternative values.andrew2014-10-031-4/+12
| | | | These are needed for some code llvm generates when targeting ARMv7.
* Allow the optional limitation on dmb instructions as is already the caseandrew2014-10-031-0/+1
| | | | with dsb instructions.
* In r253839 the default behaviour of ld(1) was changed such that alltijl2014-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
* Teach as(1) to handle the arm .arch_extension pseudo-op, which acceptsian2014-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).
* Fix an bug in as(1) parsing of arm -march=arch+ext options. Compare theian2014-08-011-1/+1
| | | | arch name to just the characters before the '+' in 'arch+ext'.
* Add support for the 'rdseed' instruction.jhb2014-05-183-1/+22
|
OpenPOWER on IntegriCloud