getsectdatafromheader man page on OPENSTEP

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


GETSECTBYNAME(3)					      GETSECTBYNAME(3)

NAME
       getsectbyname,  getsectdata - get the section information for the named
       section

SYNOPSIS
       #include <ldsyms.h>
       #include <sys/loader.h>

       const struct section *getsectbynamefromheader(struct mach_header *mhp, char *segname, char *sectname)
       const struct section *getsectbyname(char *segname, char *sectname);
       void *getsectdatafromheader(struct mach_header *mhp, char *segname, char *sectname, int *size)
       void *getsectdata(char *segname, char *sectname, int *size);
       void *getsectdatafromlib(char *libname, char *segname, char *sectname, int *size)

DESCRIPTION
       Getsectbynamefromheader returns the section  structure  for  the	 named
       section	in  the named segment if it exists in the Mach-O (Mach object)
       executable for the specified Mach header getsectbynamefromheader(3)  is
       linked into.  Otherwise it returns NULL.	 The Mach header can either be
       the link editor defined symbol _mh_execute_header or the header address
       of a Mach fixed virtual memory shared library.  This routine just looks
       through the load commands that follow the header to find the  specified
       section.	  Since	 the headers are mapped into the text segment they are
       read only and thus const.

       Getsectbyname is the same as  getsectbynamefromheader  with  its	 first
       argument being the link editor defined symbol _mh_execute_header.

       Getsectdatafromheader  returns  a  pointer  to  the  data for the named
       section in the named segment if it exists in the Mach-O executable  for
       the  specified Mach header it is linked into.  Also it returns the size
       of the section data indirectly through the pointer size.	 Otherwise  it
       returns NULL for the pointer and zero for the size.

       Getsectdata  is	the  same  as  getsectdatafromheader  with  its	 first
       argument being the link editor defined symbol _mh_execute_header.

       Getsectdatafromlib is the same as getsectdatafromheader with its	 first
       argument being the name of a shared library (for example: ``libNeXT_s''
       for /usr/shlib/libNeXT_s.A.shlib) to get the  section  data  from.   If
       that  shared  library isn't used in the executable then it returns NULL
       for the pointer and zero for the size.

SEE ALSO
       end(3), getsegbyname(3), getmachheaders(3)

NeXT Computer, Inc.		 March 1, 1989		      GETSECTBYNAME(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OPENSTEP

List of man pages available for OPENSTEP

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