summaryrefslogtreecommitdiff
path: root/gnu
AgeCommit message (Collapse)Author
2015-11-12With --enable-new-dtags, only generate DT_RUNPATH and no DT_RPATHPhilip Guenther
ok kettenis@
2015-11-11update NAME;Jason McIntyre
kettenis ok'd me poking around in here; ingo ok'd the diff
2004-05-17import binutils 2.14 (excluding testsuites, .info files, and .po files)Dale Rahn
2015-11-11Correct several DT_foo (tag id) vs DF_* (flag bit) errorsPhilip Guenther
ok deraadt@ kettenis@
2015-11-09Start moving some vmm things into the tree. First up is binutils so we willMike Larkin
be able to use the virtualization instructions. ok'ed a long time ago, I forgot who, but deraadt@ ok'ed it again anyway.
2015-11-08Revert 1.2 and 1.3 in order to go back to the default upstream behaviourMiod Vallat
of registering an explicit dependency upon libstdc++.so when linking a shared library with c++. The explicit dependency had been reverted a long time ago when most of our platforms were still usinc gcc 2.95, in order to have the same behaviour between g++ 2.95 and g++ 3.3, for the sake of ports. However, when we started using gcc 4, the default behaviour was not modified, and nowadays, it's g++ 3 which differs from g++ 4. By reverting to the original behaviour, g++ 3 is on par with g++ 4 again.
2015-10-30Use crypt_checkpass() instead of strcmp(hash, crypt(password, hash)).Todd C. Miller
Fixes a crash in pserver mode when CVSROOT/passwd contains an old DES password.
2015-10-22Add pledge(2) to some binutils that handle untrusted data. Most can do withPascal Stumpf
"stdio rpath", while objdump(1) also needs "tmppath" for objdump -i. ok deraadt@, comments sthen@ kettenis@
2015-10-20On xmalloc failure, stop trying to determine the total amount of allocatedPascal Stumpf
memory up to this point by using sbrk(2). This is of course wildly incorrect for any mmap-based malloc(3). This also makes it possible to bring pledge(2) to gnu/. comments kettenis@, ok miod@
2015-10-07Correct handling of enum attributes with g++Jonathan Gray
gcc and g++ can currently have different ideas on the size of a packed enum type: enum __attribute__((packed)) foo { a = 0, b}; gcc: 1 g++: 4 enum foo { a = 0, b} __attribute__((packed)); gcc: 1 g++: 1 The first format is actually the preferred one according to the documentation. https://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Type-Attributes.html g++ will accept the first format and silently not actually choose a smaller size. This was responsible for memory corruption with recent versions of Mesa where c and c++ code share a header with a packed enum type. The problem was reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39219 and fixed in gcc >= 4.3.6 in rev 144284. This was after the switch from gplv2 but it's a trivial one line change. ok guenther@ deraadt@ kettenis@
2015-09-16Enable -msecure-plt by default (on powerpc).Mark Kettenis
ok pascal@
2015-09-15Make the famous _S_debug_messages warning go away, by hidining that symbol.Vadim Zhukov
This symbol isn't used anywhere outside libstdc++, thus no bump. Upstream initially went the samy way, but then implemented a different fix, which don't work for us. Eventually we should move to whitelisting the list of symbols exported anyway. okay miod@, no objections from sthen@; also supported by a few a while ago
2015-09-11Avoid undefined behavior with isascii, cast its argument to unsigned char.Jeremie Courreges-Anglas
Suggested earlier by guenther@, discussed with miod@
2015-09-10Makde gcc handle __stack_smash_handler similarly to memcpy and memset whenPhilip Guenther
creating calls: cache the RTL, let a declaration alter the asm spec, and set the same RTL attributes. For all three, let a declaration set the ELF visibility. ok miod@
2015-09-09Fix various buffer overflows (caused by the way struct iso_directory_recordMiod Vallat
is defined), and make this work on unsigned char platforms by using isascii() instead of < 0. While there, do not use the local getopt() implementation, as libc has had getopt_long() support for years now. With help from jca@ and guenther@. ok millert@, deraadt@ (on an earlier diff)
2015-09-09For truly static binaries, force .ctors, .dtors and .got to be read-only.Mark Kettenis
This will make the segment containing those sections read-only for binaries that use the OpenBSD W^X layout, preventing W^X violations on architectures that need an executable GOT (basically BSS-PLT powerpc). ok miod@
2015-08-31The code that guesstimates the number of local GOT entries assumes that thereMark Kettenis
are only two loadable segments. With W^X on OpenBSD, we will typically create more than two. Most shared libraries and binaries end up with five of them. One of them is the GOT itself so we don't need to take that one into account. So raise the number of spare local GOT entries from 5 to 7. This fixes building liblto_plugin.so in the gcc 4.9 port. ok miod@, jasper@, pascal@
2015-08-28Make gdb work again on mips64 PIE binaries by making sure that we selectMark Kettenis
a reasonable 64-bit ABI for 64-bit ELF files instead of a 32-bit ABI.
2015-08-28Add support for Irix-style "64-bit" archives.Mark Kettenis
ok visa@, deraadt@
2015-08-28Do proper GOT slot accounting for symbols that were forced to be local.Mark Kettenis
This fix first appeared in FSF binutils after the switch to GPLv3. However Daniel Jacobowitz, who wrote the fix, confirms he worked for CodeSourcery at the time (as suggested by the ChangeLog entry), and CodeSourcery included this fix in the 4.1-176 version of their toolchain that was distributed under GPLv2. ok guenther@, ok deraadt@
2015-08-25Unbreak binutils on sparc64, hppa (and probably some others).Theo de Raadt
Jumbo merges are NOT WELCOME. They have to be seperated out and tested.
2015-08-24add missing includes for free, exit, errx and strchrJonathan Gray
2015-08-23Introduce -Bsymbolic-functions and related flags. Taken from twoBrian Callahan
post-binutils 2.17 but pre-GPLv3 commits. miod@ says now is the time to get this in.
2015-08-23Define HAVE_AS_REL16, as binutils 2.17 supports the R_PPC_REL16 reloc.Mark Kettenis
This makes the -msecure-plt option work, which is necessary to generate Secure-PLT ABI code.
2015-08-23Enable missing code to fully enable the Secure-PLT ABI and clean up theMark Kettenis
remaining commented out variable settings. We'll continue to use the same layout for both BSS-PLT and Secure-PLT since supporting the more relro friendly layout that Linux uses isn't compatible with our way of making the PLT and GOT read-only.
2015-08-03Prevent a NULL dereference when a plt entry is not found.Martin Pieuchot
This smells like a workaround but it allows audio/mpd to build and the resulting binary runs well enough to make landry@ happy. In any case, having a broken binary is not much worse than not having a binary because ld(1) crashed. ok miod@, deraadt@
2015-07-27Implement support for __builtin_complex() to construct complex values,Martynas Venckus
required by the upcoming libm work. OK miod@.
2015-07-19Add the documentation of -Wbounded and attribute(bounded) from gcc-local(1)Miod Vallat
to the gcc info documentation as well.
2015-07-17Correctly consume mandatory 0x66 prefix when disassemblingMiod Vallat
aes{dec{,last},enc{,last},imc} instructions (regression in 2.17). Correctly disassemble aeskeygenassist. Before (binutils 2.15): 0: 66 0f 38 db c8 aesimc %xmm0,%xmm1 5: 66 0f 3a 44 da 04 pclmulqdq $0x4,%xmm2,%xmm3 b: 66 0f 3a 44 ec 10 pclmullqhqdq %xmm4,%xmm5 11: 66 data16 12: 0f .byte 0xf 13: 3a df cmp %bh,%bl 15: fe 08 decb (%rax) Currently (binutils 2.17): 0: 66 data16 1: 0f 38 db aesimc %xmm1,%xmm1 4: c8 66 0f 3a enterq $0xf66,$0x3a 8: 44 da 04 66 rexX fiaddl (%rsi,2) c: 0f 3a 44 ec 10 pclmullqhqdq %xmm4,%xmm5 11: 66 data16 12: 0f .byte 0xf 13: 3a df cmp %bh,%bl 15: fe 08 decb (%rax) With these changes: 0: 66 0f 38 db c8 aesimc %xmm0,%xmm1 5: 66 0f 3a 44 da 04 pclmulqdq $0x4,%xmm2,%xmm3 b: 66 0f 3a 44 ec 10 pclmullqhqdq %xmm4,%xmm5 11: 66 0f 3a df fe 08 aeskeygenassist $0x8,%xmm6,%xmm7
2015-07-16The expected behavior of Perl srand(0) is a deterministic pseudoAlexander Bluhm
random stream. Only srand() should give real random values. Make our pimped Perl more compatible with the rest of the world. OK afresh1@ millert@
2015-07-03Link static pie binaries against rcrt0.oMiod Vallat
2015-06-26Avoid an assertion failure in elf32_arm_size_dynamic_sections() whenMiod Vallat
building a static binary out of PIE objects; similar to the logic found on other platforms, for some reason arm was lacking this fix.
2015-06-18Fix stack shuffle such that sj includes si and the last element actuallyMartynas Venckus
gets a chance to be reordered.
2015-06-16Do not provide extra _fdata and __data_start symbols; nothing in the non-mips32Miod Vallat
world uses them.
2015-06-15Don't error out when an existing typedef is redefined with the same definition;Miod Vallat
this is allowed in C11 and 3rd-party software is relying upon this to be accepted by the compiler. Nevertheless warn about this if -pedantic. ok ajacoutot@ deraadt@ millert@
2015-06-13Add more encodings of options for the armv7 barrier instructions andJonathan Gray
allow non "sy"/0xf options for dmb. This omits the *ld options available in armv8 running in a32 mode. Similiar changes made in freebsd. ok miod@
2015-06-11Fix CVE-2012-3509, an integer overflow in libiberty, leading toAlexander Bluhm
heap-buffer overflow. From Sebastian Trahm; OK deraadt@
2003-11-24And the includes are taken from GCC 2.95.pre3 test3Marc Espie
2015-06-03Actually commit the bits that make the compiler emit visibility informationMark Kettenis
for (undefined) references with non-default visibility on mips64.
2015-06-01Revert 1.2, which used to be necessary during the early ld 2.17 work, butMiod Vallat
hasn't been required for a while.
2015-06-01Enable secureplt by default on alpha. The old plt flavour can still beMiod Vallat
obtained by passing --no-secureplt to ld(1), or -Wl,--no-secureplt to cc(1) when linking.
2015-06-01Define HAVE_AS_EXPLICIT_RELOCS and HAVE_AS_JSRDIRECT_RELOCS. These symbols areMiod Vallat
only used by the alpha backend and allow it to produce more precise relocation information, but need a recent as(1) for this to work. This will be necessary to enable secureplt by default.
2015-06-01Now that we do not need to build binutils 2.15 (except for gdb), simplify theMiod Vallat
build logic.
2015-05-26Improve diffability against m68k.Miod Vallat
2015-05-25Port the ELF m88k work to binutils 2.17. Good enough to build a bootingMiod Vallat
kernel, and hopefully userland as well.
2015-05-25vax ELF bits for binutils 2.17.Miod Vallat
2015-05-25Change ENTRY to __start to match binutils 2.15, needed for static PIEMiod Vallat
2015-05-25Teach binutils the {rd,wr}{fs,gs}base instructions.Philip Guenther
Flag bits worked out with kettenis@ ok mlarkin@
2015-05-21Re-remove extra perl utils, patch lost in 5.20.2 updateAndrew Fresh
pointed out by miod@
2015-05-19Keep visibility information for references to discarded sections.Mark Kettenis