From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4909 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: --library-path and friends (was: [musl] musl 1.1.0 released) Date: Fri, 18 Apr 2014 16:46:22 -0400 Message-ID: <20140418204621.GM26358@brightrain.aerifal.cx> References: <20140416084102.GA11943@brightrain.aerifal.cx> <20140416104759.GJ18458@example.net> <20140416165352.GH26358@brightrain.aerifal.cx> <20140417081547.GK18458@example.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1397854005 22794 80.91.229.3 (18 Apr 2014 20:46:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Apr 2014 20:46:45 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4913-gllmg-musl=m.gmane.org@lists.openwall.com Fri Apr 18 22:46:38 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WbFgC-0000lf-1t for gllmg-musl@plane.gmane.org; Fri, 18 Apr 2014 22:46:36 +0200 Original-Received: (qmail 17729 invoked by uid 550); 18 Apr 2014 20:46:35 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 17721 invoked from network); 18 Apr 2014 20:46:34 -0000 Content-Disposition: inline In-Reply-To: <20140417081547.GK18458@example.net> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:4909 Archived-At: On Thu, Apr 17, 2014 at 10:15:48AM +0200, u-igbb@aetey.se wrote: > On Wed, Apr 16, 2014 at 12:53:52PM -0400, Rich Felker wrote: > > I'm committing a patch based loosely on yours that accepts more forms > > (e.g. --preload=...) and one additional option (--list). Let me know > > if it fails to meet your needs and I can improve it. > > Without having looked at the code yet: > > 1. This is quite certainly just fine. > > My needs are very basic, as long as it accepts "--library-path " > which fully overrides LD_LIBRARY_PATH (not resetting it of course) and > --preload with a corresponding semantics, then I am in business and happy. > > --list is welcome! Yes. And it makes it possible to implement ldd as a shell script using ld-musl with --list rather than as a symlink to ld-musl. This is probably better in that it works even if the desired argv[0] does not get passed to ldd. > 2. Not every feature is certainly for good :) > > Frankly I do not see any need for the '=' syntax extention, it probably > costs some extra byte[s] but more importantly once introduced you will > have to keep the extra possibility. I do not think (didn't check for a I'm not sure whether glibc's dynamic linker supports it, but the processing of the form with --option=arg is part of the "standard" getopt_long processing for long options, and I felt like it should be supported here too for the sake of consistency if we're accepting long options that look like getopt_long options. It's just one extra (trivial) line of source anyway. Rich