st_obj_calls man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]

st_obj_calls(3)						       st_obj_calls(3)

NAME
       st_is_obj_call_shared,	    st_is_obj_shared,	   st_is_obj_stripped,
       st_obj_bss_size, st_obj_bss_start, st_obj_data_size, st_obj_data_start,
       st_obj_libnames,	    st_obj_mem_addr,	 st_obj_name,	  st_obj_path,
       st_obj_rpath, st_obj_soname, st_obj_text_size, st_obj_text_start - gen‐
       eral calls for accessing information about an object file

SYNOPSIS
       #include <st.h>

       st_status_t st_is_obj_call_shared(
	       st_obj_t *obj,
	       st_bool_t *cs ); st_status_t st_is_obj_shared(
	       st_obj_t *obj,
	       st_bool_t *shared ); st_status_t st_is_obj_stripped(
	       st_obj_t *obj,
	       st_bool_t *stripped ); st_status_t st_obj_bss_size(
	       st_obj_t *obj,
	       unsigned long *bsize ); st_status_t st_obj_bss_start(
	       st_obj_t *obj,
	       st_addr_t *bss ); st_status_t st_obj_data_size(
	       st_obj_t *obj,
	       unsigned long *dsize ); st_status_t st_obj_data_start(
	       st_obj_t *obj,
	       st_addr_t *data ); st_status_t st_obj_libnames(
	       st_obj_t *obj,
	       [char **list],
	       int *count ); st_status_t st_obj_mem_addr(
	       st_obj_t *obj,
	       st_addr_t file_addr,
	       st_addr_t *mem_addr ); st_status_t st_obj_name(
	       st_obj_t *obj,
	       char *name ); st_status_t st_obj_path(
	       st_obj_t *obj,
	       char **path ); st_status_t st_obj_rpath(
	       st_obj_t *obj,
	       char **rpath ); st_status_t st_obj_soname(
	       st_obj_t *obj,
	       char **soname ); st_status_t st_obj_text_size(
	       st_obj_t *obj,
	       unsigned long *tsize ); st_status_t st_obj_text_start(
	       st_obj_t *obj,
	       st_addr_t *text );

LIBRARY
       Symbol Table and Object File Access Library (libst.a)

PARAMETERS
       Specifies  an object handle, as returned by the st_obj_open() function.
       Specifies the address to which st_is_obj_call_shared() returns a	 Bool‐
       ean value of TRUE if the specified object is call-shared or FALSE if it
       is a nonshared or shared	 library.   Specifies  the  address  to	 which
       st_is_obj_shared()  returns  a  Boolean	value of TRUE if the specified
       object is a shared library (that is, a file with an suffix) or FALSE if
       it  is  a  call-shared  or  nonshared object.  Specifies the address to
       which st_is_obj_stripped() returns a Boolean value of TRUE if the  sym‐
       bol  table  has been stripped from the specified object.	 Specifies the
       address to which st_obj_name() returns a pointer to the null-terminated
       string  of  the object name specified in a prior st_obj_open() call for
       the specified object.  Specifies the  address  to  which	 st_obj_path()
       returns	a  pointer to the null-terminated string of the directory por‐
       tion of an object pathname for the  specified  object.	Specifies  the
       address	to  which st_obj_soname() returns a pointer to the null-termi‐
       nated string of the internal object name of a  shared  library  object.
       Specifies  the address to which st_obj_rpath() returns a pointer to the
       null-terminated string of the internal library search  directories  for
       the specified object.  Specifies the address to which st_obj_libnames()
       returns a pointer to an array of null-terminated strings of the	shared
       library	dependencies  for  the	specified shared library or executable
       object.	Specifies the address to which st_obj_libnames()  returns  the
       number  of entries in the array returned in the list parameter.	Speci‐
       fies the address to  which  st_obj_text_start()	returns	 the  starting
       address	of the object's text segment as it would reside in memory when
       the  object   is	  executing.	Specifies   the	  address   to	 which
       st_obj_text_size() returns the size of the specified object's text seg‐
       ment.  Specifies the address to which st_obj_data_start()  returns  the
       starting	 address  of  the  specified object's data segment as it would
       reside in memory when the object is executing.  Specifies  the  address
       to  which st_obj_data_size() returns the size of the specified object's
       data  segment.	Specifies  the	address	 to  which  st_obj_bss_start()
       returns	the  starting address of the specified object's bss segment as
       it would reside in memory when the object is executing.	Specifies  the
       address	to  which  st_obj_bss_size()  returns  size  of	 the specified
       object's bss segment.  Specifies an address  in	the  specified	object
       file.   st_obj_mem_addr()  translates  this  address  to the equivalent
       address in memory to which libst has  read  the	file.	Specifies  the
       address	to  which  st_obj_mem_addr() writes the address to which libst
       has read the file indicated by file_addr.

