home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / NeXT / GnuSource / cc-61.0.1 / include / gnu / a.out.h next >
C/C++ Source or Header  |  1991-10-18  |  1KB  |  50 lines

  1. /*
  2.  * Copyright (c) 1980 Regents of the University of California.
  3.  * All rights reserved.  The Berkeley software License Agreement
  4.  * specifies the terms and conditions for redistribution.
  5.  *
  6.  *    @(#)a.out.h    5.1 (Berkeley) 5/30/85
  7.  */
  8.  
  9. /*
  10.  * Definitions of the a.out header
  11.  * and magic numbers are shared with
  12.  * the kernel.
  13.  */
  14. #include <gnu/exec.h>
  15.  
  16. /*
  17.  * Macros which take exec structures as arguments and tell whether
  18.  * the file has a reasonable magic number or offsets to text|symbols|strings.
  19.  */
  20. #define    N_BADMAG(x) \
  21.     (((x).a_magic)!=OMAGIC && ((x).a_magic)!=NMAGIC && ((x).a_magic)!=ZMAGIC)
  22.  
  23. #define    N_TXTOFF(x) \
  24.     ((x).a_magic==ZMAGIC ? 0 : sizeof (struct exec))
  25. #define N_SYMOFF(x) \
  26.     (N_TXTOFF(x) + (x).a_text+(x).a_data + (x).a_trsize+(x).a_drsize)
  27. #define    N_STROFF(x) \
  28.     (N_SYMOFF(x) + (x).a_syms)
  29.  
  30. #include "mach-o/reloc.h"
  31. #ifdef M88K
  32. #include "mach-o/m88k/reloc.h"
  33. #endif
  34. #ifdef I860
  35. #include "mach-o/i860/reloc.h"
  36. #endif
  37.  
  38. #include "mach-o/nlist.h"
  39. /* Things in other UNIX systems not in the NeXT version of nlist.h */
  40. #define    n_hash    n_desc        /* used internally by ld */
  41. #define    N_TEXT    0x4        /* text */
  42. #define    N_DATA    0x6        /* data */
  43. #define    N_BSS    0x8        /* bss */
  44. #define    N_COMM    0x12        /* common (internal to ld) */
  45. #define    N_FN    0x1f        /* file name symbol */
  46. /*
  47.  * Format for namelist values.
  48.  */
  49. #define    N_FORMAT    "%08x"
  50.