From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10237 Path: news.gmane.org!not-for-mail From: Daniel Wilkerson Newsgroups: gmane.linux.lib.musl.general Subject: Re: request for help with aux Date: Mon, 27 Jun 2016 14:33:53 -0700 Message-ID: References: <20160627210013.GA7422@gordon> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1467063284 30620 80.91.229.3 (27 Jun 2016 21:34:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jun 2016 21:34:44 +0000 (UTC) Cc: Mark Winterrowd To: musl@lists.openwall.com Original-X-From: musl-return-10250-gllmg-musl=m.gmane.org@lists.openwall.com Mon Jun 27 23:34:43 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1bHeAw-0007Qz-6g for gllmg-musl@m.gmane.org; Mon, 27 Jun 2016 23:34:38 +0200 Original-Received: (qmail 20299 invoked by uid 550); 27 Jun 2016 21:34:35 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 20279 invoked from network); 27 Jun 2016 21:34:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=jq/2JV9DPsvFFcNsOko2R1siPx+wvjjIPFD0LtCyMUs=; b=WoqPr4iohJKHO5/eacj6qPn6W2ZyrB98hOhTYjVbNFRE3uAIdASyuhrazRsw/cCvWs AddxvywGVWQSWq2vlPiX+1B65W1kOYKNbid+n6lbbAbWGH6dQ5eJ3/XFeyGbSimuj4hf JLIspihHHeQ6kAYZ58T+BwvZoj1hdUEpGtteJeg2mryRgfaW7Qom2SyS/9YhkRsMBRBx JEPG+R5b3zTlFxj6MAvASfOjmV8+r+fkn/DWrba/BPLjiMYHv9+yFHadJu7PnsBt6qOq UdoS2PC7opv9JTDBoVQ1pGrBKZ4VX29DRHcmLHX8XTZHsKUqq96Ru8gJr4BvIt+Uj/RL w/Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=jq/2JV9DPsvFFcNsOko2R1siPx+wvjjIPFD0LtCyMUs=; b=ET4kUzXzpleLDzNmjWjsDkd34pToXkr+GM1+KC1tGBBPiCy0xtLrRAHOckJz+f5yYm r4AZpC4wRO9CDuTJJLA8att3sAt3RPrcFTK6XyhgSmc0Eu/LQYNG/FSgR7Cs4EkzFWsL ZvkyDaRUU13ZKvCORfc8/TvXl0kITi+BJ0/DQdE3yND2soG6V41EDd/QXUNnJwE8Akkh FMD9saLXu1rxcFOZPIO679dcugaQ6DEhntUlaA0fCj46zh+zzkqEsSpFupI94OZ66lZf 3d6ZbKzMkbehP+JHAF8N3wW3yBir/oQ1x7/lctGDeoDhHoucLt7KENEIOYHpvqXbBaln VRxA== X-Gm-Message-State: ALyK8tIGNPq4D0dnVSZHVcc9gu2EUKeAquA/PkfCJWEejjzEjpfTfOJkp7I06qNY60uFB5OTmHve/6tDLOjnZg== X-Received: by 10.37.37.67 with SMTP id l64mr12348171ybl.131.1467063263262; Mon, 27 Jun 2016 14:34:23 -0700 (PDT) In-Reply-To: <20160627210013.GA7422@gordon> Xref: news.gmane.org gmane.linux.lib.musl.general:10237 Archived-At: Ah, thank you. From that page: This function is a nonstandard glibc extension. And: The primary consumer of the information in the auxiliary vector is the dynamic linker ld-linux.so(8). The auxiliary vector is a convenient and efficient shortcut that allows the kernel to communicate a certain set of standard information that the dynamic linker usually or always needs. In some cases, the same information could be obtained by system calls, but using the auxiliary vector is cheaper. It seems therefore that if I am doing static linking that it is safe to simply provide an empty aux vector? Daniel On Mon, Jun 27, 2016 at 2:00 PM, Bobby Bingham wrote: > On Mon, Jun 27, 2016 at 01:07:59PM -0700, Daniel Wilkerson wrote: >> This seems to initalize aux to be all zeros, so it seems that in >> theory all of the aux values could be optional: >> >> size_t i, *auxv, aux[AUX_CNT] = { 0 }; >> >> What I'm wondering is where to find the semantics of all of the aux >> names; I could hunt through all of the code, but any high-level >> suggestions you could provide could help a lot. As a bonus, which >> ones might not have sensible defaults and are actually non-optional, >> if any. > > The getauxval man page is a good starting point: > http://man7.org/linux/man-pages/man3/getauxval.3.html > > -- > Bobby