diff options
Diffstat (limited to 'ldso/include')
-rw-r--r-- | ldso/include/dl-defs.h | 14 | ||||
-rw-r--r-- | ldso/include/ldso.h | 10 |
2 files changed, 23 insertions, 1 deletions
diff --git a/ldso/include/dl-defs.h b/ldso/include/dl-defs.h index 21a66a40f..3de7f5230 100644 --- a/ldso/include/dl-defs.h +++ b/ldso/include/dl-defs.h @@ -95,6 +95,20 @@ typedef struct { ((LOADADDR) + (ADDR)) #endif +/* Initialize the location of the dynamic addr. This is only called + * from DL_START, so additional arguments passed to it may be referenced. */ +#ifndef DL_BOOT_COMPUTE_DYN +#define DL_BOOT_COMPUTE_DYN(DPNT, GOT, LOAD_ADDR) \ + ((DPNT) = ((ElfW(Dyn) *) DL_RELOC_ADDR(load_addr, got))) +#endif + +/* Initialize the location of the global offset table. This is only called + * from DL_START, so additional arguments passed to it may be referenced. */ +#ifndef DL_BOOT_COMPUTE_GOT +#define DL_BOOT_COMPUTE_GOT(GOT) \ + ((GOT) = elf_machine_dynamic()) +#endif + /* Initialize a LOADADDR representing the loader itself. It's only * called from DL_BOOT, so additional arguments passed to it may be * referenced. diff --git a/ldso/include/ldso.h b/ldso/include/ldso.h index 88c1116e7..178af0e64 100644 --- a/ldso/include/ldso.h +++ b/ldso/include/ldso.h @@ -106,7 +106,15 @@ extern void _dl_unsetenv(const char *symbol, char **envp); extern char *_dl_strdup(const char *string); extern void _dl_dprintf(int, const char *, ...); +#ifndef DL_GET_READY_TO_RUN_EXTRA_PARMS +# define DL_GET_READY_TO_RUN_EXTRA_PARMS +#endif +#ifndef DL_GET_READY_TO_RUN_EXTRA_ARGS +# define DL_GET_READY_TO_RUN_EXTRA_ARGS +#endif + extern void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr, - ElfW(auxv_t) auxvt[AT_EGID + 1], char **envp, char **argv); + ElfW(auxv_t) auxvt[AT_EGID + 1], char **envp, char **argv + DL_GET_READY_TO_RUN_EXTRA_PARMS); #endif /* _LDSO_H_ */ |