summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils/ld
AgeCommit message (Collapse)Author
2004-05-19remove the disabled DO_FORCE_VERS support.Brad Smith
ok drahn@
2004-05-17Resolve merge conflicts, adjust method of W^X handing (.sh files)Dale Rahn
remove testsuites (not useable) remove mmalloc (not part of new binutils).
2004-05-17import binutils 2.14 (excluding testsuites, .info files, and .po files)Dale Rahn
2004-02-10configs for amd64; brad@ okMichael Shalayeff
2003-11-23If gld${EMULATION_NAME}_search_dir() returns NULL, return earlyNikolay Sturm
and try not to fopen(NULL, ...) later. ok millert@
2003-09-20powerpc ld.so has a slightly unreasonable expectation about __got_startDale Rahn
and the location of the GOT. reorder GOT and the CTOR/DTOR section.
2003-09-19Make CTORS/DTORS non-writeable in dynamic binaries. ok deraadt@Dale Rahn
2003-07-20Document -Z flag for ld, produce old style 'standard' executables'. ok deraadt@Dale Rahn
2003-06-02somehow duplicate lines had gotten in thereMichael Shalayeff
2003-05-05Move exec base to 0x1c000000, exe/data gap to 512MB. Allows betterDale Rahn
interleave of exe/shared libs. Raise MAXDSIZ back to 1G. This change REQUIRES a binary update on i386.
2003-04-17Switch i386 to new binutils, i386 tools now do ELF.Dale Rahn
RODATA_* align macros to preserve current behavior on other archs and allow for 1G sep between beginning of exe and beginning of data DARPA funded work.
2003-04-09fix bad entry definitionMichael Shalayeff
2003-02-06use common elf.sc instead of own hppaobsd.sc, catch up w/ dale's elf work ↵Michael Shalayeff
for hppa; drahn@ lots of helps and ok
2003-01-30ELF security enhancement: put .rodata into it's own load section insteadDale Rahn
of putting it with the text. This removes the execute permission from readonly data. This constrains the executable region to portions of the executable which need to be executable. Note: not all processors or mmus are capable of -X protection at the page level, but should handle ELF images which specify specific RWX protections on each section.
2003-01-24This is a project to modify executables so that they do not have anyDale Rahn
executable regions which are writable. If a section of an executable is writable and executable, it is much easier for errant code to modify the executable's behavior. Two current areas in shared library environments which have this critical problem are the GOT (Global Offset Table) and PLT (Procedure Linkage Table). The PLT is required to be executable and both GOT and PLT are writable on most architectures. On most ELF architecture machines this would cause shared libraries to have data and BSS marked as executable. Padding to the linker script for programs and shared libraries/objects to isolate the GOT and PLT into their own load sections in the executables. This allows only the text(readonly) region and the PLT region to be marked executable with the normal data and BSS not marked as executable. The PLT region is still marked executable on most architectures because the PLT lives in the "data" or "BSS" regions and the dynamic loader will need to modify it. Since the GOT and PLT should only ever be written by the dynamic linker, it will be modified to mprotect those regions so that they are not writable during normal execution. If the dynamic linker needs to modify the regions later, (eg for lazy binding), it will mprotect the region, make the necessary changes, and mprotect it back. Since it is possible to receive a signal which would interrupt the program flow and perhaps cause the dynamic linker to modify the same (or nearby) PLT references, it is now necessary for signals to be blocked for the duration of the mprotect. This diff was omitted from the original commit, this implements the -Z option to produce traditional (non protected) executables.
2003-01-17This is a project to modify executables so that they do not have anyDale Rahn
executable regions which are writable. If a section of an executable is writable and executable, it is much easier for errant code to modify the executable's behavior. Two current areas in shared library environments which have this critical problem are the GOT (Global Offset Table) and PLT (Procedure Linkage Table). The PLT is required to be executable and both GOT and PLT are writable on most architectures. On most ELF architecture machines this would cause shared libraries to have data and BSS marked as executable. Padding to the linker script for programs and shared libraries/objects to isolate the GOT and PLT into their own load sections in the executables. This allows only the text(readonly) region and the PLT region to be marked executable with the normal data and BSS not marked as executable. The PLT region is still marked executable on most architectures because the PLT lives in the "data" or "BSS" regions and the dynamic loader will need to modify it. Since the GOT and PLT should only ever be written by the dynamic linker, it will be modified to mprotect those regions so that they are not writable during normal execution. If the dynamic linker needs to modify the regions later, (eg for lazy binding), it will mprotect the region, make the necessary changes, and mprotect it back. Since it is possible to receive a signal which would interrupt the program flow and perhaps cause the dynamic linker to modify the same (or nearby) PLT references, it is now necessary for signals to be blocked for the duration of the mprotect.
2003-01-13Add a compatibilty flag '-Z' for upcoming elf changes, does nothing currentlyDale Rahn
but will produce old style executables when the other changes appear.
2003-01-04Remove the support to force linking against a specific shlib major.minor.Dale Rahn
This behavior broke libraries which were named libN-X.Y.so.A.B. ok pval, espie
2002-12-09From Andrushock, s/sucess/success/gTodd C. Miller
2002-12-02xstrdup the return value of basename() before recording it in the bfd,Peter Valchev
fixes the "NEEDED crtend.o" problem that appeared in varios ports and had to be workarounded. from thorpej@NetBSD, thanks to drahn@ for pointing it out; ok drahn espie
2002-09-23In an ELF binary the end of the text segment and the start of the dataArtur Grabowski
segment can share the same page in the file. Since we can't mmap it with the same permissions, the data segment is loaded offset by a constant so that it ends up in a different page. On sparc that's not really enough. To avoid cache aliases we have to make the offset big enough to make sure that we don't get incoherent aliases that would have to be mapped uncached. This offset has been 64k this far and noone noticed until some change actually made us fault in those pages at the same time and incoherent aliases reduced make build time on some hypersparcs (only hypersparcs have big enough caches to notice this) from 14 hours to 23 hours. Bump that offset (MAXPAGESIZE) to 1MB. deraadt@ ok
2002-08-11Switch sparc binutils to ELF.Artur Grabowski
XXX - we might want to improve the version selection logic when feeding those diffs back to FSF, but we can't do that until we bump our version to OpenBSD 3.2 because then the tree wouldn't build.
2002-06-05some manual cruft federico keeps in the generated fileMichael Shalayeff
2002-06-05provide our own path for generating the ldscripts and tweak it accordingly; ↵Michael Shalayeff
fgsch@ ok
2002-05-14no longer needed; byebye.Federico G. Schwindt
2002-05-13- Sync changes between source and generated files (ie., changes existingFederico G. Schwindt
only in the generated files). - Regen. Whenever is possible, changes should be done to the source files (.am, .in). That way is easier to track and merge local changes when importing.
2002-05-13import binutils 2.14 (excluding testsuites, .info files, and .po files)Federico G. Schwindt
2002-05-13hppa pieces; don't regenerate yet.Federico G. Schwindt
2002-05-13resolve conflicts.Federico G. Schwindt
2002-05-13Import binutils-2.11.2Federico G. Schwindt
- only the binutils package (no gdb here) - don't import libiberty and texinfo, they are elsewhere - remove all .info* generated files
2002-05-13Import binutils-2.11.2Federico G. Schwindt
- only the binutils package (no gdb here) - don't import libiberty and texinfo, they are elsewhere - remove all .info* generated files
2002-03-24remove /lib and /usr/local/lib from the default search path for theBrad Smith
native linker. -- Ok'd by: pval@, fgsch@ and espie@
2002-03-19When one shared library requires another, it will try to locate thePeter Valchev
required shared library and include it in the link if it's not specified explicitly. This change makes ld look at the -L arguments specified, and build search path. This avoids the need for -rpath-link, and somewhat resembles the a.out linker behaviour. However behaviour of -rpath and -rpath-link is still preserved as a GNU extension. ok drahn, espie looked at it too
2001-09-25let configure script use GNUSYSTEM_AUX_DIRMarc Espie
2001-09-13Support for arm.Kevin Lo
2001-09-05Support for sparc64. gdb disabled for now.Artur Grabowski
2001-06-09Automatic cvs merge. Dread what I will have to fix after this excuseMarc Espie
of a program is done...
2001-06-09Long delayed import of binutils-2.10.1. Turns out art@ needs some alphaMarc Espie
bug-fixes...
2001-04-19undo change which breaks the alpha. I did not see this change and approve ↵Theo de Raadt
it during tree lock. Grrr
2001-04-18date: 2001/04/18 18:33:13; author: drahn; state: Exp; lines: +41 -0Dale Rahn
Use the /var/run/ld.so.hints for looking up transitive dependancies on shared libraries in ld, this is done in linux with ld.so.conf, but the string is stored in ld.so.hints for openbsd. Fixes some "-rpath" compilation errors. as with the linux case, this is only for the native ld. Ok'd by espie@.
2001-03-07Revert my bfd change, and instead make ld match bfd, which isNiklas Hallqvist
the way Red hat choose. Both ways work, the important thing is that things match. However if we use the red hat solution we will not need to merge local changes when importing new binutils releases; espie made me aware of the import issues which I forgot due to lack of sleep :-).
2001-01-31Switch alpha to ELF.Artur Grabowski
2001-01-17Remove libiberty from the list of dependencies, since we use the installMarc Espie
version.
2000-11-20Make new binutils compile on Alpha again; ok espie@tomo
2000-10-29Repair mips-based targets, espie@ okMiod Vallat
2000-10-20Add support for major/minor version numbers.Marc Espie
Testing by Dale. Ok'd deraadt@
2000-10-06${SHELL} move-if-changedDavid Leonard
2000-09-21Fix man pages for good.Marc Espie
2000-09-15Add powerpc-openbsd to list of supported systems.Dale S. Rahn
2000-09-14Some installation problems: older gnu programs don't know about DESTDIR,Marc Espie
but we have a mix here -> convert the old ones to heed DESTDIR. Also, fix manpages installation in Makefile.bsd-wrapper (INSTALL_MAN setting that got lost, bad MANDIR, don't set MANDIR if PREFIX is the standard location)