From owner-freebsd-bugs@FreeBSD.ORG Thu Feb 27 16:30:02 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A84A7E4 for ; Thu, 27 Feb 2014 16:30:02 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CFBB31895 for ; Thu, 27 Feb 2014 16:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s1RGU1o9020339 for ; Thu, 27 Feb 2014 16:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s1RGU1DW020338; Thu, 27 Feb 2014 16:30:01 GMT (envelope-from gnats) Resent-Date: Thu, 27 Feb 2014 16:30:01 GMT Resent-Message-Id: <201402271630.s1RGU1DW020338@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ed Maste Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C6D551E for ; Thu, 27 Feb 2014 16:21:58 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 683D8179F for ; Thu, 27 Feb 2014 16:21:58 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s1RGLwPh018776 for ; Thu, 27 Feb 2014 16:21:58 GMT (envelope-from emaste@freefall.freebsd.org) Received: (from emaste@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s1RGLwIG018775; Thu, 27 Feb 2014 16:21:58 GMT (envelope-from emaste) Message-Id: <201402271621.s1RGLwIG018775@freefall.freebsd.org> Date: Thu, 27 Feb 2014 16:21:58 GMT From: Ed Maste To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: bin/187114: rtld does not expand $ORIGIN unless DF_ORIGIN flag is set X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Ed Maste List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Feb 2014 16:30:02 -0000 >Number: 187114 >Category: bin >Synopsis: rtld does not expand $ORIGIN unless DF_ORIGIN flag is set >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 27 16:30:01 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Ed Maste >Release: FreeBSD 11.0-CURRENT amd64 >Organization: FreeBSD >Environment: System: FreeBSD freefall.freebsd.org 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r259961: Fri Dec 27 21:56:39 UTC 2013 peter@freefall.freebsd.org:/usr/obj/usr/src/sys/FREEFALL amd64 >Description: rtld-elf requires the DF_ORIGIN flag to be set, in order to substitute $ORIGIN in rpath. This is not required by Linux's runtime linker, and apparently not by any other system. Based on old SCO documentation of the DF_ORIGIN flag it appears the purpose of the flag is to force early resolution of $ORIGIN for the case of an executable that does not use $ORIGIN in rpath, but later expects to dlopen() a library that does. http://www.sco.com/developers/gabi/2003-12-17/ch5.dynamic.html The GNU ld documentation describes "-z origin" as "Marks the object may contain $ORIGIN," which is not particularly helpful. The GNU gold linker though hints at the interpretation above: "Mark DSO to indicate that needs immediate $ORIGIN processing at runtime." >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: