Commit Graph

530 Commits

Author SHA1 Message Date
skrll 701ae47cdf Fix the dynamic linker for hppa using ELF.
Lazy binding doesn't work 100% of the time so force immediate binding.
One possible reason is that the PLT stub blows away r20 which the
compiler might not take into account.
2004-05-17 13:16:02 +00:00
skrll e88c851d08 Test before commit. 2004-05-17 11:00:01 +00:00
skrll 0556cd7d3c Re-arrange/correct some asserts. 2004-05-17 10:23:58 +00:00
skrll 8431fb3c4c Wrap a couple of lines to <80 columns 2004-05-14 11:59:14 +00:00
skrll c788a1a535 Whitespace. 2004-05-14 11:11:02 +00:00
skrll 212b905081 Garbage collect the RTLD_RELOCATE_SELF error. 2004-05-12 20:23:29 +00:00
skrll c0148a0dfe Add a debug message. 2004-05-12 20:12:37 +00:00
mhitch b6825b1e42 The -symbolic flag in gcc 2.95.3 is not passed to the linker, which is
required.  Restore the -Bsymbolic option in LDFLAGS on the vax.  Fixes
the problem with ld.elf_so mentioned on port-vax.
2004-04-28 02:04:56 +00:00
skrll 236df38503 Be more pedantic about where we use -shared, etc. 2004-03-24 08:01:26 +00:00
atatat 1de60baa7c The <sys/sysctl.h> header already provides a perfectly good struct for
this purpose, so...uh...use it.
2004-03-16 05:25:12 +00:00
enami 76eaac1d6f Whitespace. 2004-02-26 21:45:59 +00:00
skrll 52581467e2 Whitespace. 2004-02-23 21:27:20 +00:00
skrll 4d30716d36 Remove the millicode hack - its not needed anymore.
Get the entry point right.
2004-02-23 21:20:40 +00:00
uwe 8eb5ba6d09 Use CC instead of LD to link the ld.elf_so. This will correctly link
"millicode" from libgcc_pic.a on platforms that need it.

