Subject: lib/9031: ld.elf_so parsing is broken
To: None <gnats-bugs@gnats.netbsd.org>
From: None <scotte@warped.com>
List: netbsd-bugs
Date: 12/19/1999 17:30:48
>Number:         9031
>Category:       lib
>Synopsis:       ld.so.conf requires a space at the end of the sysctl line, and the full sysctl path
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 19 17:30:01 1999
>Last-Modified:
>Originator:     Scott Ellis
>Organization:
   //////////////////////////////////////////////////////////////////////
  //    Scott Ellis     //             scotte@warped.com              //
 //////////////////////////////////////////////////////////////////////
// WARNING: This signature warps  time and space in its vicinity    //
>Release:        <NetBSD-current source date> Dec 18, 1999
>Environment:
	
System: NetBSD intrepid.warped.com 1.4P NetBSD 1.4P (INTREPID) #0: Sun Dec 19 12:01:25 PST 1999 scotte@intrepid.warped.com:/software/netbsd_src/src/sys/arch/i386/compile/INTREPID i386


>Description:
	

After the ld.so.conf and ld.elf_so changes to support conditional loading of
libraries based on sysctl, there are two types of lossage exhibited.

First, the manpage example does NOT show the full sysctl path.  Specifically,
it should say machdep.fpu_present, rather than just fpu_present.  W/o the
machdep" part, ld.elf_so complains that the sysctl is missing/not-found.

Secondly, there needs to be a trailing space in the ld.so.conf line for it
to properly parse.

"libm.so.0       machdep.fpu_present     1:libm387.so.0,libm.so.0" 

yields a "missing sysctl line" error, whereas

"libm.so.0       machdep.fpu_present     1:libm387.so.0,libm.so.0 "

works fine.
>How-To-Repeat:
	

Include partial sysctl path in ls.so.conf, and watch the errors be reported!

Also, don't include whitespace at the end of the line, and enjoy the messages.
>Fix:
	
>Audit-Trail:
>Unformatted: