| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
this is mostly useless for shared libs (though it could help for
prelink-like purposes); the intended use case is for adding support
for calling the dynamic linker directly to run a program, as in:
./libc.so ./a.out foo
this usage is not yet supported.
|
|
|
|
|
| |
prior to this change, copy relocations for initialized pointer
variables would not reflect the relocated contents of the pointer.
|
| |
|
| |
|
| |
|
|
|
|
| |
deps can be null if a library has no dependencies (such as libc itself)
|
|
|
|
|
|
| |
basically we temporarily make the library and all its dependencies
part of the global namespace but only for the duration of performing
relocations, then return them to their former state.
|
| |
|
|
|
|
|
|
| |
some of the code is not yet used, and is in preparation for dlopen
which needs to be able to handle failure loading libraries without
terminating the program.
|
|
|
|
|
| |
1. search was wrongly beginning with lib itself rather than dso head
2. inconsistent resolution of function pointers for functions in plt
|
| |
|
| |
|
|
|
|
|
| |
first, use $LD_LIBRARY_PATH unless suid. if that fails, read path from
/etc/ld-musl-$ARCH.path and fallback to a builtin default.
|
|
|
|
|
| |
eventually (once dlopen exists) this behavior will be conditional on
dlopen/dlsym not being reachable.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
the use of this test will be much stricter than glibc and other
typical implementations; the environment will not be honored
whatsoever unless the program is confirmed non-suid/sgid by the aux
vector the kernel passed in. no fallback to slow syscall-based
checking is used if the kernel fails to provide the information; we
simply assume the worst (suid) in this case and refuse to honor
environment.
|
| |
|
|
some notes:
- library search path is hard coded
- x86_64 code is untested and may not work
- dlopen/dlsym is not yet implemented
- relocations in read-only memory won't work
|