From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10351 Path: news.gmane.org!.POSTED!not-for-mail From: "Sidney Manning" Newsgroups: gmane.linux.lib.musl.general Subject: relative link between libc.so and the dynamic linker Date: Wed, 3 Aug 2016 15:52:51 -0500 Message-ID: <020b01d1edc9$00bbc490$02334db0$@codeaurora.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1470257593 4485 195.159.176.226 (3 Aug 2016 20:53:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 3 Aug 2016 20:53:13 +0000 (UTC) To: Original-X-From: musl-return-10364-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 03 22:53:09 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1bV3A4-0000S2-JO for gllmg-musl@m.gmane.org; Wed, 03 Aug 2016 22:53:08 +0200 Original-Received: (qmail 6012 invoked by uid 550); 3 Aug 2016 20:53:06 -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 5979 invoked from network); 3 Aug 2016 20:53:05 -0000 X-Mailer: Microsoft Outlook 15.0 Thread-Index: AdHtx8YyTvUMb1E8Q76j1Usth4uSPw== Content-Language: en-us Xref: news.gmane.org gmane.linux.lib.musl.general:10351 Archived-At: I'd like to suggest making the symbolic link between libc.so and ld-musl-.so.1 relative rather than absolute. A relative path makes movement between systems easier, in particular when one is copying cross binaries to into a runtime environment. diff --git a/tools/install.sh b/tools/install.sh index d913b60..1c102f5 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -48,7 +48,7 @@ trap 'rm -f "$tmp"' EXIT INT QUIT TERM HUP umask 077 if test "$symlink" ; then -ln -s "$1" "$tmp" +ln -s -r "$1" "$tmp" else cat < "$1" > "$tmp" chmod "$mode" "$tmp" The final result would look something like this: ld-musl-x86_64.so.1 -> ../usr/lib/libc.so Rather than: ld-musl-x86_64.so.1 -> /tmp/musl/install/usr/lib/libc.so Thanks, Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation