*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: st_obj_open | Section: 3 | Source: Digital UNIX | File: st_obj_open.3.gz
st_obj_open(3) Library Functions Manual st_obj_open(3) NAME st_obj_open, st_obj_close, st_object_type - Open or close an object or query its type LIBRARY Symbol Table and Object File Access Library (libst.a) SYNOPSIS #include <st.h> st_status_t st_obj_open ( st_obj_t **obj, const char *name, unsigned int flags ); st_status_t st_obj_close ( st_obj_t *obj ); st_status_t st_object_type ( const char *name, st_object_type_t *otype ); PARAMETERS Specifies an address to which st_obj_open returns an object handle if it successfully opens the file specified in the name parameter. For st_obj_close, specifies an object handle, as returned by the st_obj_open function. Specifies the file name of the object to be opened or closed, or for which an object type is requested. Specifies how the object is to be opened. The open flags defined in /usr/in- clude/st.h include the following: Opens the file for read-only access. This is the default. Disables name demangling for C++ names. By de- fault, C++ name demangling is enabled when a file is opened. Specifies an address to which st_object_type returns a value identifying the ob- ject type. The following object types are defined in usr/include/st.h: Unknown object type Archive library OMAGIC file NMAGIC file ZMAGIC file DESCRIPTION The st_obj_open function opens the named object file for read access. It maps the file in memory using mmap, if possible. If mmap fails, it dynamically allocates memory in which to read the file. The flags pa- rameter indicates how the file is to be opened. If it succeeds in opening the file, it returns an opaque handle for the object to the obj parameter. You can use this object handle as an input argument in sub- sequent calls to other object file access routines. The st_obj_close function releases memory dynamically allocated for processing the object and unmaps memory to which the file was mapped when it was opened. The st_object_type function returns the object type of the specified filename object to the otype parameter. st_object_type does not create an object handle, nor does it open the object. RETURN VALUES All functions indicate success by returning a value of 0 (zero). A positive 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 pa- rameters are set to 0, and file and procedure handles are set to -1. An exception to this is if a NULL pointer for the object or other re- turn parameter is input. In these cases, the return parameters will be unchanged. A non-zero return status is the recommended method for de- tecting an error return from a libst function. FILES Header file that contains all definitions and function prototypes for libst.a functions Header file that controls name-demangling operations for C++ objects RELATED INFORMATION Commands: atom(1) Functions: mmap(2), libst_intro(3), st_addr_to_file(3), st_file_lang(3), st_obj_file_start(3), st_objlist_append(3), st_proc_addr(3), st_sym_value(3) delim off st_obj_open(3)

Navigation Options