home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / gdb-4.12.tar.gz / gdb-4.12.tar / gdb-4.12 / include / aout / sun4.h < prev   
Text File  |  1994-02-03  |  1KB  |  35 lines

  1. /* SPARC-specific values for a.out files */
  2.  
  3. #define PAGE_SIZE    0x2000        /* 8K.  aka NBPG in <sys/param.h> */
  4. /* Note that some SPARCs have 4K pages, some 8K, some others.  */
  5.  
  6. #define SEG_SIZE_SPARC    PAGE_SIZE
  7. #define    SEG_SIZE_SUN3    0x20000        /* Resolution of r/w protection hw */
  8.  
  9. #define TEXT_START_ADDR    PAGE_SIZE    /* Location 0 is not accessible */
  10. #define N_HEADER_IN_TEXT(x) 1
  11.  
  12. /* Non-default definitions of the accessor macros... */
  13.  
  14. /* Segment size varies on Sun-3 versus Sun-4.  */
  15.  
  16. #define N_SEGSIZE(x)    (N_MACHTYPE(x) == M_SPARC?    SEG_SIZE_SPARC:    \
  17.              N_MACHTYPE(x) == M_68020?    SEG_SIZE_SUN3:    \
  18.             /* Guess? */            PAGE_SIZE)
  19.  
  20. /* Virtual Address of text segment from the a.out file.  For OMAGIC,
  21.    (almost always "unlinked .o's" these days), should be zero.
  22.    Sun added a kludge so that shared libraries linked ZMAGIC get
  23.    an address of zero if a_entry (!!!) is lower than the otherwise
  24.    expected text address.  These kludges have gotta go!
  25.    For linked files, should reflect reality if we know it.  */
  26.  
  27. /* This differs from the version in aout64.h (which we override by defining
  28.    it here) only for NMAGIC (we return TEXT_START_ADDR+EXEC_BYTES_SIZE;
  29.    they return 0).  */
  30.  
  31. #define N_TXTADDR(x) \
  32.     (N_MAGIC(x)==OMAGIC? 0 \
  33.      : (N_MAGIC(x) == ZMAGIC && (x).a_entry < TEXT_START_ADDR)? 0 \
  34.      : TEXT_START_ADDR+EXEC_BYTES_SIZE)
  35.