


     dlopen(DYNL.os/libdRelease	5.1.4 (UniSoft Ltdlopen(DYNL.os/libdl)



     NAME
	  DYNL.os/libdl/dlopen - Gain access to	an executable object
	  file

     DESCRIPTION
	  Dlopen tests the dlopen(), subroutine	interface for
	  compliance to	the System Interfaces and Headers, Issue 5
	  Volume 1 Page: dlopen()

     TESTS
     Compliance
	  1    When pathname is	a pathname containing one or more
	       slash character which refers to an executable object,
	       then a call to dlopen() makes the executable object
	       file available to the running process and returns a
	       handle that can be used to refer	to the loaded
	       executable object.

	  2    If dependency objects are supported:
		    When the dynamic section of	the file referenced by
		    pathname contains a	DT_NEEDED entry	which refers
		    to an executable object which is not currently
		    loaded, then dlopen() locates the executable
		    object using the dependency	search rules and loads
		    the	executable object into the program.

	  3    When an executable object name in either	pathname or in
	       a dependency object contains one	or more	slash
	       characters, then	a call to dlopen() uses	that string as
	       a path name to locate the executable object.

	  4    When the	pathname argument is set to zero, then the
	       handle returned from a call to dlopen() can be used by
	       dlsym() to obtain the address of	symbols	contained in
	       the original program image, symbols that	are contained
	       in objects that were loaded at program startup with the
	       original	program	image and symbols contained in objects
	       that were loaded	with the RTLD_GLOBAL mode.

	  5    If dependency objects are supported:
		    When the file referenced by	pathname contains a
		    dependency entry which refers to an	executable
		    object which is currently loaded, then dlopen()
		    does not load a second copy	of the executable
		    object but makes use of the	currently loaded copy
		    of the executable object.

	  6    If dependency objects are supported:
		    When a dlopen() object contains a dependency entry
		    which refers to an executable object not currently
		    loaded, then dlopen() locates the executable
		    object using the dependency	search rules specified



     Page 1					    (printed 2/21/103)






     dlopen(DYNL.os/libdRelease	5.1.4 (UniSoft Ltdlopen(DYNL.os/libdl)



		    in the executable and dynamically links in the
		    executable object.

	  7    If dependency objects are supported:
		    When a dependency object contains a	dependency
		    entry which	refers to an executable	object which
		    has	already	been loaded, then dlopen() ignores
		    this entry.

	  8    When a call to dlopen() refers to an executable object
	       which has already been loaded, then dlopen() does not
	       load a second copy of the executable object but makes
	       use of the currently loaded copy	of the executable
	       object, even if different pathnames were	used.

	  9    When the	mode parameter is set to RTLD_LAZY, then a
	       call to dlopen()	performs relocations at	some time
	       between the call	to dlopen() and	the point at which
	       they are	called.

	  10   When the	mode parameter is set to RTLD_NOW, then	a call
	       to dlopen() performs relocations	at the time at which
	       the object is first loaded.

	  11   When the	RTLD_GLOBAL flag is set	in the mode argument,
	       then the	exported symbols associated with executable
	       objects loaded during this call to dlopen() are
	       available to all	other objects opened as	a result of
	       later call to dlopen().

	  12   When symbols introduced by calls	to dlopen() are
	       resolved, then the first	occurrence of the object found
	       is used.	 The search order for the object is:
		   First, the executable image itself.
		   Second, the executable image's list of needed
		   objects in the resolution order.
		   Third, the list of objects loaded from previous
		   calls to dlopen() with the RTLD_GLOBAL flag set in
		   the mode argument.

	  13   When the	mode argument has the RTLD_LOCAL flag set on a
	       call to dlopen(), then the exported symbols associated
	       with the	executable objects loaded as a result of this
	       call are	only available to other	objects	loaded as a
	       result of this call.

	  14   If dependency objects are supported:
		    When the executable	object referenced by pathname
		    contains a dependency entry	which causes further
		    executable objects to be referenced	and the
		    executable object referenced by pathname contains
		    a reference	to a symbol not	contained in that



     Page 2					    (printed 2/21/103)






     dlopen(DYNL.os/libdRelease	5.1.4 (UniSoft Ltdlopen(DYNL.os/libdl)



		    executable object but contained in a referenced
		    executable object, then a call to dlopen()
		    searches each of the referenced executable objects
		    in load order and resolves the symbol to the first
		    occurrence of found	during this search.

     Deviance
	  15   When pathname is	not NULL and refers to a non-existent
	       entity, then a call to dlopen() returns NULL and	a
	       subsequent call to dlerror() returns a string detailing
	       the error.

	  16   When pathname refers to a file which cannot be opened
	       for reading, then a call	to dlopen() returns NULL and a
	       subsequent call to dlerror() returns a string detailing
	       the error.

	  17   When pathname refers to a file which is not a valid
	       executable object, then a call to dlopen() returns NULL
	       and a subsequent	call to	dlerror() returns a string
	       detailing the error.

	  18   When the	mode is	RTLD_NOW and an	error occurs during
	       the process of loading pathname because a reference
	       cannot be resolved, then	a call to dlopen() returns
	       NULL and	a subsequent call to dlerror() returns a
	       string detailing	the error.

     OUTPUTS
     Tests:
	  1    Pass/Fail indication - failure information includes the
	       expected	and detected return value.

	  2    Pass/Fail/Unsupported indication	only.

	  3-4  Pass/Fail indication - failure information includes the
	       expected	and detected executable	object location.

	  5-7  Pass/Fail/Unsupported indication	only.

	  8-10 Pass/Fail indication only.

	  11-13
	       Pass/Fail indication - failure information includes the
	       expected	and detected executable	object location.

	  14   Pass/Fail indication only.

	  15-18
	       Pass/Fail indication - failure information includes the
	       expected	and detected return values.




     Page 3					    (printed 2/21/103)






     dlopen(DYNL.os/libdRelease	5.1.4 (UniSoft Ltdlopen(DYNL.os/libdl)



     RELEASE
	  5.1.4	(11/19/97)





















































     Page 4					    (printed 2/21/103)