DESCRIPTION
       These routines return information about an  object:  Determine  whether
       the  specified object is a call-shared object, a nonshared object, or a
       shared library.	Determines whether the symbol table has been  stripped
       from the specified object.  Returns the null-terminated string that was
       specified as the object's name in a prior call to st_obj_open() for the
       specified  object.   Returns  the  null-terminated  string  that is the
       directory portion of the	 specified  object's  pathname.	  Returns  the
       null-terminated	string that is the specified object's soname or a null
       pointer if the object is not a shared library. The soname is the inter‐
       nal  name  of  a	 shared library that is used by the system linker (see
       ld(1)) and loader (see loader(5)) to identify  that  library.   Returns
       the  null-terminated  string  that is the specified object's rpath or a
       null pointer if the object does not contain an  rpath  definition.  The
       rpath  string  is  a  colon-separated  list of library search directory
       names. These directories are used by  the  loader  (see	loader(5))  to
       locate  shared  library	dependencies.  Returns an array of null-termi‐
       nated strings that are the  names  of  the  specified  object's	shared
       library dependencies. If the object has no shared library dependencies,
       this function returns a null pointer and a count	 of  0.	  Returns  the
       starting	 address  of  the  specified object's text segment as it would
       reside in memory	 when  the  object  is	executing.  You	 can  use  the
       st_obj_mem_addr()  function  to	translate  text addresses for the exe‐
       cutable to the address in memory to which libst has loaded  a  copy  of
       the  file.   Returns  the  size of the specified object's text segment.
       Returns the size of the specified object's data segment.	  Returns  the
       starting	 address  of  the  specified object's data segment as it would
       reside in memory	 when  the  object  is	executing.  You	 can  use  the
       st_obj_mem_addr()  function  to	translate  data addresses for the exe‐
       cutable to the address in memory to which libst has loaded  a  copy  of
       the  file.   Returns the starting address of the specified object's bss
       segment as it would reside in memory  when  the	object	is  executing.
       Because	no  space  is allocated in the on-disk object file for the bss
       segment,	 you  cannot  translate	 the  bss  segment   addresses	 using
       st_obj_mem_addr()  as  you  can	use the function to translate text and
       data addresses.	Returns the size that the specified object's bss  seg‐
       ment  would  have  in the executing object.  Translates an address from
       the specified object file to the equivalent address in memory to	 which
       libst  has  read the file. You can then access the text and initialized
       data segments of a program. You cannot access the bss segments and heap
       because the object is not executing.

RETURN VALUES
       All functions indicate success by returning a value of 0 (zero). A pos‐
       itive return value is an errno value from a  system  call.  A  negative
       return  value  is  a  library  error or informational code. The library
       codes are documented in st.h.

       Return parameters are set to 0 or -1  when  an  error  occurs.  Address
       parameters are set to 0 while file and procedure handles are set to -1.
       An exception to this is if a NULL  pointer  for	the  object  or	 other
       return  parameter  is input. In these cases, the return parameters will
       be unchanged.  A nonzero return status is the  recommended  method  for
       detecting an error return from a libst function.

FILES
       Header  file  that contains all definitions and function prototypes for
       libst.a functions

SEE ALSO
       Commands: atom(1), ld(1), loader(5)

       Functions:   libst_intro(3),    st_addr_to_file(3),    st_file_lang(3),
       st_obj_file_start(3),	   st_obj_open(3),	 st_objlist_append(3),
       st_proc_addr(3), st_sym_value(3) st_dyn_start(3)

       Programmer's Guide

							       st_obj_calls(3)
[top]

List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net