When rewriting an ELF header (i.e. in strip and objcopy), keep the.openbsd.syscalls section with the PT_OPENBSD_SYSCALLS phdr, even though isdoes not have the ALLOC flag; otherwise the phdr gets re
When rewriting an ELF header (i.e. in strip and objcopy), keep the.openbsd.syscalls section with the PT_OPENBSD_SYSCALLS phdr, even though isdoes not have the ALLOC flag; otherwise the phdr gets rewritten with a sizeof zero, which prevents the binary from working.ok kettenis@
show more ...
Add basic support for R_386_GOT32XRepairs ld.bfd operations on i386: since the switch to llvm-16 clangemits such relocations (eg one is present in /usr/lib/crtbegin.o).This unbreaks the build of
Add basic support for R_386_GOT32XRepairs ld.bfd operations on i386: since the switch to llvm-16 clangemits such relocations (eg one is present in /usr/lib/crtbegin.o).This unbreaks the build of ports/lang/fpc.Help and tests from tb@, ok tb@ kettenis@
Collect .openbsd.syscalls sections into a new PT_OPENBSD_SYSCALLS segment.This will be used soon to pin system calls to designated call sites.ok deraadt@
Missing bit to make ld.bfd actually emit PT_OPENBSD_NOBTCFI.ok deraadt@
oops, an extra PT_ snuck in; spotted by guenther
use symbolic name PF_X instead of 1, pointed out by kettenis
teach the BFD tools how to handle NOBTCFI, quite similar to WXNEEDEDok kettenis
Implement --execute-only (and turn --no-execute-only from a no-op into anoptions that does the opposite).Note that this option is likely to be ineffective without changes to thelinker scripts. A
Implement --execute-only (and turn --no-execute-only from a no-op into anoptions that does the opposite).Note that this option is likely to be ineffective without changes to thelinker scripts. A change that adjusts the hppa linker scripts will followshortly. Other architectures will need some work.ok deraadt@
Fix DT_MIPS_RLD_MAP_RELUse proper tag-relative values for DT_MIPS_RLD_MAP_REL tags.This causes an ABI break on mips64. Your system must have latest ld.sobefore applying this commit.OK deraadt@
Fix DT_MIPS_RLD_MAP_RELUse proper tag-relative values for DT_MIPS_RLD_MAP_REL tags.This causes an ABI break on mips64. Your system must have latest ld.sobefore applying this commit.OK deraadt@ kettenis@
Use correct size for mips64 .rld_map section.From FreeBSD commit 36afc9ab6c1c7fdb2e40bdcfde169501d962dd84OK kettenis@
Implement DT_MIPS_RLD_MAP_REL support and add such an entry to PIEexecutables.ok deraadt@
In the linkers, collect objects in section "openbsd.mutable" and placethem into a page-aligned region in the bss, with the right markers forkernel/ld.so to identify the region and skip making it im
In the linkers, collect objects in section "openbsd.mutable" and placethem into a page-aligned region in the bss, with the right markers forkernel/ld.so to identify the region and skip making it immutable.While here, fix readelf/objdump versions to show all of this.ok miod kettenis
Teach binutils enough about RELR relocations to not break them and forreadelf to display them in a way compatible with llvm-readelf, includingthe --raw-relr debugging optionok kettenis@
Do not extend PT_DYNAMIC segment on mips64The IRIX-specific extension of the PT_DYNAMIC segment is not neededby the dynamic linker on OpenBSD/mips64. Disable it so that the .dynamicsection stays
Do not extend PT_DYNAMIC segment on mips64The IRIX-specific extension of the PT_DYNAMIC segment is not neededby the dynamic linker on OpenBSD/mips64. Disable it so that the .dynamicsection stays at the start of the PT_DYNAMIC segment even when .dynstr,.dynsym or .hash precedes .dynamic in the ELF file. This enablesBinutils 2.17 tools, such as strip(1), rewrite executables and sharedlibraries that have been produced by LLD.OK kettenis@
minimalistic diff to use %ld instead of %d for ptrdiff printing
add some aarch64 bits missed in Makefile.in 1.6ok deraadt@ drahn@
repair missing dependencies against bfd.h for riscv64ok jsg drahn
riscv64 binutils 'support'Enable just enough of binutils to be a functional compilation systemwith llvm doing the heavy lifting.With corrections suggested by reviewers.ok jsg@ kettenis@
Use consistent types in comparison to fix build with clang 10.Instead of just checking if *namep is NULL, also check if the stringpointed by *namep is empty. This is probably the original intent o
Use consistent types in comparison to fix build with clang 10.Instead of just checking if *namep is NULL, also check if the stringpointed by *namep is empty. This is probably the original intent ofthe code.OK kettenis@ jsg@ deraadt@
change bfd amd64 ELF_MAXPAGESIZE from 1M to 4KAn amd64 clang 10 binary built with lld 10 would abort after callingexecve(2) if it had been stripped. PT_LOAD segment aligment beingchanged by stri
change bfd amd64 ELF_MAXPAGESIZE from 1M to 4KAn amd64 clang 10 binary built with lld 10 would abort after callingexecve(2) if it had been stripped. PT_LOAD segment aligment beingchanged 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 notdefined by the arch) would have also worked but we don't support largepages in userland.ok kettenis@
Add a few missing elocations.ok jasper@
Don't build the rs6000coff_vec and rs6000coff64_vec targets. Thesegenerate fatal compiler warnings at least when cross-compiling andfixing the code isn't trivial.ok patrick@, drahn@
Adjust some PPC ELF code to return -1 instead of doing pointerarithmetics on NULL, like we did in r1.21 on elflink.c, to stopclang from complaining when setting up a cross-toolchain.ok kettenis@
Make sure that we generate a PLT when a plabel is required even forsymbols that were hidden. Fixes building Mesa on hppa.ok deraadt@
Various fixes to make this compile with clang on powerpc.ok visa@
12345