Eric Andersen 88352870e9 Make the mips ld.so debug noise somewhat useful, and less gratuitously 21 years ago
..
README a91e3b0a22 ldso specific syscalls and userspace syscalls all in one file now. 22 years ago
boot1_arch.h cf010f16ce Fix mips so it compiles with gcc 3.3 21 years ago
dl-startup.h cf010f16ce Fix mips so it compiles with gcc 3.3 21 years ago
dl-syscalls.h fa211c565c Patch from Stefan Allius, avoid compiler warnings (unused variable) 22 years ago
dl-sysdep.h a46c34c4ec Patch from Tobias Anderberg <tobias.anderberg@axis.com> to abstract 22 years ago
elfinterp.c 88352870e9 Make the mips ld.so debug noise somewhat useful, and less gratuitously 21 years ago
ld_syscalls.h fa211c565c Patch from Stefan Allius, avoid compiler warnings (unused variable) 22 years ago
ld_sysdep.h a46c34c4ec Patch from Tobias Anderberg <tobias.anderberg@axis.com> to abstract 22 years ago
resolve.S b26ab3f5bf The original glibc sysdeps/mips/dl-machine.h source from Kazumoto Kojima was 21 years ago

README

Almost all of the code present in these source files was taken
from GLIBC. In the descriptions below, all files mentioned are
with respect to the top level GLIBC source directory accept for
code taken from the Linux kernel.

boot1_arch.h
------------
Contains code to fix up the stack pointer so that the dynamic
linker can find argc, argv and Auxillary Vector Table (AVT).
The code is taken from the function 'RTLD_START' in the file
'sysdeps/mips/dl-machine.h'.

elfinterp.c
-----------
Contains the runtime resolver code taken from the function
'__dl_runtime_resolve' in 'sysdeps/mips/dl-machine.h'. Also
contains the function to perform relocations for objects
other than the linker itself. The code was taken from the
function 'elf_machine_rel' in 'sysdeps/mips/dl-machine.h'.

ld_syscalls.h
-------------
Used to contain all the macro functions for the system calls
as well as the list of system calls supported. We now include
but with the __set_errno macro defined empty
so we can use the same file for the linker as well as userspace.
Original code was taken from the Linux kernel source 2.4.17 and
can be found in the file 'include/asm-mips/unistd.h'.

ld_sysdep.h
-----------
Contains bootstrap code for the dynamic linker, magic numbers
for detecting MIPS target types and some macros. The macro
function 'PERFORM_BOOTSTRAP_GOT' is used to relocate the dynamic
linker's GOT so that function calls can be made. The code is
taken from the function 'ELF_MACHINE_BEFORE_RTLD_RELOC' in the
file 'sysdeps/mips/dl-machine.h'. The other macro function
'PERFORM_BOOTSTRAP_RELOC' is used to do the relocations for
the dynamic loader. The code is taken from the function
'elf_machine_rel' in the file 'sysdeps/mips/dl-machine.h'. The
final macro function is 'INIT_GOT' which initializes the GOT
for the application being dynamically linked and loaded. The
code is taken from the functions 'elf_machine_runtime_setup'
and 'elf_machine_got_rel' in 'sysdeps/mips/dl-machine.h'.

resolve.S
---------
Contains the low-level assembly code for the dynamic runtime
resolver. The code is taken from the assembly code function
'_dl_runtime_resolve' in the file 'sysdeps/mips/dl-machine.h'.
The code looks a bit different since we only need to pass the
symbol index and the old GP register.