Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "matt rice (Code Review)" <gerrit@gnutoolchain-gerrit.osci.io>
To: Christian Biesinger <cbiesinger@google.com>,	gdb-patches@sourceware.org
Subject: [review] [RFC] Support $ORIGIN in DW_AT_comp_dir
Date: Mon, 28 Oct 2019 22:03:00 -0000	[thread overview]
Message-ID: <20191028220320.C1A0D20AF6@gnutoolchain-gerrit.osci.io> (raw)
In-Reply-To: <gerrit.1572295041000.I5cd12d8c37c19fd2e9229b474d37f72185e41178@gnutoolchain-gerrit.osci.io>

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 <cbiesinger@google.com>
Gerrit-CC: matt rice <ratmice@gmail.com>
Gerrit-Comment-Date: Mon, 28 Oct 2019 22:03:20 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


  reply	other threads:[~2019-10-28 22:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 20:37 Christian Biesinger (Code Review)
2019-10-28 22:03 ` matt rice (Code Review) [this message]
2020-01-15 20:09 ` Christian Biesinger (Code Review)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191028220320.C1A0D20AF6@gnutoolchain-gerrit.osci.io \
    --to=gerrit@gnutoolchain-gerrit.osci.io \
    --cc=cbiesinger@google.com \
    --cc=gdb-patches@sourceware.org \
    --cc=gnutoolchain-gerrit@osci.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox