📄 readme
字号:
Almost all of the code present in these source files was takenfrom GLIBC. In the descriptions below, all files mentioned arewith respect to the top level GLIBC source directory accept forcode taken from the Linux kernel.boot1_arch.h------------Contains code to fix up the stack pointer so that the dynamiclinker 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'. Alsocontains the function to perform relocations for objectsother than the linker itself. The code was taken from thefunction 'elf_machine_rel' in 'sysdeps/mips/dl-machine.h'.ld_syscalls.h-------------Used to contain all the macro functions for the system callsas well as the list of system calls supported. We now include<sys/syscall.h> but with the __set_errno macro defined emptyso 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 andcan be found in the file 'include/asm-mips/unistd.h'.ld_sysdep.h-----------Contains bootstrap code for the dynamic linker, magic numbersfor detecting MIPS target types and some macros. The macrofunction 'PERFORM_BOOTSTRAP_GOT' is used to relocate the dynamiclinker's GOT so that function calls can be made. The code istaken from the function 'ELF_MACHINE_BEFORE_RTLD_RELOC' in thefile 'sysdeps/mips/dl-machine.h'. The other macro function'PERFORM_BOOTSTRAP_RELOC' is used to do the relocations forthe dynamic loader. The code is taken from the function'elf_machine_rel' in the file 'sysdeps/mips/dl-machine.h'. Thefinal macro function is 'INIT_GOT' which initializes the GOTfor the application being dynamically linked and loaded. Thecode 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 runtimeresolver. 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 thesymbol index and the old GP register.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -