| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
Fix ldscripts such that ld(1) collects the .fini_array section in the same
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improve support for XSAVE with debuggers.
- 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).
|
|
|
|
|
| |
Add movw and movt relocations to the list of relocations against function
names that must not be adjusted.
|
|
|
|
|
| |
In contrib/binutils/gas/config/tc-ppc.c, fix a few -Wformat-security
warnings.
|
|
|
|
|
|
|
|
|
| |
Backport fix for binutils 11867: .quad directive not assembled correctly
Alan Modra (and Alan's employer) graciously permitted use of his patch
under GPLv2.
Obtained from: OpenBSD
|
|
|
|
|
|
|
|
|
|
| |
gas: use memmove instead of bogus memcpy.
partial_where points into the buffer that begins with buffer_start
so we need to use memmove() to handle the overlap.
Fixes Sourceware-PR 11456.
Obtained from: OpenBSD (CVS rev. 1.2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow the UAL APSR_nzcv format for the mrc and mrc2 instructions. The clang
integrated assembler only allows these forms so binutils will need to
support them.
Sponsored by: ABT Systems Ltd
MFC 275584:
Fix mrc and mrc2 with APSR_nzcv. Binutils encodes it internally as 0 where
we need it to be set to 15 for it to be equivalent to r15.
Sponsored by: ABT Systems Ltd
|
|
|
|
|
|
| |
Use llabs when getting the absolute value of a long long.
Sponsored by: ABT Ststems Ltd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
Avoid undefined behaviour in gas's rotate_left() macro for n == 0.
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In r253839 the default behaviour of ld(1) was changed such that all
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
|
|
|
|
|
|
| |
Fix parsing of arch extensions in binutils/gas.
Use ".arch_extension sec" when compiling ARM TI code that uses the
security extensions.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
For GNU as, add two missing modes for each of the fcomip and fucomip
instructions. Partially obtained from OpenBSD by Pedro Giffuni, while I
added the fcomip variants.
Apparently this should help with compiling certain variants of WebKit.
|
|
|
|
|
|
|
| |
Make gas accept any PowerPC instruction by default. This is a local change,
and will not be submitted upstream.
Discussed with: nwhitehorn,rdivacky
|
|
|
|
|
|
|
|
|
|
|
| |
binutils: add support for Intel SMAP-related instructions
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
|
|
|
|
|
|
|
|
| |
Merge updates from FSF pre4.3 GCC inspired on Apple's gcc:
Updates to libiberty and mangling.
New align attribute.
Merge Apple updates to libstdc++.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
| |
disassembler on amd64.
MFC after: 1 month
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
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.
|
|
|
|
| |
Requested by: kib
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Back out for now: this breaks the i386 build and requires some revision.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Add NT_FREEBSD_NOINIT_TAG for the value of CRT_NOINIT_NOTETYPE.
Check for both of these when detecting a FreeBSD binary in gdb.
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
level version of the instructions. When used in userland the hardware only
allows us to read/write FPSCR.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
exceptions on ARM EABI with static binaries.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
.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.
|
|
|
|
|
| |
Submitted by: Christoph Mallon
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
these even when building soft floating-point code
Submitted by: Daisuke Aoyama <aoyama AT peach.ne.jp>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
error out on files that contain it. (This attribute can be emitted by
newer versions of clang.)
MFC after: 2 weeks
|