• Mike Frysinger's avatar
    cmd_elf: add an option for loading ELFs according to PHDRs · f44a928e
    Mike Frysinger authored
    The current ELF loading function does a lot of work above and beyond a
    simple "loading".  It ignores the real load addresses and loads things
    into their virtual (runtime) address.  This is undesirable when we just
    want it to load an ELF and let the ELF do the actual C runtime init.
    
    So add a command line option to let people choose to load via either the
    program or section headers.  I'd prefer to have program header loading
    be the default, but this would break historical behavior, so I'll leave
    section header loading as the norm.
    Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
    f44a928e
cmd_elf.c 10.2 KB