Changeset 57d44dd in mainline for uspace


Ignore:
Timestamp:
2018-04-10T18:51:14Z (7 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
20287223
Parents:
e3f819f
Message:

Instead of using .interp section, determine loader by name.

Location:
uspace
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/elf/elf_mod.c

    re3f819f r57d44dd  
    268268                break;
    269269        case PT_INTERP:
    270                 /* Assume silently interp == "/app/dload" */
    271                 elf->info->interp = "/app/dload";
     270                elf->info->interp =
     271                    (void *)((uint8_t *)entry->p_vaddr + elf->bias);
     272
     273                // FIXME: This actually won't work, because the text segment is
     274                // not loaded yet.
     275                #if 0
     276                if (elf->info->interp[entry->p_filesz - 1] != '\0') {
     277                        DPRINTF("Unterminated ELF interp string.\n");
     278                        return EE_INVALID;
     279                }
     280                DPRINTF("interpreter: \"%s\"\n", elf->info->interp);
     281                #endif
    272282                break;
    273283        case PT_DYNAMIC:
  • uspace/lib/c/include/elf/elf_mod.h

    re3f819f r57d44dd  
    5151#define EE_INCOMPATIBLE         3       /* ELF image is not compatible with current architecture */
    5252#define EE_UNSUPPORTED          4       /* Non-supported ELF (e.g. dynamic ELFs) */
    53 #define EE_LOADER               5       /* The image is actually a program loader. */
    54 #define EE_IRRECOVERABLE        6
    55 #define EE_IO                   7       /* Could not read file. */
     53#define EE_IRRECOVERABLE        5
     54#define EE_IO                   6       /* Could not read file. */
    5655
    5756typedef enum {
  • uspace/srv/loader/Makefile

    re3f819f r57d44dd  
    3636
    3737GENERIC_SOURCES = \
    38         main.c \
    39         interp.S
     38        main.c
    4039
    4140SOURCES = \
Note: See TracChangeset for help on using the changeset viewer.