- 29 6月, 2011 3 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
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.
-
由 Rich Felker 提交于
prior to this change, copy relocations for initialized pointer variables would not reflect the relocated contents of the pointer.
-
- 27 6月, 2011 11 次提交
-
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
deps can be null if a library has no dependencies (such as libc itself)
-
由 Rich Felker 提交于
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.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
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.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
- 26 6月, 2011 5 次提交
-
-
由 Rich Felker 提交于
1. search was wrongly beginning with lib itself rather than dso head 2. inconsistent resolution of function pointers for functions in plt
-
由 Rich Felker 提交于
previously, a potentially-indeterminate value from we_offs was being used, resulting in wrong we_wordc and subsequent crashes in the caller.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
- 25 6月, 2011 5 次提交
-
-
由 Rich Felker 提交于
why did gcc allow this invalid assignment to compile in the first place?
-
由 Rich Felker 提交于
first, use $LD_LIBRARY_PATH unless suid. if that fails, read path from /etc/ld-musl-$ARCH.path and fallback to a builtin default.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
eventually (once dlopen exists) this behavior will be conditional on dlopen/dlsym not being reachable.
-
由 Rich Felker 提交于
-
- 24 6月, 2011 2 次提交
-
-
由 Rich Felker 提交于
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.
-
由 Rich Felker 提交于
-
- 20 6月, 2011 1 次提交
-
-
由 Rich Felker 提交于
-
- 19 6月, 2011 3 次提交
-
-
由 Rich Felker 提交于
leaving it uninitialized caused unpredictable crashes or worse due to calling an indeterminate function pointer.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
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
-
- 18 6月, 2011 1 次提交
-
-
由 Rich Felker 提交于
-
- 17 6月, 2011 1 次提交
-
-
由 Rich Felker 提交于
-
- 15 6月, 2011 1 次提交
-
-
由 Rich Felker 提交于
this seems to be necessary to make the linker accept the functions in a shared library (perhaps to generate PLT entries?) strictly speaking libc-internal asm should not need it. i might clean that up later.
-
- 14 6月, 2011 7 次提交
-
-
由 Rich Felker 提交于
if thread id was reused by the kernel between the time pthread_kill read it from the userspace pthread_t object and the time of the tgkill syscall, a signal could be sent to the wrong thread. the tgkill syscall was supposed to prevent this race (versus the old tkill syscall) but it can't; it can only help in the case where the tid is reused in a different process, but not when the tid is reused in the same process. the only solution i can see is an extra lock to prevent threads from exiting while another thread is trying to pthread_kill them. it should be very very cheap in the non-contended case.
-
由 Rich Felker 提交于
previously a long-running dtor could cause pthread_detach to block.
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
-
由 Rich Felker 提交于
these are useless and have caused problems for users trying to build with non-gnu tools like tcc's assembler.
-
由 Rich Felker 提交于
-