yamt
8c93baa802
constify
2008-01-14 08:53:42 +00:00
yamt
8a58f724e1
tabify
2008-01-14 08:52:16 +00:00
christos
8fb14189dc
make this compile again.
2007-12-29 01:44:03 +00:00
christos
716fde8fa0
simplify; mapbase == vaddrbase from the PaX author.
2007-12-28 19:36:21 +00:00
christos
8636ab52f6
Deal with ASLR PIE executables, by recognizing that phdr != phdr->v_addr
...
for PT_PHDR headers when the program has been loader to a vaddr other than
then one specified (a randomized one), and modifying the relocation base
address appropriately (idea from elad)
2007-12-26 21:14:41 +00:00
christos
8b0637156f
No need for stack_protector.o if USE_FORT is no.
...
XXX: compiling a binary with -Wl,--dynamic-linker,${NETBSDSRCDIR}/libexec/...
results in stack overflow. Investigate!
2007-12-26 21:11:52 +00:00
christos
5ad1b72097
print the symbol we are seaching for [when debugging]
2007-12-26 21:10:03 +00:00
ad
558a5ffd0f
rtld changes for PR bin/37347:
...
- Apply patch from J.T. Conklin to execute .init/.fini functions in order.
- Support DF_1_INITFIRST and mark libc with DF_1_INITFIRST. Shared libs
should be recording a dependency on libc, but it's too late to do that.
Ok christos@.
2007-12-07 20:34:04 +00:00
christos
496f9be3e8
support %z
2007-11-24 18:32:26 +00:00
ad
71ac015ebf
stack_protector.c has moved.
2007-11-13 15:34:51 +00:00
skrll
29353f93e2
Build a local copy of exit that doesn't call __cxa_finalize. It's not
...
needed and drags in a lot of libc via free.
2007-10-30 17:19:59 +00:00
christos
ed1a8fea8d
build stack protector locally so that we don't call syslog_ss that results
...
in 1/2 of libc dragged in.
2007-10-29 20:36:31 +00:00
ad
bf4b000d16
- Don't use the names malloc/free/etc, since we can end up pulling in libc's
...
malloc which is not what we want.
- Remove ancient memory compaction hack. Realloc on free memory is now an
error again (from joerg@).
Ok christos@.
2007-10-05 22:21:07 +00:00
christos
596c6ec5db
provide xrealloc, and don't cast and use malloc and realloc directly.
2007-09-27 17:52:16 +00:00
christos
2cce1500a2
If we are using SSP, compile in a separate copy of the stack protector
...
functions so that we don't end up calling syslog_ss() which drags in
a large portion of libc. Found by skrll...
2007-09-27 17:51:40 +00:00
christos
6f875d32e2
Don't trust AT_SUN_EXECNAME, if we are set{u,g}id.
2007-09-21 13:57:09 +00:00
christos
6eac115581
delete debug printf
...
make regress compile again.
2007-09-20 19:42:53 +00:00
christos
40cfdb5e3a
Use AT_SUN_EXECPATH instead of argv[0] for the executable name. This needs
...
kernel support, which is not there yet, thus $ORIGIN is broken at this time.
This is ok, nothing uses it yet.
2007-09-20 14:14:25 +00:00
cube
f7779133cd
Don't remove the last component of filename before calling
...
_rtld_digest_dynamic: it is done in expand(), and doing it twice is once
too much. This fixes $ORIGIN expansion for dependencies.
2007-09-20 07:50:32 +00:00
tnn
ea0fc2f827
5 is not a valid version for .Nx, so change it to 5.0.
2007-09-13 21:32:14 +00:00
joerg
ad61ac15d2
Don't define bool, false and true. Use stdbool.h.
2007-09-02 09:57:16 +00:00
christos
2ffe4b875f
Use an elf note to handle pax arguments. This is a temporary solution to
...
avoid wasting OS flag bits. In the future we'll probably use fileassoc to
achieve this (once there is a way to make fileassoc persistent) or in the
shorter term libelf, so that we can add and remove the note on demand instead
of burning bits on each binary. Of course since this is a tool, this means
that we'll need to think about how to handle libelf...
2007-06-24 20:35:36 +00:00
christos
3b320420fe
fix a comment.
2007-05-18 21:46:39 +00:00
christos
04ee85ad50
Support Solaris-like $ORIGIN etc. expansions in paths.
2007-05-18 21:44:08 +00:00
scw
596a371d09
Remove a test for defined(__SH5__).
2007-04-08 10:02:35 +00:00
scw
5764a76889
Remove support for NetBSD/{,evb}sh5.
2007-04-08 09:35:21 +00:00
matt
549524f84f
Deal with MKPICLIB != no.
2007-03-15 17:27:15 +00:00
matt
ee98d74a6b
Remove MD COMBRELOC support since it's now MI.
...
Enable COMBRELOC for all arches
2007-02-23 01:17:11 +00:00
matt
364993dede
Don't use cached results for plt lookups (nor save them).
2007-02-23 01:16:32 +00:00
matt
4d10e5e667
Make the COMBRELOC support generic.
2007-02-22 18:57:48 +00:00
martin
3cc1de3d7b
Add COMBRELOC support
2007-02-15 19:42:13 +00:00
skrll
1fddd99f52
Provide COMBRELOC support for amd64 in answer to PR/35589.
...
Some statistics:
base + COMBRELOC
$ time (for i in `seq 100`;do noatun --help>/dev/null;done)
(; for i in `seq 100`; do; noatun --help > /dev/null; done; ) 148.64s
user 4.82s system 99% cpu 2:33.93 total
base + DF caching:
$ time (for i in `seq 100`;do noatun --help>/dev/null;done)
(; for i in `seq 100`; do; noatun --help > /dev/null; done; ) 151.15s
user 5.53s system 99% cpu 2:37.23 total
base:
$ time (for i in `seq 100`;do noatun --help>/dev/null;done)
(; for i in `seq 100`; do; noatun --help > /dev/null; done; ) 492.36s user
5.34s system 99% cpu 8:19.17 total
2007-02-15 15:44:28 +00:00
wiz
09cb1d6f1c
s/existance/existence/, from Zafer.
2006-11-24 22:52:16 +00:00
christos
aac134252a
From defend dot the dot world at gmail dot com: Sanitize environment variables
...
for set{u,g}id binaries, so that in case they are playing with set{u,g}id
and exec'ing other binaries they don't get affected by the
LD_{PRELOAD,DEBUG,LIBRARY_PATH} environment setup. We leave LD_BIND_NOW alone.
There are no binaries affected in the base system.
2006-11-22 21:46:36 +00:00
skrll
6f388cd224
Create _rtld_relocate_plt_object and use it in _rtld_bind and
...
_rtld_relocate_plt_objects.
No functional change.
2006-10-17 08:33:36 +00:00
skrll
152e43d87a
Support unaligned DIR32 relocs.
...
Closes PR 18293
2006-10-17 08:28:06 +00:00
skrll
edf13fb5fb
Reformat a comment.
2006-10-16 13:53:09 +00:00
skrll
78b8583054
Correct the frame size for a couple of ENTRYs
2006-10-16 13:52:47 +00:00
simonb
676a630d08
Simplify multiple MACHINE_ARCH endian checks with single MACHINE_CPU
...
checks.
2006-08-27 07:22:02 +00:00
skrll
a238470b22
Add (back) -Wl,-static to the link.
2006-06-29 19:30:59 +00:00
simonb
428d37fad6
Fix unaligned loads and stores generated by gcc4. Problem described in
...
http://mail-index.NetBSD.org/tech-toolchain/2006/06/27/0001.html .
This cleaner version of the patch from Christos - thanks!
2006-06-28 16:48:38 +00:00
simonb
7d5684f475
Use .previous at the end of the NetBSD ident note so that we switch
...
back to the previous section. Fixes build problems on MIPS with gcc4
and -g.
2006-06-13 13:55:58 +00:00
mrg
0f0f2b4e93
in _rtld_bind() initialise new_value for GCC4.
2006-05-23 16:27:41 +00:00
drochner
eb92277cd7
sprinkle some __noreturn__ attributes, saves gcc4 warnings elsewhere
2006-05-22 19:49:09 +00:00
mrg
d677e4a13a
avoid more GCC4 uninitialised variable problems. (sh3 known, vax guessed.)
2006-05-21 04:17:35 +00:00
dan
b995f58933
appease gcc4 uninitialiased warning
...
ok mrg.
2006-05-20 23:38:27 +00:00
mrg
82f7733046
in _rtld_bind() initialise result to appease GCC4.
2006-05-20 07:09:44 +00:00
mrg
084c052803
quell GCC 4.1 uninitialised variable warnings.
...
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-10 21:53:14 +00:00
skrll
c965f60a50
Remove empty lines.
2006-04-03 13:23:15 +00:00
christos
0339fe6614
Coverity CID 2749: Fix another double free. Instead of removing that last
...
free() call, change the allocation policy to leave the responsibility for
allocation/freeing the pathname to _rtld_map_object(), instead of having
the caller allocate it and _rtld_map_object() free it. This simplifies the
code a lot and it is more efficient.
2006-03-21 17:48:10 +00:00