From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58981 invoked by alias); 28 Oct 2019 22:03:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 58972 invoked by uid 89); 28 Oct 2019 22:03:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,KAM_SHORT autolearn=ham version=3.3.1 spammy=_after_, rice, quoting X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 28 Oct 2019 22:03:24 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 988A320D4C; Mon, 28 Oct 2019 18:03:22 -0400 (EDT) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [IPv6:2620:52:3:1:5054:ff:fe06:16ca]) by mx1.osci.io (Postfix) with ESMTP id E5E0720D4C; Mon, 28 Oct 2019 18:03:20 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id C1A0D20AF6; Mon, 28 Oct 2019 18:03:20 -0400 (EDT) X-Gerrit-PatchSet: 1 Date: Mon, 28 Oct 2019 22:03:00 -0000 From: "matt rice (Code Review)" To: Christian Biesinger , gdb-patches@sourceware.org Auto-Submitted: auto-generated X-Gerrit-MessageType: comment Subject: [review] [RFC] Support $ORIGIN in DW_AT_comp_dir X-Gerrit-Change-Id: I5cd12d8c37c19fd2e9229b474d37f72185e41178 X-Gerrit-Change-Number: 402 X-Gerrit-ChangeURL: X-Gerrit-Commit: e5c3e81b14478ad5fb3b0bc759f5c4356602848e In-Reply-To: References: X-Gerrit-Comment-Date: Mon, 28 Oct 2019 18:03:20 -0400 Reply-To: gnutoolchain-gerrit@osci.io MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/3.0.3-74-g460fb0f7e9 Content-Type: text/plain; charset=UTF-8 Message-Id: <20191028220320.C1A0D20AF6@gnutoolchain-gerrit.osci.io> X-SW-Source: 2019-10/txt/msg01001.txt.bz2 matt rice has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/402 ...................................................................... Patch Set 1: regarding your open questions, it seems according to https://www.sco.com/developers/gabi/latest/ch5.dynamic.html#substitution valid names (like 'ORIGIN') match as: name := [_a-zA-Z0-9]* quoting: If a dollar sign is not immediately followed by a name or a brace-enclosed name, the behavior of the dynamic linker is unspecified. --- so $$ORIGIN is unspecified, quoting: Moreover, the pathname will contain no symbolic links or use of . or .. components. --- however I believe this is refering to the path _after_ the substitution sequence rather than before. If the '/' occurs before the substitution sequence, I believe that the following may(?) apply, in which case ./$ORIGIN is treated as a directory named literally $ORIGIN in the current directory? https://www.sco.com/developers/gabi/latest/ch5.dynamic.html#shobj_dependencies quoting: If a shared object name has one or more slash (/) characters anywhere in the name, such as /usr/lib/lib2 or directory/file, the dynamic linker uses that string directly as the path name. If the name has no slashes, such as lib1, three facilities specify shared object path --- Note the enclosed link includes another valid name not matched by the patch, in particular: ${ORIGIN} -- Gerrit-Project: binutils-gdb Gerrit-Branch: master Gerrit-Change-Id: I5cd12d8c37c19fd2e9229b474d37f72185e41178 Gerrit-Change-Number: 402 Gerrit-PatchSet: 1 Gerrit-Owner: Christian Biesinger Gerrit-CC: matt rice Gerrit-Comment-Date: Mon, 28 Oct 2019 22:03:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment