mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
libs/libc/modlib: fix dynamic loader issues
* build-globals.sh
- Macros for defining symbols etc. based on assembler in use
- Use the System.map to get all the nuttx symbols
* libs/libc/modlib/modlib_globals.S
- Provide an empty skeleton. If the dynamic loading functions
are required then run build-global.sh after a clean build
using the skeleton. This will fill out the skeleton with the
symbols to be available to dynamically loaded modules.
* libs/libc/modlib/modlib_loadhdrs.c
- Fix case where there are no program headers are avaiable
This commit is contained in:
committed by
David Sidrane
parent
a5d1d2d4e5
commit
b5cd7c2a82
@@ -493,14 +493,10 @@ int up_relocate(const Elf32_Rel *rel, const Elf32_Sym *sym, uintptr_t addr)
|
||||
}
|
||||
break;
|
||||
|
||||
case R_ARM_RELATIVE :
|
||||
case R_ARM_JUMP_SLOT :
|
||||
case R_ARM_RELATIVE:
|
||||
case R_ARM_JUMP_SLOT:
|
||||
{
|
||||
binfo("Relocating: RELATIVE/JUMP_SLOT at %p value: %08lx"
|
||||
"with %08lx\n",
|
||||
(void *)addr, *(unsigned long *)addr,
|
||||
(unsigned long)sym->st_value);
|
||||
*(uint32_t *) addr = (uint32_t) sym->st_value;
|
||||
*(uint32_t *)addr = (uint32_t)sym->st_value;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user