christos
3bc3e6f774
use xwarnx instead of warnx
2000-01-15 01:03:45 +00:00
christos
3856850e36
don't stutter when printing error messages.
1999-12-27 15:36:36 +00:00
christos
b360d70cb7
PR/9031: Scott Ellis: Ignore empty sysctl directive lines.
1999-12-20 02:43:58 +00:00
christos
4374b52ab0
make a debugging formatting statement work portably
1999-12-15 20:13:31 +00:00
christos
f0e72d450d
Do what the people want. Support full sysctl names.
1999-12-15 05:22:37 +00:00
christos
75bdf8c379
indent properly a debugging statement and fix grammar.
1999-12-13 10:47:38 +00:00
christos
aa594cf123
For the benefit of ldd and debuggers, append more Needed_Entry elements
...
if the library transformation attached more than one element.
1999-12-13 09:22:52 +00:00
christos
ea816c78b2
Enable parsing and mapping of hardware dependent libraries in ld.so.conf
...
To be documented in the man page.
1999-12-13 09:09:34 +00:00
itohy
69c745c3d5
Use "addend" for R_68K_GOT32, R_68K_PC32, and R_68K_32 relocations.
...
I'm not sure whether R_68K_GOT32 relocations appear in shared
objects, though....
Example:
lea %pc@(got+0x1234@GOTPC),%a0 | R_68K_GOT32
bsrl foo+0x5678 | R_68K_PC32
lea bar+0x9abc,%a1 | R_68K_32
1999-12-08 08:47:10 +00:00
fredb
d37aed91fb
More CL* fallout.
1999-12-05 18:36:25 +00:00
thorpej
3bf43967ff
Name consistencty nit: curmark -> _rtld_curmark
1999-11-10 18:48:19 +00:00
thorpej
70e2953dac
Some slight cosmetic cleanup.
1999-11-10 18:34:49 +00:00
mycroft
bbe4b07983
Make this more likely to compile with ld.elf_so changes. (But this is
...
untested.)
1999-11-07 08:08:15 +00:00
mycroft
4bbb8dc9fb
Make this more likely to compile with ld.elf_so changes. (But this is
...
untested.)
1999-11-07 08:01:51 +00:00
mycroft
7ea23adf34
More fallout.
1999-11-07 06:48:21 +00:00
mycroft
4b9f2ff9e0
Fix fallout from MD ld.elf_so changes.
1999-11-07 06:41:49 +00:00
mycroft
305c949781
Changes from msaitoh to fix local/global symbol confusion, and to fix weak
...
symbol support -- updated by me for elf.h changes.
1999-11-07 00:21:12 +00:00
erh
6752f572d8
Remove ELFNAME defines since they are defined in sys/exec_elf.h
1999-11-04 02:00:17 +00:00
simonb
d10f49f606
More SVR4-style ELF cleanups.
1999-10-28 23:58:21 +00:00
tsubai
64ac9d7bdb
Revert to rev. 1.4. This file didn't need to change.
1999-10-28 09:50:07 +00:00
kleink
522cbf0248
Update to match new SVR4-style definition names in <sys/exec_elf.h>.
1999-10-25 13:55:06 +00:00
hannken
222397ee58
Undo last change. While these macros are defined in exec_elf.h, they are
...
enclosed by `#ifdef _KERNEL'.
1999-10-22 10:39:16 +00:00
hannken
db05621dec
Undo last change. While these macros are defined in exec_elf.h, they are
...
enclosed by `#ifdef _KERNEL'.
1999-10-22 10:30:08 +00:00
erh
b11baa5513
Remove ELFNAME macros which are already defines in exec_elf.h
1999-10-21 21:15:04 +00:00
itohy
6fa7d72ce5
Make __SVR4_ABI__ optional.
1999-10-18 03:26:53 +00:00
kleink
83265a56f2
Bump text alignments to 4 bytes.
1999-08-23 09:13:25 +00:00
matt
741f18b695
Initial VAX ELF32 support (mostly untested). It's checked primarily for
...
testing and archival for now. I don't expect anyone to work with it
since the binutils and gas changes are still pending. But you got to
crawl before you walk.
1999-08-21 19:26:18 +00:00
christos
46cd6f2aad
reflect reality
1999-08-20 21:12:47 +00:00
christos
2f37f42366
fix typo
1999-08-20 21:10:27 +00:00
christos
fb292d7f02
enable /etc/ld.so.conf processing
...
[reviewed by thorpej]
1999-08-19 23:42:15 +00:00
thorpej
5c5817ee4a
When allocating the entire address space of an object, map an anonymous
...
region first (using the data/bss protection) covering it, then overlay
the text and data regions at the appropriate offsets within the region,
and then unmap any gap between the text and data.
The previous method of maping the entire address space with the actual
file object itself is incorrect, as it may extend past the end of the
file if the section alignment is large enough.
This bug was the source of the libposix failure on the SPARC and another
similar failure (with libc!) on the Alpha (failure was accompanied by
a "uvn_io: size check fired" message on the console).
1999-08-06 22:33:49 +00:00
kleink
1cc052ce00
Rearrange the shared library search path precedences to LD_LIBRARY_PATH >
...
runpath > built-in default; this is the behaviour of the SVR4 shared loader,
and gives users the opportunity to override the runpath. (Addresses a report
on current-users by John Kohl.)
1999-08-01 19:47:07 +00:00
thorpej
4d256c199f
When dlopen()'ing a shared object without an absolute pathname, search
...
for it in the rpath of the main program as well as the path specified
in LD_LIBRARY_PATH.
1999-07-22 00:18:19 +00:00
thorpej
206408b533
Protect certain definitions from view by crt0, by wrapping them in
...
#ifdef _RTLD_SOURCE.
Should fix the "variable page size" build error of crt0 on the SPARC.
1999-07-05 17:55:34 +00:00
christos
00e5621847
We need to compile with -DVARPSZ, because the sparc has a variable page
...
size depending on arch. Make it an error to compile without it. This
caused -lposix linked programs to fail.
1999-06-22 16:28:22 +00:00
thorpej
3787c5c3d8
MAP_COPY -> MAP_PRIVATE
1999-06-17 21:09:47 +00:00
kleink
8788923e6a
Turn bool, true and false into an enumeration and enumeration constants to
...
avoid integer promotion warnings.
1999-06-16 15:41:24 +00:00
kleink
571aef82d9
Don't include the ident .note assembly when linting.
1999-06-15 15:54:28 +00:00
castor
c195474580
This should use MACHINE_ARCH and test on "mipseb" instead of MACHINE and
...
"newsmips"
1999-06-07 18:04:31 +00:00
kleink
4a61873f68
Update for m68k.
1999-05-31 14:52:11 +00:00
kleink
8b74e6d78e
Implement LD_PRELOAD support.
1999-05-31 14:48:16 +00:00
tsubai
c47f82d209
syncicache is needed...
1999-05-21 08:00:11 +00:00
thorpej
adadf5ecc7
Don't even make depend if we're not going to build ld.elf_so. this is
...
especially important if the assembler syntax is different.
1999-05-07 22:04:27 +00:00
kleink
4b749d888f
Always use ${MACHINE_ARCH} rather than ${MACHINE}, and reorder architectures
...
a bit.
1999-04-29 15:31:05 +00:00
kleink
75030fa2ee
Add m68k code.
1999-04-29 15:06:41 +00:00
thorpej
44672d5287
Simplify _rtld_start() a little, and shave some cycles. Spefically, there's
...
no need to save the stack pointer. Just push the space for the cleanup
and obj_main pointers before calling _rtld(), and pop it after loading those
pointers into the appropriate argument registers for the program entry point.
1999-04-19 00:05:00 +00:00
thorpej
80deb5d223
Tidy this up a little.
1999-04-18 23:12:59 +00:00
ws
bf9c27b80b
Add code to use the kernel provided page size.
...
Enable this on the powerpc only for now.
1999-04-18 19:40:06 +00:00
ws
5423093850
Modify syncicache on PowerPC from an inline to a real function.
...
Support different cache line sizes with the same object code in userland.
While here, move the function to implementation name space.
1999-04-17 21:16:45 +00:00
simonb
8400044681
Remove the ld.so link for ld.elf_so - the compat13 package takes care
...
of this.
1999-04-16 15:49:20 +00:00
simonb
14fe5254b3
Don't include <machine/regdef.h>.
1999-03-28 11:56:51 +00:00
thorpej
e278587d62
Move the link.h files for the different shlib formats via repository copy,
...
and rename them to match the executable format. Introduce a new link.h
file which automatically picks the correct header based on the target of
the toolchain.
1999-03-19 22:06:36 +00:00
kleink
34729a4b4f
Remove /usr/local/lib from RTLD_DEFAULT_LIBRARY_PATH; c.f. PR bin/7146.
1999-03-19 18:25:57 +00:00
christos
3456da383e
Fix i386 problem, when we are relocating ourselves... We cannot depend
...
on the address of GOT or _DYNAMIC.
1999-03-13 20:00:14 +00:00
kleink
3b03384405
Update an i386-ismed comment.
1999-03-08 10:44:25 +00:00
drochner
90218b7032
make the mipse[lb]->mips translation really work,
...
thanks Izumi Tsutsui
1999-03-05 11:57:54 +00:00
tsubai
c2d83dc354
Make this compile.
1999-03-05 04:50:28 +00:00
christos
ec2edc19fd
Make this compile without -DRTLD_LOADER and fix printf format problems on
...
the alpha.
1999-03-03 21:18:00 +00:00
jonathan
1988441027
Not all ports use 'tmp'.
1999-03-03 12:20:00 +00:00
jonathan
3eeb52dee0
Makefile ${MACHINE_ARCH} changes for mips{eb,el}, as suggested by
...
Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
1999-03-03 12:00:18 +00:00
christos
c346a6827a
fix rdbg macro args.
1999-03-01 18:59:31 +00:00
christos
26475619ed
KNF
1999-03-01 16:40:07 +00:00
christos
bc97a25328
Reality check.
1999-03-01 16:33:21 +00:00
christos
77aa6b2a64
- Use c style comments.
...
- & -> and
- align 4 in both functions for consistency.
1999-03-01 14:40:32 +00:00
kim
62b98a9670
Make mkdep succeed (use matching quotes in comment).
1999-03-01 03:39:39 +00:00
scottr
2b90737599
Replace local xva_arg() inline function with macros similar to those in
...
the stdio vfprintf() function. Fixes compilation errors on powerpc due
to differences in how va_list is implemented.
1999-02-27 21:52:23 +00:00
scottr
b69760be08
Fix typo introduced in rev 1.11
1999-02-27 21:38:04 +00:00
pk
e81b9ed433
* Make changing the PLT slot entry (lazy function binding) thread-safe.
...
* Insert `iflush' instructions for the patched words in PLT entries.
1999-02-27 17:12:13 +00:00
pk
4e7849055a
Add comment on the necessity of having to look at implicit memory addends
...
even though the sparc architecture uses `Elf_Rela' structures exclusively.
1999-02-27 11:36:02 +00:00
pk
1c13c70bab
Introduce pre-preocessor symbol RTLD_INHIBIT_COPY_RELOCS.
...
Currently, only mips does not include COPY_RELOCs code.
1999-02-27 10:44:26 +00:00
pk
a32bf0c1c2
Just initialize the stack-based temporary `rtld self' object.
1999-02-27 10:35:16 +00:00
pk
5c519e8777
Target bitmask for RELOC_RELATIVE should be a full word.
...
Also for RELOC_RELATIVEs, add in the memory contents in addition to r_addend.
1999-02-27 10:24:52 +00:00
christos
ddadb71e4e
Relative relocations should use addend.
1999-02-26 22:50:03 +00:00
pk
22001aee9c
Take care of `load address relative' relocations.
...
Ignore JMP_SLOTs in non-plt relocations.
1999-02-26 22:13:49 +00:00
pk
f6a359f27f
Completely construct the first PLT entry and correctly compute the
...
PC relative offset in the call insn.
1999-02-26 22:07:47 +00:00
pk
801d8e5b9d
Implement rtld_bind() stub.
...
Fix startup code.
1999-02-26 22:01:31 +00:00
tv
7255b47042
Partial fix for Alpha breakage. s/tmp_value/tmp/ in two places, and don't
...
try to check _rtld_objself when doing R_TYPE(RELATIVE) relocs, as the
Alpha ld.elf_so contains them!
I'm not sure the logic for the RELATIVE fix is quite right; it happens to
Work on alpha, but do we actually need to make sure we aren't relocating
ld.elf_so there?
XXX: I am working on making use of RTLD_RELOCATE_SELF on alpha, which may
make this hack of a fix moot.
1999-02-25 21:49:04 +00:00
christos
84cb65780e
Cleanup global variable access so rtld can be self relocating. Also KNF
...
reloc.c and move md sparc parts to arch/sparc/mdreloc.c
Now we don't need to load at address 0 on the i386 and the mips should be
trivial to fix.
1999-02-24 18:31:00 +00:00
christos
62926e7ee2
Work in progress (does not work yet).
1999-02-24 18:25:40 +00:00
pk
4b4b099e87
Fix glitch in previous.
1999-02-24 12:20:30 +00:00
pk
4c7fbbb5c8
Add an approximation of the necessary sparc bits in here.
...
I've not followed the trend in this file by trying to wrench the MD
code into individual functions. Rather I,ve replaced several functions
wholesale. Anyway, this whole file needs to be re-done.
1999-02-22 17:06:11 +00:00
kleink
8e718db8de
Replace home-grown header file installation with INCS/INCSDIR; from Erik
...
Bertelsen in PR bin/6869.
1999-02-21 18:10:24 +00:00
christos
98619fe771
Remove unneeded args for rtld (kleink)
1999-02-19 10:22:14 +00:00
christos
abbd7cf487
tv is right; we don't need to specialcase the i386.
1999-02-13 16:35:14 +00:00
lukem
dcab0210a0
convert from NOxxx= to MKxxx=no.
...
include <bsd.own.mk> if testing a MKxxx variable.
1999-02-13 02:54:17 +00:00
tv
9209c9b03a
On everything but the i386, don't write new values into the GOT that are
...
not pointing to the PLT in _rtld_relocate_plt_object(). I'm not quite
sure why the i386 added the extra relocations, but it removed the `return
0' needed for other arches.
THIS DOES NOT YET FIX BUILDING LD.ELF_SO ON ALPHA. There are some other
binutils 2.9.1 related issues, but this does return build ability to
2.8.1 based as and ld. Will do more investigation later.
1999-02-12 17:52:07 +00:00
christos
580ca245fd
Be consistant about the .rtld_start and _rtld_start
1999-02-12 17:15:52 +00:00
christos
73917056ff
Fixed for i386/elf.
1999-02-07 17:24:05 +00:00
christos
fed6586383
Support for {h,l,q,ll} modifiers and %p
1999-02-07 17:23:40 +00:00
christos
246b3960cd
Add -DRTLD_DEBUG_RELOC commented out.
1999-02-07 17:23:03 +00:00
castor
82bc6ffe05
Avoid confusing various C preprocessors by avoiding # [0-9]
1999-01-18 06:49:57 +00:00
christos
d86bec83ec
PR/6824: Erik Bertelsen: Missed arch directory in recent move.
1999-01-16 14:59:03 +00:00
thorpej
f821bc6d6b
Fixup some printf format argFixup some printf format argFixup some printf format argFixup some printf format argFixup some printf format argFixup some printf format argFixup some printf format argFixup some printf format argFixup some printf format args.
1999-01-11 23:12:16 +00:00
christos
9f77dc2e81
Add a few comments about the i386 and others.
1999-01-11 11:05:29 +00:00
christos
14d2402e4b
Add i386 bits. Only works with -fpic or -fPIC compiled binaries since
...
COPY relocations don't work.
1999-01-10 18:21:24 +00:00
christos
d72f81978d
Add i386 bits
1999-01-10 18:18:56 +00:00
christos
afb18a5077
Moved via repository copy to arch/powerpc
1999-01-10 17:34:42 +00:00
christos
86ef105de2
Moved via repository copy to arch/mips
1999-01-10 17:33:59 +00:00
christos
a12e7c4c86
Moved via repository copy to arch/alpha
1999-01-10 17:33:11 +00:00
christos
ab951f38e0
Add __attribute__ for printf like commands.
1999-01-10 17:19:01 +00:00