Annotation of GNUtools/cctools/include/mach-o/ldsyms.h, revision 1.1.1.1

1.1       root        1: 
                      2: #ifndef _MACHO_LDSYMS_H_
                      3: #define _MACHO_LDSYMS_H_
                      4: 
                      5: #import <mach-o/loader.h>
                      6: 
                      7: /*
                      8:  * This file describes the link editor defined symbols.  The semantics of a
                      9:  * link editor symbol is that it is defined by the link editor only if it is
                     10:  * referenced and it is an error for the user to define them (see the man page
                     11:  * ld(1)).  The standard UNIX link editor symbols: __end, __etext and __edata
                     12:  * are not not supported by the NeXT Mach-O link editor.  These symbols are
                     13:  * really not meaningful in a Mach-O object file and the link editor symbols
                     14:  * that are supported (described here) replace them.  In the case of the
                     15:  * standard UNIX link editor symbols the program can use the symbol
                     16:  * __mh_execute_header and walk the load commands of it's program to determine
                     17:  * the ending (or beginning) of any section or segment in the program.  Note
                     18:  * that the compiler prepends an underbar to all external symbol names coded
                     19:  * in a high level language.  Thus in 'C' names are coded without an underbar
                     20:  * and symbol names in the symbol table have an underbar.  There are two cpp
                     21:  * macros for each link editor defined name in this file.  The macro with a
                     22:  * leading underbar is the symbol name and the one without is the name as
                     23:  * coded in 'C'.
                     24:  */
                     25: 
                     26: /*
                     27:  * The value of the link editor defined symbol _MH_EXECUTE_SYM is the address
                     28:  * of the mach header in a Mach-O executable file type.  It does not appear in
                     29:  * any file type other than a MH_EXECUTE file type.  The type of the symbol is
                     30:  * absolute as the header is not part of any section.
                     31:  */
                     32: #define _MH_EXECUTE_SYM        "__mh_execute_header"
                     33: #define MH_EXECUTE_SYM "_mh_execute_header"
                     34: extern const struct mach_header _mh_execute_header;
                     35: 
                     36: /*
                     37:  * The value of the link editor defined symbol _MH_BUNDLE_SYM is the address
                     38:  * of the mach header in a Mach-O bundle file type.  It does not appear in
                     39:  * any file type other than a MH_BUNDLE file type.  The type of the symbol is
                     40:  * an N_SECT symbol even thought the header is not part of any section.  This
                     41:  * symbol is private to the code in the bundle it is a part of.
                     42:  */
                     43: #define _MH_BUNDLE_SYM "__mh_bundle_header"
                     44: #define MH_BUNDLE_SYM  "_mh_bundle_header"
                     45: extern const struct mach_header _mh_bundle_header;
                     46: 
                     47: /*
                     48:  * The value of the link editor defined symbol _MH_DYLIB_SYM is the address
                     49:  * of the mach header in a Mach-O dylib file type.  It does not appear in
                     50:  * any file type other than a MH_DYLIB file type.  The type of the symbol is
                     51:  * an N_SECT symbol even thought the header is not part of any section.  This
                     52:  * symbol is private to the code in the library it is a part of.
                     53:  */
                     54: #define _MH_DYLIB_SYM  "__mh_dylib_header"
                     55: #define MH_DYLIB_SYM   "_mh_dylib_header"
                     56: extern const struct mach_header _mh_dylib_header;
                     57: 
                     58: /*
                     59:  * The value of the link editor defined symbol _MH_DYLINKER_SYM is the address
                     60:  * of the mach header in a Mach-O dylinker file type.  It does not appear in
                     61:  * any file type other than a MH_DYLINKER file type.  The type of the symbol is
                     62:  * an N_SECT symbol even thought the header is not part of any section.  This
                     63:  * symbol is private to the code in the dynamic linker it is a part of.
                     64:  */
                     65: #define _MH_DYLINKER_SYM       "__mh_dylinker_header"
                     66: #define MH_DYLINKER_SYM                "_mh_dylinker_header"
                     67: extern const struct mach_header _mh_dylinker_header;
                     68: 
                     69: /*
                     70:  * For the MH_PRELOAD file type the headers are not loaded as part of any
                     71:  * segment so the link editor defines symbols defined for the beginning
                     72:  * and ending of each segment and each section in each segment.  The names for
                     73:  * the symbols for a segment's beginning and end will have the form:
                     74:  * __SEGNAME__begin and  __SEGNAME__end where __SEGNAME is the name of the
                     75:  * segment.  The names for the symbols for a section's beginning and end will
                     76:  * have the form: __SEGNAME__sectname__begin and __SEGNAME__sectname__end
                     77:  * where __sectname is the name of the section and __SEGNAME is the segment it
                     78:  * is in.
                     79:  * 
                     80:  * The above symbols' types are those of the section they are referring to.
                     81:  * This is true even for symbols who's values are end's of a section and
                     82:  * that value is next address after that section and not really in that
                     83:  * section.  This results in these symbols having types referring to sections
                     84:  * who's values are not in that section.
                     85:  */
                     86: 
                     87: #endif /* _MACHO_LDSYMS_H_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.