summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/binutils
AgeCommit message (Collapse)Author
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-02-02pass BSDSRCDIR in environment to submakes.Marc Espie
This `repairs' setting up BSDSRCDIR in /etc/mk.conf and nowhere else.
2003-01-30Again this comment was not updated. now we have 7 load sections.Dale Rahn
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-17Update comment for linker change which just committed.Dale Rahn
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-06syncronous -> synchronousMiod Vallat
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-19Add a second keep-locals entry to stop getopt from treating -k as anFederico G. Schwindt
abbreviation for --keep-locals. from binutils-current. millert@ ok.
2002-12-13Reverse the order of a test in the loop invariant. It makes moreTodd C. Miller
sense this way and works around an apparent gcc optimizer bug on macppc related to inline functions. OK drahn@
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-11-06Fix obnoxious makeinfo warnings during build.Miod Vallat
2002-10-21make it compile through the gdb, still needs more work; fgsch@ okMichael Shalayeff
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-08-08bah, use mode 0 here.Federico G. Schwindt
2002-08-08Add missing mode argument to open(2); noticed byFederico G. Schwindt
Grudge Mason <grudge_mason@hotmail.com>. Note that this code is not compiled in.
2002-07-30Update BSD licenses to include 'with or without modification'.Federico G. Schwindt
From binutils -current.
2002-07-21Fix backtrace support for OpenBSD/powerpc.Dale Rahn
This was done in a *BSD independant mode. Look at this again for gdb 5.x
2002-07-16better. this is what has been applied to binutils.Federico G. Schwindt
2002-07-16Correct memset arguments; from Moritz Jodeit <moritz@jodeit.org> viaFederico G. Schwindt
PR/2822. Submited to binutils as well.
2002-06-08sayonara, you should not be here; reported by wcobb@Federico G. Schwindt
2002-06-07Switch powerpc to using new split (aout/elf) link.hDale Rahn
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-28Fix *.texinfo warnings in gnu/.Mike Pechkin
espie@ request and OK
2002-05-21Support for kcore on alpha.Artur Grabowski
Based on a diff from Mattias Amnefelt <mattiasa at e.kth.se>, which was in turn based on code in NetBSD, but I rewrote all the relevant pieces to have less alignment errors and follow gdb code style. fgs@ ok.
2002-05-19enable attaching to a running process on alpha.Matthieu Herrb
ok millert@
2002-05-18don't duplicate things here, just include xm-obsd.h.Federico G. Schwindt
fixes warnings found by deraadt@. tested by miod@
2002-05-14this shouldn't be here; reported by wcobb@.Federico G. Schwindt
2002-05-14no longer needed; byebye.Federico G. Schwindt
2002-05-14regen.Federico G. Schwindt
2002-05-14ops, add missing vax vector.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-13pull some demangler changes as with the libiberty counterpart to pleaseFederico G. Schwindt
binutils; actually both files should be the same.
2002-05-13don't incorrectly match powerpc or any other openbsd arch for theFederico G. Schwindt
case; from binutils -current.
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-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-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-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-08includes should be installed during `make include', not later.Marc Espie
Fixes this for lex and binutils' bfd. Also, do not install ansidecl.h, we don't really need it, bfd.h uses it, and we installed it so that bfd worked, so let bfd.h include it directly. prompted by mickey@