|
@@ -1561,6 +1561,7 @@ int register_library(const char* name, unsigned long load_address) {
|
|
|
|
|
|
noreturn void execute_elf_object(struct shim_handle* exec, int* argcp, const char** argp,
|
|
noreturn void execute_elf_object(struct shim_handle* exec, int* argcp, const char** argp,
|
|
ElfW(auxv_t)* auxp) {
|
|
ElfW(auxv_t)* auxp) {
|
|
|
|
+ __UNUSED(argp);
|
|
int ret = vdso_map_init();
|
|
int ret = vdso_map_init();
|
|
if (ret < 0) {
|
|
if (ret < 0) {
|
|
SYS_PRINTF("Could not initialize vDSO (error code = %d)", ret);
|
|
SYS_PRINTF("Could not initialize vDSO (error code = %d)", ret);
|
|
@@ -1572,7 +1573,7 @@ noreturn void execute_elf_object(struct shim_handle* exec, int* argcp, const cha
|
|
assert((uintptr_t)argcp % 16 == 0); /* stack must be 16B-aligned */
|
|
assert((uintptr_t)argcp % 16 == 0); /* stack must be 16B-aligned */
|
|
assert((void*)argcp + sizeof(long) == argp || argp == NULL);
|
|
assert((void*)argcp + sizeof(long) == argp || argp == NULL);
|
|
|
|
|
|
- assert(REQUIRED_ELF_AUXV >= 8); /* stack allocated enough space */
|
|
|
|
|
|
+ static_assert(REQUIRED_ELF_AUXV >= 8, "not enough space on stack for auxv");
|
|
auxp[0].a_type = AT_PHDR;
|
|
auxp[0].a_type = AT_PHDR;
|
|
auxp[0].a_un.a_val = (__typeof(auxp[0].a_un.a_val))exec_map->l_phdr;
|
|
auxp[0].a_un.a_val = (__typeof(auxp[0].a_un.a_val))exec_map->l_phdr;
|
|
auxp[1].a_type = AT_PHNUM;
|
|
auxp[1].a_type = AT_PHNUM;
|
|
@@ -1596,7 +1597,7 @@ noreturn void execute_elf_object(struct shim_handle* exec, int* argcp, const cha
|
|
auxp[7].a_un.a_val = 0;
|
|
auxp[7].a_un.a_val = 0;
|
|
|
|
|
|
/* populate extra memory space for aux vector data */
|
|
/* populate extra memory space for aux vector data */
|
|
- assert(REQUIRED_ELF_AUXV_SPACE >= 16); /* stack allocated enough space */
|
|
|
|
|
|
+ static_assert(REQUIRED_ELF_AUXV_SPACE >= 16, "not enough space on stack for auxv");
|
|
ElfW(Addr) auxp_extra = (ElfW(Addr))&auxp[8];
|
|
ElfW(Addr) auxp_extra = (ElfW(Addr))&auxp[8];
|
|
|
|
|
|
ElfW(Addr) random = auxp_extra; /* random 16B for AT_RANDOM */
|
|
ElfW(Addr) random = auxp_extra; /* random 16B for AT_RANDOM */
|
|
@@ -1630,6 +1631,7 @@ noreturn void execute_elf_object(struct shim_handle* exec, int* argcp, const cha
|
|
}
|
|
}
|
|
|
|
|
|
BEGIN_CP_FUNC(library) {
|
|
BEGIN_CP_FUNC(library) {
|
|
|
|
+ __UNUSED(size);
|
|
assert(size == sizeof(struct link_map));
|
|
assert(size == sizeof(struct link_map));
|
|
|
|
|
|
struct link_map* map = (struct link_map*)obj;
|
|
struct link_map* map = (struct link_map*)obj;
|