| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
| |
Fix parsing of 'vmov Q<n>.F32,Q<n>.F32' instruction.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
No functional change.
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
|
|
|
| |
"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
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Submitted by: dan.mcgregor_usask.ca (Dan McGregor)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D3376
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
shared libraries as either SOFT or HARD float to comply with the EABI
standard.
Differential Revision: https://reviews.freebsd.org/D2401
|
|
|
|
|
|
|
| |
when things don't match, report which file has them and which one
doesn't correctly.
Differential Revision: https://reviews.freebsd.org/D2400
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
support in the kernel. Userspace programs are expected to rely on LLVM's
integrated assembler or newer binutils.
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
not being in the enumerated type 'enum elf_ppc_reloc_type', by casting
the switch argument to int.
MFC after: 3 days
|
|
|
|
|
|
| |
warnings.
MFC after: 3 days
|
|
|
|
|
|
|
|
| |
Alan Modra (and Alan's employer) graciously permitted use of his patch
under GPLv2.
Obtained from: OpenBSD
MFC after: 5 days
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
integrated assembler only allows these forms so binutils will need to
support them.
MFC after: 1 Week
Sponsored by: AB Systems Ltd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Sponsored by: ABT Ststems Ltd
|
|
|
|
|
| |
what ever order the options are passed to ld(1) the --no-fatal-warning always
disable --fatal-warning
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
targets. With this we assume any ARM target containing eb is big-endian,
otherwise it is little-endian.
|
|
|
|
| |
handle merging this tag correctly, however it's unused.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
These are needed for some code llvm generates when targeting ARMv7.
|
|
|
|
| |
with dsb instructions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
arch name to just the characters before the '+' in 'arch+ext'.
|
| |
|