Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 8 Jan 2016 12:09:54 +0100
From: Markus Wichmann <>
Subject: Re: dynamic linker command line invocation

On Thu, Jan 07, 2016 at 06:29:48PM -0500, N Jain wrote:
> Hi Rich,
> Thanks I am able to get my dynamic linker loaded into memory but facing
> issue during application load at __dls3 function.
> I am getting following print from MUSL -
> "musl libc
> Version 1.1.10
> Dynamic Program Loader
> Usage: hello.elf [options] [--] pathname--2--"
> Not sure why my application is not getting loaded in below code __dls3
> function ?

That's what I was trying to tell you in my first answer: You need to set
argv[0] to something (doesn't matter so long as it's not "ldd"), and
argv[1] to the program file you want to run. (And argc to 2, obviously).

The only alternative to that is to load the program file in the kernel
additionally to musl, and then set the following aux vectors:

AT_BASE - base address of dynamic linker
AT_PHDR - address of main executable's program headers
AT_PHNUM, AT_PHENT - number and size of main executable's program
headers, respectively.
AT_ENTRY - main executable's entry point


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.