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:
Neale Ferguson
2023-07-07 09:15:59 +10:00
committed by David Sidrane
parent a5d1d2d4e5
commit b5cd7c2a82
8 changed files with 185 additions and 4015 deletions
+3 -7
View File
@@ -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;