Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Feb 2014 16:21:58 GMT
From:      Ed Maste <emaste@freebsd.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/187114: rtld does not expand $ORIGIN unless DF_ORIGIN flag is set
Message-ID:  <201402271621.s1RGLwIG018775@freefall.freebsd.org>
Resent-Message-ID: <201402271630.s1RGU1DW020338@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402271621.s1RGLwIG018775>