Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 3551 → Rev 3552

/branches/dynload/uspace/srv/loader/elf_load.c
99,7 → 99,8
*
* @return EOK on success or negative error code.
*/
int elf_load_file(char *file_name, size_t so_bias, elf_info_t *info)
int elf_load_file(char *file_name, size_t so_bias, eld_flags_t flags,
elf_info_t *info)
{
elf_ld_t elf;
 
116,6 → 117,7
 
elf.fd = fd;
elf.info = info;
elf.flags = flags;
 
rc = elf_load(&elf, so_bias);
 
307,8 → 309,8
return load_segment(elf, entry);
break;
case PT_INTERP:
/* Assume silently interp == "/lib/rtld.so" */
elf->info->interp = "/lib/rtld.so";
/* Assume silently interp == "/lib/rtld" */
elf->info->interp = "/lib/rtld";
break;
case PT_DYNAMIC:
case PT_SHLIB:
425,7 → 427,13
dp += now;
}
 
// printf("set area flags to %d\n", flags);
/*
* The caller wants to modify the segments first. He will then
* need to set the right access mode and ensure SMC coherence.
*/
if ((elf->flags & ELDF_RW) != 0) return EE_OK;
 
printf("set area flags to %d\n", flags);
rc = as_area_change_flags((uint8_t *)entry->p_vaddr + bias, flags);
if (rc != 0) {
printf("failed to set memory area flags\n");