Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jul 2017 18:28:51 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 221032] Absolute pathnames not working with libmap.conf
Message-ID:  <bug-221032-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221032

            Bug ID: 221032
           Summary: Absolute pathnames not working with libmap.conf
           Product: Base System
           Version: 11.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Keywords: feature, patch
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: tatu.kilappa@iki.fi

Created attachment 184747
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D184747&action=
=3Dedit
Patch to enable absolute pathname as target in libmap.conf

It seems it's not possible to replace entries in libmap configuration with
absolute pathnames and have them work.

For example, consider installing Nvidia driver from package or ports, it wi=
ll
create the following libmap directive:

libGL.so        libGL-NVIDIA.so
libGL.so.1      libGL-NVIDIA.so.1

While investigating other things, I found out that replacing the target sha=
red
object with the following:

libGL.so        /usr/local/lib/libGL-NVIDIA.so.1

Creates an error:

Shared object "/usr/local/lib/libGL-NVIDIA.so.1" not found, required by
"<binary>"

The problem lies in rtld.c line 1519 and onward, that checks for absolute p=
ath
before going to lm_find. This means, that if libmap.conf contains a mapping
with an absolute pathname, it will try to search that name from the library
search paths, which will obviously not work.

I've attached a patch that fixes the issue at least for me.

If current behavior is intended, or if this should be handled elsewhere, pl=
ease
disregard this bug report.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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