about summary refs log tree commit diff
path: root/src/ldso/mips
Commit message (Collapse)AuthorAgeFilesLines
* add __dlsym_time64 asm entry point for all legacy-32bit-time_t archsRich Felker2019-11-021-0/+3
|
* use hidden visibility for call from dlsym to internal __dlsymRich Felker2015-04-141-0/+1
|
* dynamic linker bootstrap overhaulRich Felker2015-04-131-46/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this overhaul further reduces the amount of arch-specific code needed by the dynamic linker and removes a number of assumptions, including: - that symbolic function references inside libc are bound at link time via the linker option -Bsymbolic-functions. - that libc functions used by the dynamic linker do not require access to data symbols. - that static/internal function calls and data accesses can be made without performing any relocations, or that arch-specific startup code handled any such relocations needed. removing these assumptions paves the way for allowing libc.so itself to be built with stack protector (among other things), and is achieved by a three-stage bootstrap process: 1. relative relocations are processed with a flat function. 2. symbolic relocations are processed with no external calls/data. 3. main program and dependency libs are processed with a fully-functional libc/ldso. reduction in arch-specific code is achived through the following: - crt_arch.h, used for generating crt1.o, now provides the entry point for the dynamic linker too. - asm is no longer responsible for skipping the beginning of argv[] when ldso is invoked as a command. - the functionality previously provided by __reloc_self for heavily GOT-dependent RISC archs is now the arch-agnostic stage-1. - arch-specific relocation type codes are mapped directly as macros rather than via an inline translation function/switch statement.
* rename dynamic linker entry point from _start to _dlstartRich Felker2014-06-201-3/+3
| | | | | | the main motivation for this change is to aid in debugging. since the main program's entry point is also named _start, it was difficult to set breakpoints or quickly identify which _start execution stopped in.
* fix dlsym asm for mipsRich Felker2012-11-081-1/+2
| | | | | | saving the return address from the delay slot is not valid -- by the time the instruction executes, the return address has already been replaced.
* fix bug computing argc when invoking ld-musl-mips.so.1 progname ...Rich Felker2012-08-171-3/+3
|
* dlsym RTLD_NEXT support for mipsRich Felker2012-08-051-0/+15
| | | | untested
* mips dynamic linker supportRich Felker2012-08-051-0/+46
not heavily tested, but the basics are working. the basic concept is that the dynamic linker entry point code invokes a pure-PIC (no global accesses) C function in reloc.h to perform the early GOT relocations needed to make the dynamic linker itself functional, then invokes __dynlink like on other archs. since mips uses some ugly arch-specific hacks to optimize relocating the GOT (rather than just using the normal DT_REL[A] tables like on other archs), the dynamic linker has been modified slightly to support calling arch-specific relocation code in reloc.h. most of the actual mips-specific behavior was developed by reading the output of readelf on libc.so and simple executable files. i could not find good reference information on which relocation types need to be supported or their semantics, so it's possible that some legitimate usage cases will not work yet.