Age | Commit message (Collapse) | Author |
|
for hppa; drahn@ lots of helps and ok
|
|
This `repairs' setting up BSDSRCDIR in /etc/mk.conf and nowhere else.
|
|
|
|
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.
|
|
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.
|
|
|
|
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.
|
|
but will produce old style executables when the other changes appear.
|
|
|
|
This behavior broke libraries which were named libN-X.Y.so.A.B. ok pval, espie
|
|
abbreviation for --keep-locals. from binutils-current.
millert@ ok.
|
|
sense this way and works around an apparent gcc optimizer bug on
macppc related to inline functions. OK drahn@
|
|
|
|
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
|
|
|
|
|
|
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
|
|
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.
|
|
|
|
Grudge Mason <grudge_mason@hotmail.com>.
Note that this code is not compiled in.
|
|
From binutils -current.
|
|
This was done in a *BSD independant mode. Look at this again for gdb 5.x
|
|
|
|
PR/2822. Submited to binutils as well.
|
|
|
|
|
|
|
|
fgsch@ ok
|
|
espie@ request and OK
|
|
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.
|
|
ok millert@
|
|
fixes warnings found by deraadt@. tested by miod@
|
|
|
|
|
|
|
|
|
|
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.
|
|
binutils; actually both files should be the same.
|
|
case; from binutils -current.
|
|
|
|
|
|
|
|
- only the binutils package (no gdb here)
- don't import libiberty and texinfo, they are elsewhere
- remove all .info* generated files
|
|
- only the binutils package (no gdb here)
- don't import libiberty and texinfo, they are elsewhere
- remove all .info* generated files
|
|
- only the binutils package (no gdb here)
- don't import libiberty and texinfo, they are elsewhere
- remove all .info* generated files
|
|
- only the binutils package (no gdb here)
- don't import libiberty and texinfo, they are elsewhere
- remove all .info* generated files
|
|
- only the binutils package (no gdb here)
- don't import libiberty and texinfo, they are elsewhere
- remove all .info* generated files
|
|
- only the binutils package (no gdb here)
- don't import libiberty and texinfo, they are elsewhere
- remove all .info* generated files
|
|
- only the binutils package (no gdb here)
- don't import libiberty and texinfo, they are elsewhere
- remove all .info* generated files
|
|
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@
|