summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/binutils-2.17 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Extern dwarf2_loc_mark_labels. Fixes compiation with -fno-common.mortimer2021-01-281-1/+1
| | | | ok deraadt@
* Use consistent types in comparison to fix build with clang 10.visa2020-07-311-1/+1
| | | | | | | | Instead of just checking if *namep is NULL, also check if the string pointed by *namep is empty. This is probably the original intent of the code. OK kettenis@ jsg@ deraadt@
* change bfd amd64 ELF_MAXPAGESIZE from 1M to 4Kjsg2020-07-231-1/+1
| | | | | | | | | | | | | An amd64 clang 10 binary built with lld 10 would abort after calling execve(2) if it had been stripped. PT_LOAD segment aligment being changed by strip was the cause. Changing to 4K matches lld and results in a working binary after strip. Introducing ELF_MINPAGESIZE of 4K (which is ELF_MAXPAGESIZE if not defined by the arch) would have also worked but we don't support large pages in userland. ok kettenis@
* Add a few missing elocations.kettenis2020-07-222-0/+65
| | | | ok jasper@
* avoid -Wpointer-compare warning which broke build with clang 10jsg2020-06-181-1/+1
|
* Don't build the rs6000coff_vec and rs6000coff64_vec targets. Thesekettenis2020-05-311-3/+3
| | | | | | | generate fatal compiler warnings at least when cross-compiling and fixing the code isn't trivial. ok patrick@, drahn@
* Initial set of changes to build powerpc64 toolchain.drahn2020-05-301-3/+3
| | | | Disable PIC/PIE for powerpc64 for now.
* Adjust some PPC ELF code to return -1 instead of doing pointerpatrick2020-05-291-1/+1
| | | | | | | arithmetics on NULL, like we did in r1.21 on elflink.c, to stop clang from complaining when setting up a cross-toolchain. ok kettenis@
* Make sure that we generate a PLT when a plabel is required even forkettenis2020-04-091-1/+7
| | | | | | symbols that were hidden. Fixes building Mesa on hppa. ok deraadt@
* avoid build race condition: our make has an "expensive job" heuristicespie2020-01-031-3/+7
| | | | | | | | | | | which means we do stop creating other jobs as soon as we run something looking like "make" to avoid unwanted recursion, so you would never hit that. But in binutils-2.17, the developers changed all/info to do recursive makes with some of the same dependencies. Calling both at the same time becomes an obvious race, and should be fixed for no other reason than correctness. okay guenther@
* a few depend:-related thingies that were still in.espie2019-12-211-4/+1
| | | | okay millert@, tb@
* not renaming those temp files should be fatalespie2019-12-171-1/+5
| | | | | | | this got fixed in recent binutils, but it's GPLv3. So do the same thing in a slightly different way okay guenther@
* Silence the compiler on 64bits archs where sizeof(void *) != sizeof(int).mpi2019-11-081-1/+1
| | | | ok partrick@, kettenis@
* Various fixes to make this compile with clang on powerpc.kettenis2019-08-117-13/+19
| | | | ok visa@
* stop using the moribund MLINKS bsd.man.mk feature;schwarze2019-05-171-2/+3
| | | | | no functional change intended; OK millert@
* Use literals as format strings. This fixes an error reported by clang.visa2019-04-151-2/+2
| | | | OK deraadt@ millert@ kettenis@
* Add a type cast to silence clang error about an implicit conversionvisa2019-04-151-1/+1
| | | | | | from unsigned long to int. OK deraadt@ millert@ kettenis@
* Fix a crash: don't assume that all input files are ELF objectsjca2019-03-011-2/+7
| | | | | | | | | | | | ld(1) would try to free uninitialized memory when used with -r -b binary <fontfile> by ports/textproc/mupdf. Perform the same bfd type check as bfd_elf_match_symbols_in_sections(). Fix found the hard way, cheese and wine sponsor: miod. Almost identical fix already present upstream. Also set the freed pointer to NULL, just in case. ok tb@ sthen@
* Remove -S from install commandskn2019-02-241-2/+2
| | | | | | | | As of usr.bin/xinstall/install.c revision 1.68, -S is a no-op and install(1) will always create files safely, thus clean the option usage from the tree. Diff from Lauri Tirkkonen <lotheac at iki dot fi>, thanks.
* Fix addend handling for relaxing R_PPC_PLTREL24 relocations. This issue haskettenis2019-02-051-0/+3
| | | | | | | | | been fixed in a much more complicated way upstream which we can't easily backport and involves GPLv3 code as well. So instead simply nuke the addend in the most convenient spot. Makes -Wl,-relax work well enough to link base clang. ok guenther@
* Add some fixes from upstream to the code that parses .eh_frame sectionskettenis2019-02-032-190/+344
| | | | | | | | in order the generate .eh_frame_hdr. In particular, don't rely on FDEs pointing to the last CIE that was seen. Fixes exception handling issues with clang++ on platforms that don't use ld.lld as the default linker. ok deraadt@
* Map SHT_LLVM_LINKER_OPTIONS to stringkettenis2019-01-311-0/+1
| | | | ok patrick@, naddy@
* Ignore LLVM 7's LINKER_OPTIONS section.kettenis2019-01-312-0/+2
| | | | ok patrick@, naddy@
* Remove specific clang version from check for clang.patrick2019-01-272-2/+2
|
* Map SHT_LLVM_ADDRSIG to stringguenther2019-01-131-0/+1
| | | | ok kettenis@ deraadt@
* Ignore LLVM 7's ADDRSIG section.guenther2019-01-132-0/+5
| | | | | Problem reported by bluhm@ ok kettenis@
* Don't print "allocated section '.foobar' not in segment" warning forkettenis2019-01-071-6/+9
| | | | | | zero-sized sections. ok deraadt@, guenther@
* Make gas ignore the ".set hardfloat" directive on mips64.visa2019-01-041-0/+2
| | | | | | | | | The directive is needed in certain parts of the kernel code when compiling using clang. By ignoring the directive, the old toolchain will still be able to build the kernel after the code has been adjusted for clang. OK kettenis@
* Remove unused static function since clang errors out because of this.claudio2018-12-251-12/+0
| | | | OK visa@, mpi@, guenther@
* Add support for R_MIPS_PC32 relocation. It is needed for linking codevisa2018-12-221-0/+20
| | | | | | | | that has been compiled using clang. The added code is based on old binutils code from year 2000. Prodded by and OK jca@, OK kettenis@ guenther@
* The scripts just tests whether GENERATE_PIE_SCRIPT is set and ignores itsguenther2018-12-181-1/+1
| | | | value, so setting it to 'no' was completely misleading
* Generate PIE ldscripts on armv7, hppa, and sh, so that there are symbolsguenther2018-12-183-0/+3
| | | | | | | for the start+end of .{preinit,init,fini}_array sections when building PIE executables. ok kettenis@
* Add PN_XNUM support to libbfd so objdump and gdb can handle coreguenther2018-12-112-1/+39
| | | | | | dumps with many many segments. ok yasuoka@
* Core files with >65535 sections have to use PN_XNUM and a section headerguenther2018-12-062-1/+9
| | | | | | | | to pass the real count, with a minimal .shstrtab segment for consistency. Also, add support for PN_XNUM to readelf. problem reported and testing by claudio@ ok kettenis@
* Merge post-2.17 but pre-GPLv3 diffs that add support for DT_GNU_HASHguenther2018-12-0312-68/+675
| | | | | | | | | | | | | | | to ld and improve the readelf support: https://sourceware.org/ml/binutils/2006-07/msg00129.html https://sourceware.org/ml/binutils/2006-07/msg00181.html Disable the ld support on mips64, as its ABI requires a symbol ordering that conflicts with the requirements of DT_GNU_HASH. Tested on macppc, alpha, and sparc64 to verify operation with all three ELF word size combos testing help miod@ ok kettenis@
* Add GNU_HASH #defines; improve readelf output for SHT_GNU_HASHguenther2018-11-131-0/+1
| | | | ok naddy@ jca@
* Size static array correctly for the numerically highest index used tonaddy2018-10-241-1/+1
| | | | access it. ok deraadt@ kettenis@
* Backport support for option -a to addr2line, which will display each addressanton2018-09-182-2/+21
| | | | | | | | | | | | | given as input before the resolved source location. This change was introduced to bintutils after the switch from GPLv2 but the author Tristan Gingold granted me permission relicense the diff under GPLv2; thanks! Taken as is from binutils commit be6f64938f985dfb0eaa2107b99f193bb865ce04 This option is used by the syzkaller kernel fuzzer to produce a human readable representation of the coverage collected by kcov. ok deraadt@ jca@ visa@
* Pass CC/CFLAGS/LDFLAGS to the configure script. ok millert@naddy2018-09-141-3/+5
|
* Teach binutils how to assemble INVPCID and how to disassembleguenther2018-09-093-7/+26
| | | | | | INV{EPT,VPID,PCID} ok mlarkin@
* Add infrastructure to install lld as the default linker. The old GNU linkerkettenis2018-07-262-4/+12
| | | | | | | | | | | | will be installed as /usr/bin/ld.bfd on supported systems. This allows users to fall back on the old linker by using the -fuse-ld=bfd option on systems where lld is the default linker. Switch armv7 to use lld as the default linker. On arm64 we already use lld as the default linker. Other platforms will keep using the GNU linker for now. ok patrick@, deraadt@, phessler@
* Add --localize-hidden option to objcopy.kettenis2018-05-212-1/+37
| | | | From Sebastien Marie
* Make our ancient binutils recognize .gnu.hash sections such that our toolskettenis2018-04-242-0/+8
| | | | | | don't barf on binaries created by ld.lld(1). From FreeBSD. ok millert@, deraadt@, guenther@
* Patch binutils 2.17 so that it passes option -Wno-null-pointer-arithmeticpatrick2018-04-062-0/+6
| | | | | | when compiling with LLVM 6.0.0. This is a good enough temporary fix. "where's the kaboom?" deraadt@
* LLVM 6.0.0's -Wextra warnings now complain if you do arithmetics on NULLpatrick2018-04-011-2/+2
| | | | | | | | pointers. Since binutils 2.17 is compiled with -Werror, this breaks the build. Change the function to return -1 as suggested by the comment in said function. ok kettenis@
* Avoid undefined behaviour in rorate_left() macro. From NetBSD via FreeBSD.kettenis2017-12-121-1/+1
| | | | | | Makes gas work when compiled with clang. ok patrick@, millert@
* Format string fix from upstream.kevlo2017-11-071-5/+5
| | | | ok millert@
* Revert recent changes to unbreak ports/net/sambajca2017-11-042-10/+0
| | | | | | | | While it is not clear (to me) why that ports ends up with corrupted shared libs, reverting those changes fixes the issue and should allow us to close p2k17 more smoothly. Discussed with a bunch, ok ajacoutot@ guenther@
* Make -zdefs and --no-undefined no-ops for now, to unblock ports devs at p2k17.guenther2017-10-312-0/+10
| | | | | | | | | | We don't link libc into shared-libraries by default to avoid binding libraries to specific libc majors, so those options have always suffered false positives for us, but with the move of functions from libpthread to libc the problem has gotten even worse. A version-agnostic binding to libc would solve this better but it's on back-order behind the pony I requested. tweak and ok deraadt@
* R_AARCH64_NONE should be zero, not 256. The latter was a deprecatedguenther2017-10-241-2/+2
| | | | | | assignment and isn't used by clang/lld. ok jsg@