Commit Graph

606 Commits

Author SHA1 Message Date
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
christos
458b13dee7 Coverity CID 923: Avoid NULL deref. 2006-03-18 23:09:34 +00:00
matt
ba8a81077b Fix some double frees / missing frees / use after freed all
relating to _rtld_load_object.  Fix Coverity CID 2601, 2600.
2006-03-18 02:34:30 +00:00
skrll
9f6658b9ff Remove the LD_BIND_NOW item 2006-03-04 09:00:22 +00:00
skrll
125d6a43ac Add LD_BIND_NOW support for mips.
This is the last arch to be done so remove the large ugly #if defined()
stuff in reloc.c.
2006-03-04 08:58:46 +00:00
rpaulo
94ef983148 Remove -Wl,-non_shared (same meaing as -static). 2006-02-03 02:01:19 +00:00
skrll
39aae79d93 Bring across a change from FreeBSD from back in 1998:
"Fix a bug that showed up when debugging dynamically linked programs.
References from GDB to "printf" and various other functions would
find the versions in the dynamic linker itself, rather than the
versions in the program's libc.  This fix moves the GDB link map
entry for the dynamic linker to the end of the search list, where
its symbols will be found only if they are not found anywhere else."

"printf" isn't true for us, but various libc symbols are, e.g. "malloc".

Fixes PR 32074 as noted by uwe@

OK'd by christos@
2006-01-12 22:40:17 +00:00
uwe
a35d2a5b09 Add some comments. 2006-01-11 22:24:34 +00:00
uwe
e7102691a2 Kill trailing whitespace.
Indent delay slots.
2006-01-11 22:05:27 +00:00
uwe
b98cf46363 _GLOBAL_OFFSET_TABLE_ is only used if RTLD_DEBUG, so wrap its
declaration too.

32-bit SuperH can not pretend that _GLOBAL_OFFSET_TABLE_ is a normal
variable, because of the way PIC variable references is generated, but
as compiler arranges for _GLOBAL_OFFSET_TABLE_ address to be in r12
anyway, just use that value by declaring it as a global register
variable.  Makes sh3 compile with RTLD_DEBUG.
2006-01-11 21:40:12 +00:00
perry
ae6ae2c362 Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete. 2005-12-24 20:56:41 +00:00
skrll
bd7cbb198e Correct the lookup order of _rtld_symlook_default and make
_rtld_find_symdef use _rtld_symlook_default.

This reduces the code size and means that dlsym(RTLD_DEFAULT,...) has the
correct lookup order.

Reviewed by kleink. Thanks.
2005-10-13 11:14:09 +00:00
chs
0c6e4dbbc4 ok, the change from rev 1.33 was unnecessary after all,
only the second part of the previous revision was needed.
put the logic for the initial icache invalidation of the PLT
back the way it was, but in a way that makes clearer what's going on,
and add some comments explaining it.
2005-09-27 07:20:32 +00:00
chs
96fb424f44 fix two problems with icache invalidation of the PLT:
- restore revision 1.33, it was correct.
 - fix pointer arithmetic in other calls to __syncicache().
2005-09-26 05:45:13 +00:00
skrll
680596d08e Add __RCSID. 2005-08-20 19:01:16 +00:00
skrll
9f486044a0 KNF 2005-08-15 10:52:42 +00:00
skrll
5f0dd3a852 Add support for immediate PLT binding on SH5. Compile tested only as
shared libs don't actually work on SH5 (yet).

OK'd by Steve Woodford.
2005-07-28 12:35:21 +00:00
skrll
57e00bf69e Support immediate PLT binding on powerpc. Thanks to Simon Burge for
testing.

I can see the finish line...
2005-07-28 10:54:30 +00:00
skrll
56d4febf60 Support immediate PLT binding on m68k. Tested on NetBSD/sun3 using the new
version of tme.

Not far now...
2005-07-26 15:43:34 +00:00
skrll
51c5e03c82 Support immediate PLT binding on vax. Tested on simh.
Nearly there...
2005-07-24 08:02:23 +00:00
skrll
16044f3d38 Support immediate binding on x86_64.
Closes PR 30570. Thanks to TAMURA Kent for testing.
2005-07-17 05:57:21 +00:00
fair
af23ff4dbb appease gcc -Wuninitialized 2005-06-08 00:19:18 +00:00