home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Source / GNU / cctools / include / gnu / a.out.h next >
C/C++ Source or Header  |  1993-10-20  |  1KB  |  56 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 M98K
  35. #include "mach-o/m98k/reloc.h"
  36. #endif
  37. #ifdef I860
  38. #include "mach-o/i860/reloc.h"
  39. #endif
  40. #ifdef HPPA
  41. #include "mach-o/hppa/reloc.h"
  42. #endif
  43.  
  44. #include "mach-o/nlist.h"
  45. /* Things in other UNIX systems not in the NeXT version of nlist.h */
  46. #define    n_hash    n_desc        /* used internally by ld */
  47. #define    N_TEXT    0x4        /* text */
  48. #define    N_DATA    0x6        /* data */
  49. #define    N_BSS    0x8        /* bss */
  50. #define    N_COMM    0x12        /* common (internal to ld) */
  51. #define    N_FN    0x1f        /* file name symbol */
  52. /*
  53.  * Format for namelist values.
  54.  */
  55. #define    N_FORMAT    "%08x"
  56.