From Nick Hudson <skrll@netbsd>.
2004-02-22 01:39:43 +00:00
skrll b5330c98c7 Add the standard XXX about CPPFLAGS and -fpic here. 2004-02-21 16:02:06 +00:00
skrll d93f13855a Move common LDFLAGS into Makefile from arch/*/Makefile.inc 2004-02-21 15:56:03 +00:00
skrll 151426159b Whitespace. 2004-02-20 20:58:24 +00:00
enami 074a9e8fee Salvage the instruction to save the pointer to ps_strings for later use
so that setproctitle() works again.  The problem reported by Naoki Fukaumi
on japanese mailing list.

Approved by: Ross Harvey
2004-02-18 23:04:49 +00:00
enami f1740378ad Don't assume past the mmaped region is accessible. 2004-02-15 02:59:04 +00:00
enami 63fcb5a042 Fix warning message: the failed operation is not fstat but mmap. 2004-02-15 02:56:53 +00:00
mrauch f06ab72b6e Change the symbol lookup order to search RTLD_GLOBAL objects
before referencing object's DAG. This makes it possible for
C++ exceptions to work across shared libraries.

Patch taken from FreeBSD: src/libexec/rtld-elf/rtld.c: 1.67 -> 1.68,
committed there by kan@FreeBSD.org.
2003-12-07 09:36:06 +00:00
christos 1a2b5965a9 Don't try to preload an empty string. 2003-11-25 14:36:49 +00:00
simonb 28817edd35 Restore handling of reloc entries that point to unaligned locations
that seems to have disappeared in rev 1.34.

Thanks to Jason Thorpe for suggesting where to look.
Fixes the simple test case in PR port-mips/23366.
2003-11-19 19:41:57 +00:00
lukem 130ab7336b Rework how MAKEVERBOSE operates:
*	Don't bother prefixing commands with a line of  ${_MKCMD}\
	and instead rely upon "make -s".  This is less intrusive on
	all the Makefiles than the former.  Idea from David Laight.

    *	Rename the variables use to print messages.  The scheme now is:
	    _MKMSG_FOO		Run  _MKMSG 'foo'
	    _MKTARGET_FOO	Run  _MKMSG_FOO ${.TARGET}
	From discussion with Alistair Crooks.
2003-10-21 10:01:19 +00:00
fvdl d83c6c4294 Don't use NULL for integers. 2003-10-21 01:19:10 +00:00
lukem ddff99b7f4 rework to use the newer _MKMSGCREATE (et al) macros 2003-10-19 04:45:01 +00:00
lukem 6cf0d872cd support MAKEVERBOSE 2003-10-19 01:19:10 +00:00
matt fd1caff7c2 Update to new reality. XXX _rtld_bind still needs to be written. 2003-10-06 16:08:35 +00:00
mycroft 65ed3bdcdd Make the effect of the hack clearer. 2003-09-24 10:25:26 +00:00
mycroft 7242c1114c One more tweak... 2003-09-24 10:18:52 +00:00
mycroft 7b234fd232 Make the comment a little more accurate. 2003-09-24 09:59:45 +00:00
mycroft 89ea37c60a Temporary workaround for some binutils/ld lossage. See the comment for more
information.
2003-09-24 09:55:35 +00:00
mycroft 5fb0b88880 Some notes... 2003-09-24 06:20:33 +00:00
enami 9c2e06fe24 Space after the keyword `if'. 2003-09-22 14:37:57 +00:00
mycroft 5bd33bcad6 Back out revision 1.100. There is something screwier going on. 2003-09-07 22:17:43 +00:00
mycroft 323a574dc3 dlsym() should not leave an error set. It confuses programs that check
dlerror() (such as pkgsrc/graphics/transcode).
2003-08-31 21:52:01 +00:00
skrll d900731978 Resolve dlsym(3) and friends directly so that dlsym(RTLD_NEXT,...) works.
Previously dlsym resolved to the version in crt0.o or libc which would
mean that the caller's shared object couldn't be determined correctly
using __builtin_return_address(0).

Mainly from FreeBSD, but adapted by me. Benefits of this solutions are:

	- backward comptibility maintained
	- existing broken binaries are fixed with a new ld.elf_so
	- __mainprog_obj can be removed from crt0.o
	- we do the same thing as FreeBSD

Fixes PR 22067.

OKed by Jason and Christos.
2003-08-12 09:18:38 +00:00
agc 8e6ab8837d Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22284, verified by myself.
2003-08-07 09:46:37 +00:00
skrll 59b0f10729 KNF 2003-08-05 19:41:53 +00:00
salo 99410184e7 netbsd.org->NetBSD.org 2003-07-26 19:24:24 +00:00
mrg 88bb1d9b3b include <string.h> or <stdlib.h> for all prototypes 2003-07-26 15:04:38 +00:00
skrll 5f573ab68d ANSIfy and de-__P(). 2003-07-24 10:12:25 +00:00
skrll ddc9322f3b Support immediate binding on arm. 2003-07-21 15:34:35 +00:00
skrll b2695e5a1f arm and sh5 also have bogus DT_TEXTRELs. sh5 was already covered so just
update the comment.
2003-07-21 15:17:55 +00:00
skrll 619dee76f6 Correct the in_plt parameter of a couple of _rtld_find_symdef calls.
The mips_reloc.c case is a no-op as _rtld_symlook_obj ignores in_plt for
MIPS.

OK'ed by Charles.
2003-07-17 13:56:32 +00:00
skrll d4cfd1c666 s/_rltd_obj_rtld/_rtld_objself/ in #ifdef notyet code. 2003-07-15 07:39:55 +00:00
skrll 9192c2eed4 Whitespace 2003-07-15 07:38:29 +00:00
marcus fae2567c9b Removed unused function. 2003-07-05 20:48:39 +00:00
tsutsui 0e65101f60 Add function prototype declarations. 2003-07-05 18:18:51 +00:00
marcus a4878b4349 Bugfix: Don't pick addend both from reloc and contents at the same time. 2003-07-02 15:29:34 +00:00