home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 4 / hacker04 / 04_HACK04.ISO / darwin / darwinx86.iso / usr / include / mach-o / ranlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-09-14  |  2.9 KB  |  63 lines

  1. /*
  2.  * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
  3.  *
  4.  * @APPLE_LICENSE_HEADER_START@
  5.  * 
  6.  * Portions Copyright (c) 1999 Apple Computer, Inc.  All Rights
  7.  * Reserved.  This file contains Original Code and/or Modifications of
  8.  * Original Code as defined in and that are subject to the Apple Public
  9.  * Source License Version 1.1 (the "License").  You may not use this file
  10.  * except in compliance with the License.  Please obtain a copy of the
  11.  * License at http://www.apple.com/publicsource and read it before using
  12.  * this file.
  13.  * 
  14.  * The Original Code and all software distributed under the License are
  15.  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
  16.  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
  17.  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
  18.  * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT.  Please see the
  19.  * License for the specific language governing rights and limitations
  20.  * under the License.
  21.  * 
  22.  * @APPLE_LICENSE_HEADER_END@
  23.  */
  24. /*    ranlib.h    4.1    83/05/03    */
  25.  
  26. #include <sys/types.h>        /* off_t */
  27.  
  28. /*
  29.  * There are two known orders of table of contents for archives.  The first is
  30.  * the order ranlib(1) originally produced and still produces without any
  31.  * options.  This table of contents has the archive member name "__.SYMDEF"
  32.  * This order has the ranlib structures in the order the objects appear in the
  33.  * archive and the symbol names of those objects in the order of symbol table.
  34.  * The second know order is sorted by symbol name and is produced with the -s
  35.  * option to ranlib(1).  This table of contents has the archive member name
  36.  * "__.SYMDEF SORTED" and many programs (notably the 1.0 version of ld(1) can't
  37.  * tell the difference between names because of the imbedded blank in the name
  38.  * and works with either table of contents).  This second order is used by the
  39.  * post 1.0 link editor to produce faster linking.  The original 1.0 version of
  40.  * ranlib(1) gets confused when it is run on a archive with the second type of
  41.  * table of contents because it and ar(1) which it uses use different ways to
  42.  * determined the member name (ar(1) treats all blanks in the name as
  43.  * significant and ranlib(1) only checks for the first one).
  44.  */
  45. #define SYMDEF        "__.SYMDEF"
  46. #define SYMDEF_SORTED    "__.SYMDEF SORTED"
  47.  
  48. /*
  49.  * Structure of the __.SYMDEF table of contents for an archive.
  50.  * __.SYMDEF begins with a long giving the size in bytes of the ranlib
  51.  * structures which immediately follow, and then continues with a string
  52.  * table consisting of a long giving the number of bytes of strings which
  53.  * follow and then the strings themselves.  The ran_strx fields index the
  54.  * string table whose first byte is numbered 0.
  55.  */
  56. struct    ranlib {
  57.     union {
  58.     unsigned long    ran_strx;    /* string table index of */
  59.     char        *ran_name;    /* symbol defined by */
  60.     } ran_un;
  61.     unsigned long    ran_off;    /* library member at this offset */
  62. };
  63.