]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Invoke aout N_* macros with pointer to struct internal_exec
authorAlan Modra <amodra@gmail.com>
Tue, 1 Dec 2015 01:10:52 +0000 (11:40 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 1 Dec 2015 03:10:05 +0000 (13:40 +1030)
No functional changes here.

BTW, some of these headers don't seem to be used anywhere:
include/aout/dynix3.h, include/aout/encap.h, include/aout/hp.h,
gas/config/aout_gnu.h

bfd/
* aout-adobe.c: Invoke aout N_* macros with pointer to
struct internal_exec.
* aout-arm.c: Likewise.
* aout-cris.c: Likewise.
* aout-target.h: Likewise.
* aout-tic30.c: Likewise.
* aoutf1.h: Likewise.
* aoutx.h: Likewise.
* bout.c: Likewise.
* freebsd.h: Likewise.
* gen-aout.c: Likewise.
* hp300hpux.c: Likewise.
* i386aout.c: Likewise.
* i386linux.c: Likewise.
* i386lynx.c: Likewise.
* i386mach3.c: Likewise.
* i386os9k.c: Likewise.
* libaout.h: Likewise.
* m68klinux.c: Likewise.
* m88kmach3.c: Likewise.
* mipsbsd.c: Likewise.
* netbsd.h: Likewise.
* pc532-mach.c: Likewise.
* pdp11.c: Likewise.
* riscix.c: Likewise.
* sparclinux.c: Likewise.
* sparclynx.c: Likewise.
gas/
* config/aout_gnu.h: Invoke aout N_* macros with pointer to
struct internal_exec.
include/
* bout.h: Invoke aout N_* macros with pointer to
struct internal_exec.
* os9k.h: Likewise.
include/aout/
* adobe.h: Invoke aout N_* macros with pointer to
struct internal_exec.
* aout64.h: Likewise.
* dynix3.h: Likewise.
* encap.h: Likewise.
* hp.h: Likewise.
* hp300hpux.h: Likewise.
* sun4.h: Likewise.

40 files changed:
bfd/ChangeLog
bfd/aout-adobe.c
bfd/aout-arm.c
bfd/aout-cris.c
bfd/aout-target.h
bfd/aout-tic30.c
bfd/aoutf1.h
bfd/aoutx.h
bfd/bout.c
bfd/freebsd.h
bfd/gen-aout.c
bfd/hp300hpux.c
bfd/i386aout.c
bfd/i386linux.c
bfd/i386lynx.c
bfd/i386mach3.c
bfd/i386os9k.c
bfd/libaout.h
bfd/m68klinux.c
bfd/m88kmach3.c
bfd/mipsbsd.c
bfd/netbsd.h
bfd/pc532-mach.c
bfd/pdp11.c
bfd/riscix.c
bfd/sparclinux.c
bfd/sparclynx.c
gas/ChangeLog
gas/config/aout_gnu.h
include/ChangeLog
include/aout/ChangeLog
include/aout/adobe.h
include/aout/aout64.h
include/aout/dynix3.h
include/aout/encap.h
include/aout/hp.h
include/aout/hp300hpux.h
include/aout/sun4.h
include/bout.h
include/os9k.h

index eb5cf11441934ed9f1ef90377cdda39f30412962..0fbdd64d6d2fb2559ed068036bc0b7730c9ce286 100644 (file)
@@ -1,3 +1,33 @@
+2015-12-01  Alan Modra  <amodra@gmail.com>
+
+       * aout-adobe.c: Invoke aout N_* macros with pointer to
+       struct internal_exec.
+       * aout-arm.c: Likewise.
+       * aout-cris.c: Likewise.
+       * aout-target.h: Likewise.
+       * aout-tic30.c: Likewise.
+       * aoutf1.h: Likewise.
+       * aoutx.h: Likewise.
+       * bout.c: Likewise.
+       * freebsd.h: Likewise.
+       * gen-aout.c: Likewise.
+       * hp300hpux.c: Likewise.
+       * i386aout.c: Likewise.
+       * i386linux.c: Likewise.
+       * i386lynx.c: Likewise.
+       * i386mach3.c: Likewise.
+       * i386os9k.c: Likewise.
+       * libaout.h: Likewise.
+       * m68klinux.c: Likewise.
+       * m88kmach3.c: Likewise.
+       * mipsbsd.c: Likewise.
+       * netbsd.h: Likewise.
+       * pc532-mach.c: Likewise.
+       * pdp11.c: Likewise.
+       * riscix.c: Likewise.
+       * sparclinux.c: Likewise.
+       * sparclynx.c: Likewise.
+
 2015-12-01  Alan Modra  <amodra@gmail.com>
 
        * coff-rs6000.c (_bfd_xcoff_put_symbol_name): Replace abfd param
index 7e781d4d74ba867074ca377b21ea60e6e02b5fc9..3e64c1a4a026234122fcd563b04b8681e3ff8199 100644 (file)
@@ -86,8 +86,8 @@ aout_adobe_callback (bfd *abfd)
   bfd_set_arch_mach (abfd, bfd_arch_unknown, 0L);
 
   /* The positions of the string table and symbol table.  */
-  obj_str_filepos (abfd) = N_STROFF (*execp);
-  obj_sym_filepos (abfd) = N_SYMOFF (*execp);
+  obj_str_filepos (abfd) = N_STROFF (execp);
+  obj_sym_filepos (abfd) = N_SYMOFF (execp);
 
   /* Suck up the section information from the file, one section at a time.  */
   for (;;)
@@ -166,12 +166,12 @@ aout_adobe_callback (bfd *abfd)
        switch (ext->e_type[0])
          {
          case N_TEXT:
-           sect->rel_filepos = N_TRELOFF (*execp);
+           sect->rel_filepos = N_TRELOFF (execp);
            sect->reloc_count = execp->a_trsize;
            break;
 
          case N_DATA:
-           sect->rel_filepos = N_DRELOFF (*execp);
+           sect->rel_filepos = N_DRELOFF (execp);
            sect->reloc_count = execp->a_drsize;
            break;
 
@@ -213,7 +213,7 @@ aout_adobe_object_p (bfd *abfd)
      If the environment variable GNUTARGET is set to "a.out.adobe", we will
      take just about any a.out file as an Adobe a.out file.  FIXME!  */
 
-  if (N_BADMAG (anexec))
+  if (N_BADMAG (&anexec))
     {
       targ = getenv ("GNUTARGET");
       if (targ && !strcmp (targ, aout_adobe_vec.name))
@@ -333,14 +333,14 @@ aout_adobe_write_object_contents (bfd *abfd)
   /* Now write out reloc info, followed by syms and strings.  */
   if (bfd_get_symcount (abfd) != 0)
     {
-      if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (*exec_hdr (abfd))), SEEK_SET)
+      if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (exec_hdr (abfd))), SEEK_SET)
          != 0)
        return FALSE;
 
       if (! aout_32_write_syms (abfd))
        return FALSE;
 
-      if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*exec_hdr (abfd))), SEEK_SET)
+      if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (exec_hdr (abfd))), SEEK_SET)
          != 0)
        return FALSE;
 
@@ -349,7 +349,7 @@ aout_adobe_write_object_contents (bfd *abfd)
          if (!aout_32_squirt_out_relocs (abfd, sect))
            return FALSE;
 
-      if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*exec_hdr (abfd))), SEEK_SET)
+      if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (exec_hdr (abfd))), SEEK_SET)
          != 0)
        return FALSE;
 
@@ -377,7 +377,7 @@ aout_adobe_set_section_contents (bfd *abfd,
     {
       /* Assign file offsets to sections.  Text sections are first, and
         are contiguous.  Then data sections.  Everything else at the end.  */
-      section_start = N_TXTOFF (ignore<-->me);
+      section_start = N_TXTOFF (0);
 
       for (sect = abfd->sections; sect; sect = sect->next)
        {
index 9e5bb8fe8abdf25d402827511fa83c3b53886d64..a1c13fea9d696d4fa52335a0a04a35b15f8a2ace 100644 (file)
@@ -34,7 +34,7 @@
    : ((N_MAGIC (x) != ZMAGIC)                                  \
       ? (bfd_vma) 0                                            \
       : ((N_SHARED_LIB (x))                                    \
-        ? ((x).a_entry & ~(bfd_vma) (TARGET_PAGE_SIZE - 1))    \
+        ? ((x)->a_entry & ~(bfd_vma) (TARGET_PAGE_SIZE - 1))   \
         : (bfd_vma) TEXT_START_ADDR)))
 
 #define TEXT_START_ADDR 0x8000
 #define DEFAULT_ARCH bfd_arch_arm
 
 #define MY(OP) CONCAT2 (arm_aout_,OP)
-#define N_BADMAG(x) ((((x).a_info & ~007200) != ZMAGIC) && \
-                     (((x).a_info & ~006000) != OMAGIC) && \
-                     ((x).a_info != NMAGIC))
-#define N_MAGIC(x) ((x).a_info & ~07200)
+#define N_BADMAG(x) ((((x)->a_info & ~007200) != ZMAGIC) && \
+                     (((x)->a_info & ~006000) != OMAGIC) && \
+                     ((x)->a_info != NMAGIC))
+#define N_MAGIC(x) ((x)->a_info & ~07200)
 
 #define MY_bfd_reloc_type_lookup arm_aout_bfd_reloc_type_lookup
 #define MY_bfd_reloc_name_lookup arm_aout_bfd_reloc_name_lookup
index 166e305c1ab711aed6e32cd89a52a4039e4eb016..5280824e4a125f2329279afe9571d814e9dc3608 100644 (file)
@@ -37,7 +37,7 @@
    after text, but with those, we don't have any choice besides reading
    symbol info, and luckily there's no pressing need for correctness for
    those vma:s at this time.  */
-#define N_TXTADDR(x) ((x).a_entry & ~(bfd_vma) 0xffff)
+#define N_TXTADDR(x) ((x)->a_entry & ~(bfd_vma) 0xffff)
 
 /* If you change this to 4, you can not link to an address N*4+2.  */
 #define SEGMENT_SIZE 2
@@ -93,8 +93,8 @@ static bfd_boolean MY (set_sizes) (bfd *);
    not call set_sizes.  */
 
 #define MY_set_arch_mach NAME (aout, set_arch_mach)
-#define SET_ARCH_MACH(BFD, EXEC) \
- MY_set_arch_mach (BFD, DEFAULT_ARCH, N_MACHTYPE (EXEC))
+#define SET_ARCH_MACH(BFD, EXECP) \
+ MY_set_arch_mach (BFD, DEFAULT_ARCH, N_MACHTYPE (EXECP))
 
 /* These macros describe the binary layout of the reloc information we
    use in a file.  */
@@ -129,9 +129,9 @@ MY (write_object_contents) (bfd *abfd)
   /* Setting N_SET_MACHTYPE and using N_SET_FLAGS is not performed by
      the default definition.  */
   if (bfd_get_arch (abfd) == bfd_arch_cris)
-    N_SET_MACHTYPE (*execp, M_CRIS);
+    N_SET_MACHTYPE (execp, M_CRIS);
 
-  N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags);
+  N_SET_FLAGS (execp, aout_backend_info (abfd)->exec_hdr_flags);
 
   WRITE_HEADERS (abfd, execp);
 
index 0c97a4af58df5461613201141418c8c57909e6f2..a0e1494adde2cbcb1e15c94a443024100a72db03 100644 (file)
@@ -42,12 +42,12 @@ MY (callback) (bfd *abfd)
   unsigned long arch_align;
 
   /* Calculate the file positions of the parts of a newly read aout header.  */
-  obj_textsec (abfd)->size = N_TXTSIZE (*execp);
+  obj_textsec (abfd)->size = N_TXTSIZE (execp);
 
   /* The virtual memory addresses of the sections.  */
-  obj_textsec (abfd)->vma = N_TXTADDR (*execp);
-  obj_datasec (abfd)->vma = N_DATADDR (*execp);
-  obj_bsssec  (abfd)->vma = N_BSSADDR (*execp);
+  obj_textsec (abfd)->vma = N_TXTADDR (execp);
+  obj_datasec (abfd)->vma = N_DATADDR (execp);
+  obj_bsssec  (abfd)->vma = N_BSSADDR (execp);
 
   /* For some targets, if the entry point is not in the same page
      as the start of the text, then adjust the VMA so that it is.
@@ -71,20 +71,20 @@ MY (callback) (bfd *abfd)
   obj_bsssec (abfd)->lma = obj_bsssec (abfd)->vma;
 
   /* The file offsets of the sections.  */
-  obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
-  obj_datasec (abfd)->filepos = N_DATOFF (*execp);
+  obj_textsec (abfd)->filepos = N_TXTOFF (execp);
+  obj_datasec (abfd)->filepos = N_DATOFF (execp);
 
   /* The file offsets of the relocation info.  */
-  obj_textsec (abfd)->rel_filepos = N_TRELOFF (*execp);
-  obj_datasec (abfd)->rel_filepos = N_DRELOFF (*execp);
+  obj_textsec (abfd)->rel_filepos = N_TRELOFF (execp);
+  obj_datasec (abfd)->rel_filepos = N_DRELOFF (execp);
 
   /* The file offsets of the string table and symbol table.  */
-  obj_sym_filepos (abfd) = N_SYMOFF (*execp);
-  obj_str_filepos (abfd) = N_STROFF (*execp);
+  obj_sym_filepos (abfd) = N_SYMOFF (execp);
+  obj_str_filepos (abfd) = N_STROFF (execp);
 
   /* Determine the architecture and machine type of the object file.  */
 #ifdef SET_ARCH_MACH
-  SET_ARCH_MACH (abfd, *execp);
+  SET_ARCH_MACH (abfd, execp);
 #else
   bfd_default_set_arch_mach (abfd, DEFAULT_ARCH, 0);
 #endif
@@ -149,11 +149,11 @@ MY (object_p) (bfd *abfd)
   exec.a_info = GET_MAGIC (abfd, exec_bytes.e_info);
 #endif
 
-  if (N_BADMAG (exec))
+  if (N_BADMAG (&exec))
     return 0;
 
 #ifdef MACHTYPE_OK
-  if (!(MACHTYPE_OK (N_MACHTYPE (exec))))
+  if (!(MACHTYPE_OK (N_MACHTYPE (&exec))))
     return 0;
 #endif
 
@@ -332,9 +332,9 @@ MY_final_link_callback (bfd *abfd,
 {
   struct internal_exec *execp = exec_hdr (abfd);
 
-  *ptreloff = N_TRELOFF (*execp);
-  *pdreloff = N_DRELOFF (*execp);
-  *psymoff = N_SYMOFF (*execp);
+  *ptreloff = N_TRELOFF (execp);
+  *pdreloff = N_DRELOFF (execp);
+  *psymoff = N_SYMOFF (execp);
 }
 
 #endif
index 7fcdf6240bb4e6c5b20e836189e1334feec67a32..6852c85556a4a070fed0b772a25a8d9ecdc9e031 100644 (file)
@@ -339,32 +339,32 @@ tic30_aout_callback (bfd *abfd)
   unsigned long arch_align;
 
   /* Calculate the file positions of the parts of a newly read aout header.  */
-  obj_textsec (abfd)->size = N_TXTSIZE (*execp);
+  obj_textsec (abfd)->size = N_TXTSIZE (execp);
 
   /* The virtual memory addresses of the sections.  */
-  obj_textsec (abfd)->vma = N_TXTADDR (*execp);
-  obj_datasec (abfd)->vma = N_DATADDR (*execp);
-  obj_bsssec (abfd)->vma = N_BSSADDR (*execp);
+  obj_textsec (abfd)->vma = N_TXTADDR (execp);
+  obj_datasec (abfd)->vma = N_DATADDR (execp);
+  obj_bsssec (abfd)->vma = N_BSSADDR (execp);
 
   obj_textsec (abfd)->lma = obj_textsec (abfd)->vma;
   obj_datasec (abfd)->lma = obj_datasec (abfd)->vma;
   obj_bsssec (abfd)->lma = obj_bsssec (abfd)->vma;
 
   /* The file offsets of the sections.  */
-  obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
-  obj_datasec (abfd)->filepos = N_DATOFF (*execp);
+  obj_textsec (abfd)->filepos = N_TXTOFF (execp);
+  obj_datasec (abfd)->filepos = N_DATOFF (execp);
 
   /* The file offsets of the relocation info.  */
-  obj_textsec (abfd)->rel_filepos = N_TRELOFF (*execp);
-  obj_datasec (abfd)->rel_filepos = N_DRELOFF (*execp);
+  obj_textsec (abfd)->rel_filepos = N_TRELOFF (execp);
+  obj_datasec (abfd)->rel_filepos = N_DRELOFF (execp);
 
   /* The file offsets of the string table and symbol table.  */
-  obj_sym_filepos (abfd) = N_SYMOFF (*execp);
-  obj_str_filepos (abfd) = N_STROFF (*execp);
+  obj_sym_filepos (abfd) = N_SYMOFF (execp);
+  obj_str_filepos (abfd) = N_STROFF (execp);
 
   /* Determine the architecture and machine type of the object file.  */
 #ifdef SET_ARCH_MACH
-  SET_ARCH_MACH (abfd, *execp);
+  SET_ARCH_MACH (abfd, execp);
 #else
   bfd_default_set_arch_mach (abfd, DEFAULT_ARCH, 0L);
 #endif
@@ -568,10 +568,10 @@ tic30_aout_object_p (bfd *abfd)
   exec.a_info = H_GET_32 (abfd, exec_bytes.e_info);
 #endif /* SWAP_MAGIC */
 
-  if (N_BADMAG (exec))
+  if (N_BADMAG (&exec))
     return 0;
 #ifdef MACHTYPE_OK
-  if (!(MACHTYPE_OK (N_MACHTYPE (exec))))
+  if (!(MACHTYPE_OK (N_MACHTYPE (&exec))))
     return 0;
 #endif
 
@@ -664,19 +664,19 @@ tic30_aout_write_object_contents (bfd *abfd)
     if (bfd_get_outsymbols (abfd) != (asymbol **) NULL
        && bfd_get_symcount (abfd) != 0)
       {
-       if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (*execp)), SEEK_SET) != 0)
+       if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (execp)), SEEK_SET) != 0)
          return FALSE;
 
        if (!NAME (aout, write_syms) (abfd))
          return FALSE;
       }
 
-    if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*execp)), SEEK_SET) != 0)
+    if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (execp)), SEEK_SET) != 0)
       return FALSE;
     if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd)))
       return FALSE;
 
-    if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp)), SEEK_SET) != 0)
+    if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (execp)), SEEK_SET) != 0)
       return FALSE;
     if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd)))
       return FALSE;
index 7f4883545bee1e58a4455a5bf2ae0043163c28e6..97e122b8e8ccb014fec20b6bd272369ca1d8fc3c 100644 (file)
@@ -155,8 +155,8 @@ sunos_set_arch_mach (bfd *abfd, enum machine_type machtype)
   bfd_set_arch_mach (abfd, arch, machine);
 }
 
-#define SET_ARCH_MACH(ABFD, EXEC) \
-  NAME(sunos,set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \
+#define SET_ARCH_MACH(ABFD, EXECP) \
+  NAME(sunos,set_arch_mach) (ABFD, N_MACHTYPE (EXECP)); \
   choose_reloc_size(ABFD);
 
 /* Determine the size of a relocation entry, based on the architecture.  */
@@ -194,14 +194,14 @@ sunos_write_object_contents (bfd *abfd)
       switch (bfd_get_mach (abfd))
        {
        case bfd_mach_m68000:
-         N_SET_MACHTYPE (*execp, M_UNKNOWN);
+         N_SET_MACHTYPE (execp, M_UNKNOWN);
          break;
        case bfd_mach_m68010:
-         N_SET_MACHTYPE (*execp, M_68010);
+         N_SET_MACHTYPE (execp, M_68010);
          break;
        default:
        case bfd_mach_m68020:
-         N_SET_MACHTYPE (*execp, M_68020);
+         N_SET_MACHTYPE (execp, M_68020);
          break;
        }
       break;
@@ -209,28 +209,28 @@ sunos_write_object_contents (bfd *abfd)
       switch (bfd_get_mach (abfd))
        {
        case bfd_mach_sparc_sparclet:
-         N_SET_MACHTYPE (*execp, M_SPARCLET);
+         N_SET_MACHTYPE (execp, M_SPARCLET);
          break;
        case bfd_mach_sparc_sparclite_le:
-         N_SET_MACHTYPE (*execp, M_SPARCLITE_LE);
+         N_SET_MACHTYPE (execp, M_SPARCLITE_LE);
          break;
        default:
-         N_SET_MACHTYPE (*execp, M_SPARC);
+         N_SET_MACHTYPE (execp, M_SPARC);
          break;
        }
       break;
     case bfd_arch_i386:
-      N_SET_MACHTYPE (*execp, M_386);
+      N_SET_MACHTYPE (execp, M_386);
       break;
     default:
-      N_SET_MACHTYPE (*execp, M_UNKNOWN);
+      N_SET_MACHTYPE (execp, M_UNKNOWN);
     }
 
   choose_reloc_size (abfd);
 
-  N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags);
+  N_SET_FLAGS (execp, aout_backend_info (abfd)->exec_hdr_flags);
 
-  N_SET_DYNAMIC (*execp, (long)(bfd_get_file_flags (abfd) & DYNAMIC));
+  N_SET_DYNAMIC (execp, (long)(bfd_get_file_flags (abfd) & DYNAMIC));
 
   WRITE_HEADERS (abfd, execp);
 
@@ -397,7 +397,7 @@ swapcore_sun3 (bfd *abfd, char *ext, struct internal_sunos_core *intcore)
   intcore->c_signo = H_GET_32 (abfd, &extcore->c_signo);
   intcore->c_tsize = H_GET_32 (abfd, &extcore->c_tsize);
   intcore->c_dsize = H_GET_32 (abfd, &extcore->c_dsize);
-  intcore->c_data_addr = N_DATADDR (intcore->c_aouthdr);
+  intcore->c_data_addr = N_DATADDR (&intcore->c_aouthdr);
   intcore->c_ssize = H_GET_32 (abfd, &extcore->c_ssize);
   memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
   intcore->fp_stuff_pos = offsetof (struct external_sun3_core, fp_stuff);
@@ -432,7 +432,7 @@ swapcore_sparc (bfd *abfd, char *ext, struct internal_sunos_core *intcore)
   intcore->c_signo = H_GET_32 (abfd, &extcore->c_signo);
   intcore->c_tsize = H_GET_32 (abfd, &extcore->c_tsize);
   intcore->c_dsize = H_GET_32 (abfd, &extcore->c_dsize);
-  intcore->c_data_addr = N_DATADDR (intcore->c_aouthdr);
+  intcore->c_data_addr = N_DATADDR (&intcore->c_aouthdr);
   intcore->c_ssize = H_GET_32 (abfd, &extcore->c_ssize);
   memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
   intcore->fp_stuff_pos = offsetof (struct external_sparc_core, fp_stuff);
index f78b9106a627bf9bd4e5788a5015e07c861a489f..cca386af7879044aee5723b7429af0af23bd7f93 100644 (file)
@@ -488,27 +488,27 @@ NAME (aout, some_aout_object_p) (bfd *abfd,
   /* Setting of EXEC_P has been deferred to the bottom of this function.  */
   if (execp->a_syms)
     abfd->flags |= HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS;
-  if (N_DYNAMIC (*execp))
+  if (N_DYNAMIC (execp))
     abfd->flags |= DYNAMIC;
 
-  if (N_MAGIC (*execp) == ZMAGIC)
+  if (N_MAGIC (execp) == ZMAGIC)
     {
       abfd->flags |= D_PAGED | WP_TEXT;
       adata (abfd).magic = z_magic;
     }
-  else if (N_MAGIC (*execp) == QMAGIC)
+  else if (N_MAGIC (execp) == QMAGIC)
     {
       abfd->flags |= D_PAGED | WP_TEXT;
       adata (abfd).magic = z_magic;
       adata (abfd).subformat = q_magic_format;
     }
-  else if (N_MAGIC (*execp) == NMAGIC)
+  else if (N_MAGIC (execp) == NMAGIC)
     {
       abfd->flags |= WP_TEXT;
       adata (abfd).magic = n_magic;
     }
-  else if (N_MAGIC (*execp) == OMAGIC
-          || N_MAGIC (*execp) == BMAGIC)
+  else if (N_MAGIC (execp) == OMAGIC
+          || N_MAGIC (execp) == BMAGIC)
     adata (abfd).magic = o_magic;
   else
     /* Should have been checked with N_BADMAG before this routine
@@ -563,28 +563,28 @@ NAME (aout, some_aout_object_p) (bfd *abfd,
 
   struct exec *execp = exec_hdr (abfd);
 
-  obj_textsec (abfd)->size = N_TXTSIZE (*execp);
+  obj_textsec (abfd)->size = N_TXTSIZE (execp);
   /* Data and bss are already filled in since they're so standard.  */
 
   /* The virtual memory addresses of the sections.  */
-  obj_textsec (abfd)->vma = N_TXTADDR (*execp);
-  obj_datasec (abfd)->vma = N_DATADDR (*execp);
-  obj_bsssec  (abfd)->vma = N_BSSADDR (*execp);
+  obj_textsec (abfd)->vma = N_TXTADDR (execp);
+  obj_datasec (abfd)->vma = N_DATADDR (execp);
+  obj_bsssec  (abfd)->vma = N_BSSADDR (execp);
 
   /* The file offsets of the sections.  */
-  obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
-  obj_datasec (abfd)->filepos = N_DATOFF (*execp);
+  obj_textsec (abfd)->filepos = N_TXTOFF (execp);
+  obj_datasec (abfd)->filepos = N_DATOFF (execp);
 
   /* The file offsets of the relocation info.  */
-  obj_textsec (abfd)->rel_filepos = N_TRELOFF (*execp);
-  obj_datasec (abfd)->rel_filepos = N_DRELOFF (*execp);
+  obj_textsec (abfd)->rel_filepos = N_TRELOFF (execp);
+  obj_datasec (abfd)->rel_filepos = N_DRELOFF (execp);
 
   /* The file offsets of the string table and symbol table.  */
-  obj_str_filepos (abfd) = N_STROFF (*execp);
-  obj_sym_filepos (abfd) = N_SYMOFF (*execp);
+  obj_str_filepos (abfd) = N_STROFF (execp);
+  obj_sym_filepos (abfd) = N_SYMOFF (execp);
 
   /* Determine the architecture and machine type of the object file.  */
-  switch (N_MACHTYPE (*exec_hdr (abfd)))
+  switch (N_MACHTYPE (exec_hdr (abfd)))
     {
     default:
       abfd->obj_arch = bfd_arch_obscure;
@@ -949,7 +949,7 @@ adjust_o_magic (bfd *abfd, struct internal_exec *execp)
   execp->a_text = obj_textsec (abfd)->size;
   execp->a_data = obj_datasec (abfd)->size;
   execp->a_bss = obj_bsssec (abfd)->size;
-  N_SET_MAGIC (*execp, OMAGIC);
+  N_SET_MAGIC (execp, OMAGIC);
 }
 
 static void
@@ -1038,9 +1038,9 @@ adjust_z_magic (bfd *abfd, struct internal_exec *execp)
   if (ztih && (!abdp || (abdp && !abdp->exec_header_not_counted)))
     execp->a_text += adata (abfd).exec_bytes_size;
   if (obj_aout_subformat (abfd) == q_magic_format)
-    N_SET_MAGIC (*execp, QMAGIC);
+    N_SET_MAGIC (execp, QMAGIC);
   else
-    N_SET_MAGIC (*execp, ZMAGIC);
+    N_SET_MAGIC (execp, ZMAGIC);
 
   /* Spec says data section should be rounded up to page boundary.  */
   obj_datasec (abfd)->size
@@ -1107,7 +1107,7 @@ adjust_n_magic (bfd *abfd, struct internal_exec *execp)
   execp->a_text = obj_textsec (abfd)->size;
   execp->a_data = obj_datasec (abfd)->size;
   execp->a_bss = obj_bsssec (abfd)->size;
-  N_SET_MAGIC (*execp, NMAGIC);
+  N_SET_MAGIC (execp, NMAGIC);
 }
 
 bfd_boolean
index d6f188bfa98a1f81b33b505ce3e02cc11a3b1854..54c4db17fe4c6878d28347543d34bb15d1130899 100644 (file)
@@ -137,8 +137,8 @@ b_out_callback (bfd *abfd)
                     );
 
   /* The positions of the string table and symbol table.  */
-  obj_str_filepos (abfd) = N_STROFF (*execp);
-  obj_sym_filepos (abfd) = N_SYMOFF (*execp);
+  obj_str_filepos (abfd) = N_STROFF (execp);
+  obj_sym_filepos (abfd) = N_SYMOFF (execp);
 
   /* The alignments of the sections.  */
   obj_textsec (abfd)->alignment_power = execp->a_talign;
@@ -161,12 +161,12 @@ b_out_callback (bfd *abfd)
   obj_bsssec (abfd)->lma = obj_bsssec (abfd)->vma;
 
   /* The file positions of the sections.  */
-  obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
-  obj_datasec (abfd)->filepos = N_DATOFF (*execp);
+  obj_textsec (abfd)->filepos = N_TXTOFF (execp);
+  obj_datasec (abfd)->filepos = N_DATOFF (execp);
 
   /* The file positions of the relocation info.  */
-  obj_textsec (abfd)->rel_filepos = N_TROFF (*execp);
-  obj_datasec (abfd)->rel_filepos =  N_DROFF (*execp);
+  obj_textsec (abfd)->rel_filepos = N_TROFF (execp);
+  obj_datasec (abfd)->rel_filepos =  N_DROFF (execp);
 
   adata (abfd).page_size = 1;  /* Not applicable.  */
   adata (abfd).segment_size = 1; /* Not applicable.  */
@@ -193,7 +193,7 @@ b_out_object_p (bfd *abfd)
 
   anexec.a_info = H_GET_32 (abfd, exec_bytes.e_info);
 
-  if (N_BADMAG (anexec))
+  if (N_BADMAG (&anexec))
     {
       bfd_set_error (bfd_error_wrong_format);
       return 0;
@@ -450,20 +450,20 @@ b_out_write_object_contents (bfd *abfd)
               b_out_symbol_cmp);
 
       /* Back to your regularly scheduled program.  */
-      if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (*exec_hdr (abfd))), SEEK_SET)
+      if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (exec_hdr (abfd))), SEEK_SET)
          != 0)
        return FALSE;
 
       if (! aout_32_write_syms (abfd))
        return FALSE;
 
-      if (bfd_seek (abfd, (file_ptr) (N_TROFF (*exec_hdr (abfd))), SEEK_SET)
+      if (bfd_seek (abfd, (file_ptr) (N_TROFF (exec_hdr (abfd))), SEEK_SET)
          != 0)
        return FALSE;
 
       if (!b_out_squirt_out_relocs (abfd, obj_textsec (abfd)))
        return FALSE;
-      if (bfd_seek (abfd, (file_ptr) (N_DROFF (*exec_hdr (abfd))), SEEK_SET)
+      if (bfd_seek (abfd, (file_ptr) (N_DROFF (exec_hdr (abfd))), SEEK_SET)
          != 0)
        return FALSE;
 
index 62d968202b2eba0250e0940ecee43b7ba3c7d1e1..4a180b19a8c96534129a466bbeaa03e87bd2adf2 100644 (file)
 /* ZMAGIC files start at offset 0.  Does not apply to QMAGIC files. */
 #define TEXT_START_ADDR                0
 
-#define N_GETMAGIC_NET(exec) \
-       ((exec).a_info & 0xffff)
-#define N_GETMID_NET(exec) \
-       (((exec).a_info >> 16) & 0x3ff)
-#define N_GETFLAG_NET(ex) \
-       (((exec).a_info >> 26) & 0x3f)
-
-#define N_MACHTYPE(exec) \
+#define N_GETMAGIC_NET(execp) \
+       ((execp)->a_info & 0xffff)
+#define N_GETMID_NET(execp) \
+       (((execp)->a_info >> 16) & 0x3ff)
+#define N_GETFLAG_NET(exexp) \
+       (((execp)->a_info >> 26) & 0x3f)
+
+#define N_MACHTYPE(execp) \
        ((enum machine_type) \
-        ((N_GETMAGIC_NET (exec) == ZMAGIC) ? N_GETMID_NET (exec) : \
-         ((exec).a_info >> 16) & 0x3ff))
-#define N_FLAGS(exec) \
-       ((N_GETMAGIC_NET (exec) == ZMAGIC) ? N_GETFLAG_NET (exec) : \
-        ((exec).a_info >> 26) & 0x3f)
-
-#define N_SET_INFO(exec, magic, type, flags) \
-       ((exec).a_info = ((magic) & 0xffff) \
+        ((N_GETMAGIC_NET (execp) == ZMAGIC) ? N_GETMID_NET (execp) : \
+         ((execp)->a_info >> 16) & 0x3ff))
+#define N_FLAGS(execp) \
+       ((N_GETMAGIC_NET (execp) == ZMAGIC) ? N_GETFLAG_NET (execp) : \
+        ((execp)->a_info >> 26) & 0x3f)
+
+#define N_SET_INFO(execp, magic, type, flags) \
+       ((execp)->a_info = ((magic) & 0xffff) \
         | (((int)(type) & 0x3ff) << 16) \
         | (((flags) & 0x3f) << 26))
-#define N_SET_MACHTYPE(exec, machtype) \
-       ((exec).a_info = \
-         ((exec).a_info & 0xfb00ffff) | ((((int) (machtype)) & 0x3ff) << 16))
-#define N_SET_FLAGS(exec, flags) \
-       ((exec).a_info = \
-        ((exec).a_info & 0x03ffffff) | ((flags & 0x03f) << 26))
+#define N_SET_MACHTYPE(execp, machtype) \
+       ((execp)->a_info = \
+         ((execp)->a_info & 0xfb00ffff) | ((((int) (machtype)) & 0x3ff) << 16))
+#define N_SET_FLAGS(execp, flags) \
+       ((execp)->a_info = \
+        ((execp)->a_info & 0x03ffffff) | ((flags & 0x03f) << 26))
 
 #include "sysdep.h"
 #include "bfd.h"
@@ -82,25 +82,25 @@ MY (write_object_contents) (bfd *abfd)
     {
     case bfd_arch_m68k:
       if (strcmp (abfd->xvec->name, "a.out-m68k4k-netbsd") == 0)
-       N_SET_MACHTYPE (*execp, M_68K4K_NETBSD);
+       N_SET_MACHTYPE (execp, M_68K4K_NETBSD);
       else
-       N_SET_MACHTYPE (*execp, M_68K_NETBSD);
+       N_SET_MACHTYPE (execp, M_68K_NETBSD);
       break;
     case bfd_arch_sparc:
-      N_SET_MACHTYPE (*execp, M_SPARC_NETBSD);
+      N_SET_MACHTYPE (execp, M_SPARC_NETBSD);
       break;
     case bfd_arch_i386:
-      N_SET_MACHTYPE (*execp, M_386_NETBSD);
+      N_SET_MACHTYPE (execp, M_386_NETBSD);
       break;
     case bfd_arch_ns32k:
-      N_SET_MACHTYPE (*execp, M_532_NETBSD);
+      N_SET_MACHTYPE (execp, M_532_NETBSD);
       break;
     default:
-      N_SET_MACHTYPE (*execp, M_UNKNOWN);
+      N_SET_MACHTYPE (execp, M_UNKNOWN);
       break;
     }
 
-  WRITE_HEADERS(abfd, execp);
+  WRITE_HEADERS (abfd, execp);
 
   return TRUE;
 }
index f7f0edd7845559596da0dfc7b96c329eeb2c0fd0..44c8479ec409fbb7305716e72fc451c3f3895c26 100644 (file)
@@ -57,7 +57,7 @@ main (int argc, char** argv)
   fclose (file);
 
 #ifdef N_TXTOFF
-  page_size = N_TXTOFF(my_exec);
+  page_size = N_TXTOFF (&my_exec);
   if (page_size == 0)
     printf ("#define N_HEADER_IN_TEXT(x) 1\n");
   else
index 8bb58c96e55e520acca807b7ff87b160eb79d8cf..564cdc2807308196e83686a4d40e32ffc19dc3b9 100644 (file)
@@ -224,32 +224,32 @@ MY (callback) (bfd *abfd)
   struct internal_exec *execp = exec_hdr (abfd);
 
   /* Calculate the file positions of the parts of a newly read aout header */
-  obj_textsec (abfd)->size = N_TXTSIZE (*execp);
+  obj_textsec (abfd)->size = N_TXTSIZE (execp);
 
   /* The virtual memory addresses of the sections */
-  obj_textsec (abfd)->vma = N_TXTADDR (*execp);
-  obj_datasec (abfd)->vma = N_DATADDR (*execp);
-  obj_bsssec (abfd)->vma = N_BSSADDR (*execp);
+  obj_textsec (abfd)->vma = N_TXTADDR (execp);
+  obj_datasec (abfd)->vma = N_DATADDR (execp);
+  obj_bsssec (abfd)->vma = N_BSSADDR (execp);
 
   obj_textsec (abfd)->lma = obj_textsec (abfd)->vma;
   obj_datasec (abfd)->lma = obj_datasec (abfd)->vma;
   obj_bsssec (abfd)->lma = obj_bsssec (abfd)->vma;
 
   /* The file offsets of the sections */
-  obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
-  obj_datasec (abfd)->filepos = N_DATOFF (*execp);
+  obj_textsec (abfd)->filepos = N_TXTOFF (execp);
+  obj_datasec (abfd)->filepos = N_DATOFF (execp);
 
   /* The file offsets of the relocation info */
-  obj_textsec (abfd)->rel_filepos = N_TRELOFF (*execp);
-  obj_datasec (abfd)->rel_filepos = N_DRELOFF (*execp);
+  obj_textsec (abfd)->rel_filepos = N_TRELOFF (execp);
+  obj_datasec (abfd)->rel_filepos = N_DRELOFF (execp);
 
   /* The file offsets of the string table and symbol table.  */
-  obj_sym_filepos (abfd) = N_SYMOFF (*execp);
-  obj_str_filepos (abfd) = N_STROFF (*execp);
+  obj_sym_filepos (abfd) = N_SYMOFF (execp);
+  obj_str_filepos (abfd) = N_STROFF (execp);
 
   /* Determine the architecture and machine type of the object file.  */
 #ifdef SET_ARCH_MACH
-  SET_ARCH_MACH (abfd, *execp);
+  SET_ARCH_MACH (abfd, execp);
 #else
   bfd_default_set_arch_mach (abfd, DEFAULT_ARCH, 0);
 #endif
@@ -257,11 +257,11 @@ MY (callback) (bfd *abfd)
   if (obj_aout_subformat (abfd) == gnu_encap_format)
     {
       /* The file offsets of the relocation info */
-      obj_textsec (abfd)->rel_filepos = N_GNU_TRELOFF (*execp);
-      obj_datasec (abfd)->rel_filepos = N_GNU_DRELOFF (*execp);
+      obj_textsec (abfd)->rel_filepos = N_GNU_TRELOFF (execp);
+      obj_datasec (abfd)->rel_filepos = N_GNU_DRELOFF (execp);
 
       /* The file offsets of the string table and symbol table.  */
-      obj_sym_filepos (abfd) = N_GNU_SYMOFF (*execp);
+      obj_sym_filepos (abfd) = N_GNU_SYMOFF (execp);
       obj_str_filepos (abfd) = (obj_sym_filepos (abfd) + execp->a_syms);
 
       abfd->flags |= HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS;
@@ -298,8 +298,8 @@ MY (write_object_contents) (bfd * abfd)
   execp->a_drsize = ((obj_datasec (abfd)->reloc_count) *
                     obj_reloc_entry_size (abfd));
 
-  N_SET_MACHTYPE (*execp, 0xc);
-  N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags);
+  N_SET_MACHTYPE (execp, 0xc);
+  N_SET_FLAGS (execp, aout_backend_info (abfd)->exec_hdr_flags);
 
   NAME (aout,swap_exec_header_out) (abfd, execp, &exec_bytes);
 
@@ -319,7 +319,7 @@ MY (write_object_contents) (bfd * abfd)
   if (bfd_get_symcount (abfd) != 0)
     {
       /* Skip the relocs to where we want to put the symbols.  */
-      if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp) + execp->a_drsize),
+      if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (execp) + execp->a_drsize),
                    SEEK_SET) != 0)
        return FALSE;
     }
@@ -329,11 +329,11 @@ MY (write_object_contents) (bfd * abfd)
 
   if (bfd_get_symcount (abfd) != 0)
     {
-      if (bfd_seek (abfd, (file_ptr) N_TRELOFF (*execp), SEEK_CUR) != 0)
+      if (bfd_seek (abfd, (file_ptr) N_TRELOFF (execp), SEEK_CUR) != 0)
        return FALSE;
       if (!NAME (aout,squirt_out_relocs) (abfd, obj_textsec (abfd)))
        return FALSE;
-      if (bfd_seek (abfd, (file_ptr) N_DRELOFF (*execp), SEEK_CUR) != 0)
+      if (bfd_seek (abfd, (file_ptr) N_DRELOFF (execp), SEEK_CUR) != 0)
        return FALSE;
       if (!NAME (aout,squirt_out_relocs) (abfd, obj_datasec (abfd)))
        return FALSE;
index 59e1ed25f8fe19ec6089b87ccbda608a76f4b388..3f40fb1241e31ce369fe54deae45353d3bed2412 100644 (file)
@@ -28,7 +28,7 @@
 #define N_HEADER_IN_TEXT(x)    0
 #define N_TXTOFF(x)            0x20
 #define N_TXTADDR(x)           (N_MAGIC (x) == ZMAGIC ? 0x1020 : 0)
-#define N_TXTSIZE(x)           ((x).a_text)
+#define N_TXTSIZE(x)           ((x)->a_text)
 #define TARGET_PAGE_SIZE       4096
 #define SEGMENT_SIZE           0x400000
 #define DEFAULT_ARCH           bfd_arch_i386
@@ -54,7 +54,7 @@ i386aout_write_object_contents (bfd *abfd)
   struct external_exec exec_bytes;
   struct internal_exec *execp = exec_hdr (abfd);
 
-  N_SET_MACHTYPE (*execp, M_386);
+  N_SET_MACHTYPE (execp, M_386);
 
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
 
index 2bec98b093e66c2095554044faf6eda3c5aae805..084dfb90d925c39edd73ef6b50649c5cc4a5db18 100644 (file)
@@ -70,11 +70,11 @@ i386linux_write_object_contents (bfd *abfd)
   struct external_exec exec_bytes;
   struct internal_exec *execp = exec_hdr (abfd);
 
-  N_SET_MACHTYPE (*execp, M_386);
+  N_SET_MACHTYPE (execp, M_386);
 
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
 
-  WRITE_HEADERS(abfd, execp);
+  WRITE_HEADERS (abfd, execp);
 
   return TRUE;
 }
index 075d1c0e80432edeb6f835517deaacfe32811823..91cac43c2c7604a0ae61f38eab0a2e3175ada4ae 100644 (file)
                                                                              \
        if (bfd_get_symcount (abfd) != 0)                                     \
            {                                                                 \
-             if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET)    \
+             if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (execp)), SEEK_SET)    \
                  != 0)                                                       \
                return FALSE;                                                 \
                                                                              \
              if (! NAME(aout,write_syms) (abfd)) return FALSE;               \
                                                                              \
-             if (bfd_seek (abfd, (file_ptr) (N_TRELOFF(*execp)), SEEK_SET)   \
+             if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (execp)), SEEK_SET)   \
                  != 0)                                                       \
                return FALSE;                                                 \
                                                                              \
              if (!NAME(lynx,squirt_out_relocs) (abfd, obj_textsec (abfd)))   \
                return FALSE;                                                 \
-             if (bfd_seek (abfd, (file_ptr) (N_DRELOFF(*execp)), SEEK_SET)   \
+             if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (execp)), SEEK_SET)   \
                  != 0)                                                       \
                return 0;                                                     \
                                                                              \
index aa573f454402a321be0bc11c0c5c856bb461c4f8..582a13df7ebfeb221bedd08dda56fc3afbfbe519 100644 (file)
@@ -32,7 +32,7 @@
 /* This macro is only relevant when N_MAGIC(x) == ZMAGIC.  */
 #define N_HEADER_IN_TEXT(x)    1
 
-#define N_TXTSIZE(x)   ((x).a_text)
+#define N_TXTSIZE(x)   ((x)->a_text)
 
 #include "sysdep.h"
 #include "bfd.h"
index 889c2adb22ac52685f177cc6d62a8d7c9bc58766..a0b3384832bb9f99fcb39d92a1068399a5763e1d 100644 (file)
@@ -103,8 +103,8 @@ os9k_callback (bfd *abfd)
   obj_datasec (abfd)->filepos = execp->a_dload;
 
   /* The file positions of the relocation info ***
-  obj_textsec (abfd)->rel_filepos = N_TROFF(*execp);
-  obj_datasec (abfd)->rel_filepos =  N_DROFF(*execp);  */
+  obj_textsec (abfd)->rel_filepos = N_TROFF (execp);
+  obj_datasec (abfd)->rel_filepos =  N_DROFF (execp);  */
 
   adata (abfd).page_size = 1;  /* Not applicable.  */
   adata (abfd).segment_size = 1;/* Not applicable.  */
@@ -128,7 +128,7 @@ os9k_object_p (bfd *abfd)
     }
 
   anexec.a_info = H_GET_16 (abfd, exec_bytes.m_sync);
-  if (N_BADMAG (anexec))
+  if (N_BADMAG (&anexec))
     {
       bfd_set_error (bfd_error_wrong_format);
       return 0;
index f1f6015d0f96d3511e30eaf09e022842e46d246e..9f32cc8d092de7563b63e99a6d7593a17ea62083 100644 (file)
@@ -291,48 +291,48 @@ enum machine_type
   M_CRIS = 255           /* Axis CRIS binary.  */
 };
 
-#define N_DYNAMIC(exec) ((exec).a_info & 0x80000000)
+#define N_DYNAMIC(execp) ((execp)->a_info & 0x80000000)
 
 #ifndef N_MAGIC
-# define N_MAGIC(exec) ((exec).a_info & 0xffff)
+# define N_MAGIC(execp) ((execp)->a_info & 0xffff)
 #endif
 
 #ifndef N_MACHTYPE
-# define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff))
+# define N_MACHTYPE(execp) ((enum machine_type)(((execp)->a_info >> 16) & 0xff))
 #endif
 
 #ifndef N_FLAGS
-# define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff)
+# define N_FLAGS(execp) (((execp)->a_info >> 24) & 0xff)
 #endif
 
 #ifndef N_SET_INFO
-# define N_SET_INFO(exec, magic, type, flags) \
-((exec).a_info = ((magic) & 0xffff) \
+# define N_SET_INFO(execp, magic, type, flags) \
+((execp)->a_info = ((magic) & 0xffff) \
  | (((int)(type) & 0xff) << 16) \
  | (((flags) & 0xff) << 24))
 #endif
 
 #ifndef N_SET_DYNAMIC
-# define N_SET_DYNAMIC(exec, dynamic) \
-((exec).a_info = (dynamic) ? (long) ((exec).a_info | 0x80000000) : \
-((exec).a_info & 0x7fffffff))
+# define N_SET_DYNAMIC(execp, dynamic) \
+((execp)->a_info = (dynamic) ? (long) ((execp)->a_info | 0x80000000) : \
+((execp)->a_info & 0x7fffffff))
 #endif
 
 #ifndef N_SET_MAGIC
-# define N_SET_MAGIC(exec, magic) \
-((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff)))
+# define N_SET_MAGIC(execp, magic) \
+((execp)->a_info = (((execp)->a_info & 0xffff0000) | ((magic) & 0xffff)))
 #endif
 
 #ifndef N_SET_MACHTYPE
-# define N_SET_MACHTYPE(exec, machtype) \
-((exec).a_info = \
- ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16))
+# define N_SET_MACHTYPE(execp, machtype) \
+((execp)->a_info = \
+ ((execp)->a_info & 0xff00ffff) | ((((int) (machtype)) &0xff) << 16))
 #endif
 
 #ifndef N_SET_FLAGS
-# define N_SET_FLAGS(exec, flags) \
-((exec).a_info = \
- ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))
+# define N_SET_FLAGS(execp, flags) \
+((execp)->a_info = \
+ ((execp)->a_info & 0x00ffffff) | (((flags) & 0xff) << 24))
 #endif
 
 typedef struct aout_symbol
@@ -648,19 +648,19 @@ extern bfd_boolean NAME (aout, bfd_free_cached_info)
        if (bfd_get_outsymbols (abfd) != NULL                                 \
            && bfd_get_symcount (abfd) != 0)                                  \
          {                                                                   \
-           if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0)\
+           if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (execp)), SEEK_SET) != 0)\
              return FALSE;                                                   \
                                                                              \
            if (! NAME (aout, write_syms) (abfd))                             \
              return FALSE;                                                   \
          }                                                                   \
                                                                              \
-       if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (*execp)), SEEK_SET) != 0)  \
+       if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (execp)), SEEK_SET) != 0)   \
          return FALSE;                                                       \
        if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd)))       \
          return FALSE;                                                       \
                                                                              \
-       if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (*execp)), SEEK_SET) != 0)  \
+       if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (execp)), SEEK_SET) != 0)   \
          return FALSE;                                                       \
        if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd)))       \
          return FALSE;                                                       \
index a29cf2be508c09c78c767eab6debb7b3ba1e4669..291a58fff7ad7a946c72070e7fa30b0df69fab40 100644 (file)
@@ -69,11 +69,11 @@ m68klinux_write_object_contents (bfd *abfd)
   struct external_exec exec_bytes;
   struct internal_exec *execp = exec_hdr (abfd);
 
-  N_SET_MACHTYPE (*execp, M_68020);
+  N_SET_MACHTYPE (execp, M_68020);
 
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
 
-  WRITE_HEADERS(abfd, execp);
+  WRITE_HEADERS (abfd, execp);
 
   return TRUE;
 }
index 783a9585bc7fbcd9214a3e87835a95c1fdc25aa4..8c351c1b04c6d24ed9848d377f484ec58e730c23 100644 (file)
@@ -23,7 +23,7 @@
 #define TEXT_START_ADDR        0
 #define N_HEADER_IN_TEXT(x)    1               /* (N_MAGIG(x) == ZMAGIC) */
 
-#define N_TXTSIZE(x)   ((x).a_text)
+#define N_TXTSIZE(x)   ((x)->a_text)
 
 #include "sysdep.h"
 #include "bfd.h"
index 5ea89b6ee7d109e031e94c1377caab4ba411cff5..c969095e92db9bf4bc9dabade7c92da5ae858ea5 100644 (file)
@@ -23,7 +23,7 @@
 /* #define ENTRY_CAN_BE_ZERO */
 #define N_HEADER_IN_TEXT(x) 1
 #define N_TXTADDR(x) \
-    (N_MAGIC(x) != ZMAGIC ? (x).a_entry :      /* object file or NMAGIC */\
+    (N_MAGIC(x) != ZMAGIC ? (x)->a_entry :     /* object file or NMAGIC */\
            TEXT_START_ADDR + EXEC_BYTES_SIZE   /* no padding */\
     )
 #define N_DATADDR(x) (N_TXTADDR(x)+N_TXTSIZE(x))
@@ -45,8 +45,8 @@
 #include "libbfd.h"
 #include "libaout.h"
 
-#define SET_ARCH_MACH(ABFD, EXEC) \
-  MY(set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \
+#define SET_ARCH_MACH(ABFD, EXECP) \
+  MY(set_arch_mach) (ABFD, N_MACHTYPE (EXECP)); \
   MY(choose_reloc_size) (ABFD);
 static void MY(set_arch_mach) (bfd *, unsigned long);
 static void MY(choose_reloc_size) (bfd *);
@@ -137,34 +137,34 @@ MY (write_object_contents) (bfd *abfd)
       switch (bfd_get_mach (abfd))
        {
        case bfd_mach_m68010:
-         N_SET_MACHTYPE (*execp, M_68010);
+         N_SET_MACHTYPE (execp, M_68010);
          break;
        default:
        case bfd_mach_m68020:
-         N_SET_MACHTYPE (*execp, M_68020);
+         N_SET_MACHTYPE (execp, M_68020);
          break;
        }
       break;
     case bfd_arch_sparc:
-      N_SET_MACHTYPE (*execp, M_SPARC);
+      N_SET_MACHTYPE (execp, M_SPARC);
       break;
     case bfd_arch_i386:
-      N_SET_MACHTYPE (*execp, M_386);
+      N_SET_MACHTYPE (execp, M_386);
       break;
     case bfd_arch_mips:
       switch (bfd_get_mach (abfd))
        {
        case bfd_mach_mips4000:
        case bfd_mach_mips6000:
-         N_SET_MACHTYPE (*execp, M_MIPS2);
+         N_SET_MACHTYPE (execp, M_MIPS2);
          break;
        default:
-         N_SET_MACHTYPE (*execp, M_MIPS1);
+         N_SET_MACHTYPE (execp, M_MIPS1);
          break;
        }
       break;
     default:
-      N_SET_MACHTYPE (*execp, M_UNKNOWN);
+      N_SET_MACHTYPE (execp, M_UNKNOWN);
     }
 
   MY (choose_reloc_size) (abfd);
index a53b5811d491196e058b5683dd434dae5bd44a97..abd5fe7ba55947d105b46229f5b56ae588cabd23 100644 (file)
 #define N_SHARED_LIB(x)        (N_DYNAMIC (x))
 
 /* We have 6 bits of flags and 10 bits of machine ID.  */
-#define N_MACHTYPE(exec) \
-       ((enum machine_type) (((exec).a_info >> 16) & 0x03ff))
-#define N_FLAGS(exec) \
-       (((exec).a_info >> 26) & 0x3f)
+#define N_MACHTYPE(execp) \
+       ((enum machine_type) (((execp)->a_info >> 16) & 0x03ff))
+#define N_FLAGS(execp) \
+       (((execp)->a_info >> 26) & 0x3f)
 
-#define N_SET_INFO(exec, magic, type, flags) \
-       ((exec).a_info = ((magic) & 0xffff) \
+#define N_SET_INFO(execp, magic, type, flags) \
+       ((execp)->a_info = ((magic) & 0xffff) \
         | (((int) (type) & 0x3ff) << 16) \
         | (((flags) & 0x3f) << 24))
-#define N_SET_MACHTYPE(exec, machtype) \
-       ((exec).a_info = \
-         ((exec).a_info & 0xfb00ffff) | ((((int) (machtype)) & 0x3ff) << 16))
-#define N_SET_FLAGS(exec, flags) \
-       ((exec).a_info = \
-        ((exec).a_info & 0x03ffffff) | ((flags & 0x03f) << 26))
+#define N_SET_MACHTYPE(execp, machtype) \
+       ((execp)->a_info = \
+         ((execp)->a_info & 0xfb00ffff) | ((((int) (machtype)) & 0x3ff) << 16))
+#define N_SET_FLAGS(execp, flags) \
+       ((execp)->a_info = \
+        ((execp)->a_info & 0x03ffffff) | ((flags & 0x03f) << 26))
 
 #include "sysdep.h"
 #include "bfd.h"
@@ -97,10 +97,10 @@ MY (write_object_contents) (bfd *abfd)
   switch (bfd_get_arch(abfd))
     {
     case DEFAULT_ARCH:
-      N_SET_MACHTYPE(*execp, DEFAULT_MID);
+      N_SET_MACHTYPE (execp, DEFAULT_MID);
       break;
     default:
-      N_SET_MACHTYPE(*execp, M_UNKNOWN);
+      N_SET_MACHTYPE (execp, M_UNKNOWN);
       break;
     }
 
index 191ca214334168f9c7fa74ae78cd6f8c31bffef8..98c6644cad0ffc442d3fa1d8b02685715710a94c 100644 (file)
@@ -31,7 +31,7 @@
    1 and specially define our own N_TXTSIZE.  */
 
 #define N_HEADER_IN_TEXT(x) 1
-#define N_TXTSIZE(x) ((x).a_text)
+#define N_TXTSIZE(x) ((x)->a_text)
 
 #define TEXT_START_ADDR 0x10000       /* from old ld */
 #define TARGET_PAGE_SIZE 0x1000       /* from old ld,  032 & 532 are really 512/4k */
@@ -39,7 +39,7 @@
 /* Use a_entry of 0 to distinguish object files from OMAGIC executables */
 #define N_TXTADDR(x) \
   (N_MAGIC(x) == OMAGIC ? \
-   ((x).a_entry < TEXT_START_ADDR? 0: TEXT_START_ADDR): \
+   ((x)->a_entry < TEXT_START_ADDR? 0: TEXT_START_ADDR): \
    (N_MAGIC(x) == NMAGIC? TEXT_START_ADDR: \
     TEXT_START_ADDR + EXEC_BYTES_SIZE))
 
@@ -89,16 +89,16 @@ MY(write_object_contents) (bfd *abfd)
   switch (bfd_get_mach (abfd))
     {
     case 32032:
-      N_SET_MACHTYPE (*execp, M_NS32032);
+      N_SET_MACHTYPE (execp, M_NS32032);
       break;
     case 32532:
     default:
-      N_SET_MACHTYPE (*execp, M_NS32532);
+      N_SET_MACHTYPE (execp, M_NS32532);
       break;
     }
-  N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags);
+  N_SET_FLAGS (execp, aout_backend_info (abfd)->exec_hdr_flags);
 
-  WRITE_HEADERS(abfd, execp);
+  WRITE_HEADERS (abfd, execp);
 
   return TRUE;
 }
index 6a53d521442d9a8eec5e51f7b48aad54b30d9c34..f6a7c3830e5edd32b1d670a0da7feddac2df1936 100644 (file)
@@ -58,9 +58,9 @@
 #define N_HEADER_IN_TEXT(x)    0
 
 /* There is no flags field.  */
-#define N_FLAGS(exec         0
+#define N_FLAGS(execp)         0
 
-#define N_SET_FLAGS(exec, flags) do { } while (0)
+#define N_SET_FLAGS(execp, flags) do { } while (0)
 #define N_BADMAG(x) (N_MAGIC(x) != OMAGIC      \
                     && N_MAGIC(x) != NMAGIC    \
                     && N_MAGIC(x) != ZMAGIC)
@@ -111,11 +111,11 @@ struct pdp11_external_nlist
 #define        EXTERNAL_NLIST_SIZE     8
 
 #define N_TXTOFF(x)    (EXEC_BYTES_SIZE)
-#define N_DATOFF(x)    (N_TXTOFF(x) + (x).a_text)
-#define N_TRELOFF(x)   (N_DATOFF(x) + (x).a_data)
-#define N_DRELOFF(x)   (N_TRELOFF(x) + (x).a_trsize)
-#define N_SYMOFF(x)    (N_DRELOFF(x) + (x).a_drsize)
-#define N_STROFF(x)    (N_SYMOFF(x) + (x).a_syms)
+#define N_DATOFF(x)    (N_TXTOFF(x) + (x)->a_text)
+#define N_TRELOFF(x)   (N_DATOFF(x) + (x)->a_data)
+#define N_DRELOFF(x)   (N_TRELOFF(x) + (x)->a_trsize)
+#define N_SYMOFF(x)    (N_DRELOFF(x) + (x)->a_drsize)
+#define N_STROFF(x)    (N_SYMOFF(x) + (x)->a_syms)
 
 #define WRITE_HEADERS(abfd, execp) pdp11_aout_write_headers (abfd, execp)
 
@@ -326,7 +326,7 @@ pdp11_aout_write_headers (bfd *abfd, struct internal_exec *execp)
   if (bfd_get_outsymbols (abfd) != NULL
       && bfd_get_symcount (abfd) != 0)
     {
-      if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0)
+      if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (execp)), SEEK_SET) != 0)
        return FALSE;
 
       if (! NAME (aout, write_syms) (abfd))
@@ -336,9 +336,9 @@ pdp11_aout_write_headers (bfd *abfd, struct internal_exec *execp)
   if (obj_textsec (abfd)->reloc_count > 0
       || obj_datasec (abfd)->reloc_count > 0)
     {
-      if (bfd_seek (abfd, (file_ptr) (N_TRELOFF(*execp)), SEEK_SET) != 0
+      if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (execp)), SEEK_SET) != 0
          || !NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd))
-         || bfd_seek (abfd, (file_ptr) (N_DRELOFF(*execp)), SEEK_SET) != 0
+         || bfd_seek (abfd, (file_ptr) (N_DRELOFF (execp)), SEEK_SET) != 0
          || !NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd)))
        return FALSE;
     }
@@ -492,20 +492,20 @@ NAME (aout, some_aout_object_p) (bfd *abfd,
   /* Setting of EXEC_P has been deferred to the bottom of this function.  */
   if (execp->a_syms)
     abfd->flags |= HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS;
-  if (N_DYNAMIC(*execp))
+  if (N_DYNAMIC (execp))
     abfd->flags |= DYNAMIC;
 
-  if (N_MAGIC (*execp) == ZMAGIC)
+  if (N_MAGIC (execp) == ZMAGIC)
     {
       abfd->flags |= D_PAGED | WP_TEXT;
       adata (abfd).magic = z_magic;
     }
-  else if (N_MAGIC (*execp) == NMAGIC)
+  else if (N_MAGIC (execp) == NMAGIC)
     {
       abfd->flags |= WP_TEXT;
       adata (abfd).magic = n_magic;
     }
-  else if (N_MAGIC (*execp) == OMAGIC)
+  else if (N_MAGIC (execp) == OMAGIC)
     adata (abfd).magic = o_magic;
   else
     {
@@ -562,25 +562,25 @@ NAME (aout, some_aout_object_p) (bfd *abfd,
      in by the callback:  */
   struct exec *execp = exec_hdr (abfd);
 
-  obj_textsec (abfd)->size = N_TXTSIZE(*execp);
+  obj_textsec (abfd)->size = N_TXTSIZE (execp);
   /* Data and bss are already filled in since they're so standard.  */
 
   /* The virtual memory addresses of the sections.  */
-  obj_textsec (abfd)->vma = N_TXTADDR(*execp);
-  obj_datasec (abfd)->vma = N_DATADDR(*execp);
-  obj_bsssec  (abfd)->vma = N_BSSADDR(*execp);
+  obj_textsec (abfd)->vma = N_TXTADDR (execp);
+  obj_datasec (abfd)->vma = N_DATADDR (execp);
+  obj_bsssec  (abfd)->vma = N_BSSADDR (execp);
 
   /* The file offsets of the sections.  */
-  obj_textsec (abfd)->filepos = N_TXTOFF(*execp);
-  obj_datasec (abfd)->filepos = N_DATOFF(*execp);
+  obj_textsec (abfd)->filepos = N_TXTOFF (execp);
+  obj_datasec (abfd)->filepos = N_DATOFF (execp);
 
   /* The file offsets of the relocation info.  */
-  obj_textsec (abfd)->rel_filepos = N_TRELOFF(*execp);
-  obj_datasec (abfd)->rel_filepos = N_DRELOFF(*execp);
+  obj_textsec (abfd)->rel_filepos = N_TRELOFF (execp);
+  obj_datasec (abfd)->rel_filepos = N_DRELOFF (execp);
 
   /* The file offsets of the string table and symbol table.  */
-  obj_str_filepos (abfd) = N_STROFF (*execp);
-  obj_sym_filepos (abfd) = N_SYMOFF (*execp);
+  obj_str_filepos (abfd) = N_STROFF (execp);
+  obj_sym_filepos (abfd) = N_SYMOFF (execp);
 
   /* Determine the architecture and machine type of the object file.  */
   abfd->obj_arch = bfd_arch_obscure;
@@ -860,7 +860,7 @@ adjust_o_magic (bfd *abfd, struct internal_exec *execp)
   execp->a_text = obj_textsec (abfd)->size;
   execp->a_data = obj_datasec (abfd)->size;
   execp->a_bss  = obj_bsssec (abfd)->size;
-  N_SET_MAGIC (*execp, OMAGIC);
+  N_SET_MAGIC (execp, OMAGIC);
 }
 
 static void
@@ -944,7 +944,7 @@ adjust_z_magic (bfd *abfd, struct internal_exec *execp)
   execp->a_text = obj_textsec(abfd)->size;
   if (ztih && (!abdp || (abdp && !abdp->exec_header_not_counted)))
     execp->a_text += adata(abfd).exec_bytes_size;
-  N_SET_MAGIC (*execp, ZMAGIC);
+  N_SET_MAGIC (execp, ZMAGIC);
 
   /* Spec says data section should be rounded up to page boundary.  */
   obj_datasec(abfd)->size
@@ -1011,7 +1011,7 @@ adjust_n_magic (bfd *abfd, struct internal_exec *execp)
   execp->a_text = obj_textsec(abfd)->size;
   execp->a_data = obj_datasec(abfd)->size;
   execp->a_bss = obj_bsssec(abfd)->size;
-  N_SET_MAGIC (*execp, NMAGIC);
+  N_SET_MAGIC (execp, NMAGIC);
 }
 
 bfd_boolean
index 9388c48aad39e841552d80c36ef89c101c1bd959..a1f6401426d3b588748e6b9cfed9a842aa6ac34d 100644 (file)
 /* Sl which uses another.  */
 #define SLPZMAGIC       (MF_USES_SL | SLZMAGIC)
 
-#define N_SHARED_LIB(x) ((x).a_info & MF_USES_SL)
+#define N_SHARED_LIB(x) ((x)->a_info & MF_USES_SL)
 
 /* Only a pure OMAGIC file has the minimal header.  */
 #define N_TXTOFF(x)            \
- ((x).a_info == OMAGIC         \
+ ((x)->a_info == OMAGIC                \
   ? 32                         \
   : (N_MAGIC(x) == ZMAGIC      \
      ? TARGET_PAGE_SIZE                \
       up we can't know exactly what the address will be.  A reasonable guess \
       is that a_entry will be in the first page of the executable.  */      \
    : (N_SHARED_LIB(x)                                                       \
-      ? ((x).a_entry & ~(bfd_vma) (TARGET_PAGE_SIZE - 1))                   \
+      ? ((x)->a_entry & ~(bfd_vma) (TARGET_PAGE_SIZE - 1))                  \
       : (bfd_vma) TEXT_START_ADDR))
 
 #define N_SYMOFF(x) \
-  (N_TXTOFF (x) + (x).a_text + (x).a_data + (x).a_trsize + (x).a_drsize)
+  (N_TXTOFF (x) + (x)->a_text + (x)->a_data + (x)->a_trsize + (x)->a_drsize)
 
-#define N_STROFF(x) (N_SYMOFF (x) + (x).a_syms)
+#define N_STROFF(x) (N_SYMOFF (x) + (x)->a_syms)
 
 #define TEXT_START_ADDR   32768
 #define TARGET_PAGE_SIZE  32768
    the tokens.  */
 #define MY(OP) CONCAT2 (arm_aout_riscix_,OP)
 #define TARGETNAME "a.out-riscix"
-#define N_BADMAG(x) ((((x).a_info & ~007200) != ZMAGIC) \
-                  && (((x).a_info & ~006000) != OMAGIC) \
-                  && ((x).a_info != NMAGIC))
-#define N_MAGIC(x) ((x).a_info & ~07200)
+#define N_BADMAG(x) ((((x)->a_info & ~007200) != ZMAGIC) \
+                  && (((x)->a_info & ~006000) != OMAGIC) \
+                  && ((x)->a_info != NMAGIC))
+#define N_MAGIC(x) ((x)->a_info & ~07200)
 
 #include "sysdep.h"
 #include "bfd.h"
     if (bfd_get_outsymbols (abfd) != NULL                                  \
        && bfd_get_symcount (abfd) != 0)                                    \
       {                                                                            \
-       if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (* execp)), SEEK_SET) != 0)\
+       if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (execp)), SEEK_SET) != 0)  \
          return FALSE;                                                     \
                                                                            \
        if (! NAME (aout, write_syms) (abfd))                               \
           return FALSE;                                                            \
                                                                            \
-       if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (* execp)), SEEK_SET) != 0)\
+       if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (execp)), SEEK_SET) != 0) \
          return FALSE;                                                     \
                                                                            \
        if (! riscix_squirt_out_relocs (abfd, obj_textsec (abfd)))          \
          return FALSE;                                                     \
-       if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (* execp)), SEEK_SET) != 0)\
+       if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (execp)), SEEK_SET) != 0) \
          return FALSE;                                                     \
                                                                            \
        if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd)))     \
@@ -517,7 +517,7 @@ riscix_some_aout_object_p (bfd *abfd,
   /* Setting of EXEC_P has been deferred to the bottom of this function.  */
   if (execp->a_syms)
     abfd->flags |= HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS;
-  if (N_DYNAMIC(*execp))
+  if (N_DYNAMIC (execp))
     abfd->flags |= DYNAMIC;
 
  /* Squeezed files aren't supported (yet)!  */
@@ -532,17 +532,17 @@ riscix_some_aout_object_p (bfd *abfd,
       bfd_set_error (bfd_error_wrong_format);
       return NULL;
     }
-  else if (N_MAGIC (*execp) == ZMAGIC)
+  else if (N_MAGIC (execp) == ZMAGIC)
     {
       abfd->flags |= D_PAGED | WP_TEXT;
       adata (abfd).magic = z_magic;
     }
-  else if (N_MAGIC (*execp) == NMAGIC)
+  else if (N_MAGIC (execp) == NMAGIC)
     {
       abfd->flags |= WP_TEXT;
       adata (abfd).magic = n_magic;
     }
-  else if (N_MAGIC (*execp) == OMAGIC)
+  else if (N_MAGIC (execp) == OMAGIC)
     adata (abfd).magic = o_magic;
   else
     /* Should have been checked with N_BADMAG before this routine
@@ -637,11 +637,11 @@ MY (object_p) (bfd *abfd)
 
   exec.a_info = H_GET_32 (abfd, exec_bytes.e_info);
 
-  if (N_BADMAG (exec))
+  if (N_BADMAG (&exec))
     return NULL;
 
 #ifdef MACHTYPE_OK
-  if (!(MACHTYPE_OK (N_MACHTYPE (exec))))
+  if (!(MACHTYPE_OK (N_MACHTYPE (&exec))))
     return NULL;
 #endif
 
index 7632dbfd297bb2a156251c9ab16a91f3c2d0bbc1..6af535dbd3e9aad5870e0058fd1d4b15c78c5884 100644 (file)
@@ -66,11 +66,11 @@ sparclinux_write_object_contents (bfd *abfd)
   struct external_exec exec_bytes;
   struct internal_exec *execp = exec_hdr (abfd);
 
-  N_SET_MACHTYPE (*execp, M_SPARC);
+  N_SET_MACHTYPE (execp, M_SPARC);
 
   obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
 
-  WRITE_HEADERS(abfd, execp);
+  WRITE_HEADERS (abfd, execp);
 
   return TRUE;
 }
index 886731a4e0bafb9e8f83dd4e3b0827d42ae0c629..a90dc8b1ce1be2a8cd6b4ded4fddaf6e433f1f0b 100644 (file)
@@ -120,8 +120,8 @@ NAME(lynx,set_arch_mach) (bfd *abfd, unsigned long machtype)
   bfd_set_arch_mach (abfd, arch, machine);
 }
 
-#define SET_ARCH_MACH(ABFD, EXEC) \
-  NAME(lynx,set_arch_mach) (ABFD, N_MACHTYPE (EXEC)); \
+#define SET_ARCH_MACH(ABFD, EXECP) \
+  NAME(lynx,set_arch_mach) (ABFD, N_MACHTYPE (EXECP)); \
   choose_reloc_size(ABFD);
 
 /* Determine the size of a relocation entry, based on the architecture.  */
@@ -157,27 +157,27 @@ NAME(aout,sparclynx_write_object_contents) (bfd *abfd)
       switch (bfd_get_mach (abfd))
        {
        case bfd_mach_m68010:
-         N_SET_MACHTYPE (*execp, M_68010);
+         N_SET_MACHTYPE (execp, M_68010);
          break;
        default:
        case bfd_mach_m68020:
-         N_SET_MACHTYPE (*execp, M_68020);
+         N_SET_MACHTYPE (execp, M_68020);
          break;
        }
       break;
     case bfd_arch_sparc:
-      N_SET_MACHTYPE (*execp, M_SPARC);
+      N_SET_MACHTYPE (execp, M_SPARC);
       break;
     case bfd_arch_i386:
-      N_SET_MACHTYPE (*execp, M_386);
+      N_SET_MACHTYPE (execp, M_386);
       break;
     default:
-      N_SET_MACHTYPE (*execp, M_UNKNOWN);
+      N_SET_MACHTYPE (execp, M_UNKNOWN);
     }
 
   choose_reloc_size (abfd);
 
-  N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags);
+  N_SET_FLAGS (execp, aout_backend_info (abfd)->exec_hdr_flags);
 
   WRITE_HEADERS (abfd, execp);
 
index b465923f44171cec14f4006e99959089f2ba9c93..3550646ed424e1f38dd174a62ceb1b6052253111 100644 (file)
@@ -1,3 +1,8 @@
+2015-12-01  Alan Modra  <amodra@gmail.com>
+
+       * config/aout_gnu.h: Invoke aout N_* macros with pointer to
+       struct internal_exec.
+
 2015-11-27  Matthew Wahab  <matthew.wahab@arm.com>
 
        * config/tc-aarch64.c (aarch64_features): Add "fp16".
index d9f816746a0373ac49138100ebe8b32e7559f947..c2a7ca493a42e71d2b34d1049d80fa8f95b30ac2 100644 (file)
@@ -126,23 +126,23 @@ enum machine_type
     M_HPUX23 = 0x020C          /* hp200/300 HPUX binary */
   };
 
-#define N_MAGIC(exec) ((exec).a_info & 0xffff)
-#define N_MACHTYPE(exec) ((enum machine_type)(((exec).a_info >> 16) & 0xff))
-#define N_FLAGS(exec) (((exec).a_info >> 24) & 0xff)
-#define N_SET_INFO(exec, magic, type, flags) \
-    ((exec).a_info = ((magic) & 0xffff) \
+#define N_MAGIC(execp) ((execp)->a_info & 0xffff)
+#define N_MACHTYPE(execp) ((enum machine_type)(((execp)->a_info >> 16) & 0xff))
+#define N_FLAGS(execp) (((execp)->a_info >> 24) & 0xff)
+#define N_SET_INFO(execp, magic, type, flags) \
+    ((execp)->a_info = ((magic) & 0xffff) \
      | (((int)(type) & 0xff) << 16) \
      | (((flags) & 0xff) << 24))
-#define N_SET_MAGIC(exec, magic) \
-    ((exec).a_info = (((exec).a_info & 0xffff0000) | ((magic) & 0xffff)))
+#define N_SET_MAGIC(execp, magic) \
+    ((execp)->a_info = (((execp)->a_info & 0xffff0000) | ((magic) & 0xffff)))
 
-#define N_SET_MACHTYPE(exec, machtype) \
-    ((exec).a_info = \
-     ((exec).a_info&0xff00ffff) | ((((int)(machtype))&0xff) << 16))
+#define N_SET_MACHTYPE(execp, machtype) \
+    ((execp)->a_info = \
+     ((execp)->a_info & 0xff00ffff) | ((((int) (machtype)) & 0xff) << 16))
 
-#define N_SET_FLAGS(exec, flags) \
-    ((exec).a_info = \
-     ((exec).a_info&0x00ffffff) | (((flags) & 0xff) << 24))
+#define N_SET_FLAGS(execp, flags) \
+    ((execp)->a_info = \
+     ((execp)->a_info & 0x00ffffff) | (((flags) & 0xff) << 24))
 
 /* Code indicating object file or impure executable.  */
 #ifndef OMAGIC
@@ -185,23 +185,23 @@ enum machine_type
 #endif
 
 #ifndef N_DATOFF
-#define N_DATOFF(x)    ( N_TXTOFF(x) + (x).a_text )
+#define N_DATOFF(x)    ( N_TXTOFF(x) + (x)->a_text )
 #endif
 
 #ifndef N_TRELOFF
-#define N_TRELOFF(x)   ( N_DATOFF(x) + (x).a_data )
+#define N_TRELOFF(x)   ( N_DATOFF(x) + (x)->a_data )
 #endif
 
 #ifndef N_DRELOFF
-#define N_DRELOFF(x)   ( N_TRELOFF(x) + (x).a_trsize )
+#define N_DRELOFF(x)   ( N_TRELOFF(x) + (x)->a_trsize )
 #endif
 
 #ifndef N_SYMOFF
-#define N_SYMOFF(x)    ( N_DRELOFF(x) + (x).a_drsize )
+#define N_SYMOFF(x)    ( N_DRELOFF(x) + (x)->a_drsize )
 #endif
 
 #ifndef N_STROFF
-#define N_STROFF(x)    ( N_SYMOFF(x) + (x).a_syms )
+#define N_STROFF(x)    ( N_SYMOFF(x) + (x)->a_syms )
 #endif
 
 /* Address of text segment in memory after it is loaded.  */
@@ -211,12 +211,12 @@ enum machine_type
 
 #ifndef N_DATADDR
 #define N_DATADDR(x) \
-    (N_MAGIC(x)==OMAGIC? (N_TXTADDR(x)+(x).a_text) \
-     :  (N_SEGSIZE(x) + ((N_TXTADDR(x)+(x).a_text-1) & ~(N_SEGSIZE(x)-1))))
+    (N_MAGIC(x)==OMAGIC? (N_TXTADDR(x)+(x)->a_text) \
+     :  (N_SEGSIZE(x) + ((N_TXTADDR(x)+(x)->a_text-1) & ~(N_SEGSIZE(x)-1))))
 #endif
 
 /* Address of bss segment in memory after it is loaded.  */
-#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
+#define N_BSSADDR(x) (N_DATADDR(x) + (x)->a_data)
 \f
 struct nlist
   {
index c8c0900e0809c8524287c8f2f553a8a8f80892c8..cd33a618028f10761b3a554394a76f95406e9189 100644 (file)
@@ -1,3 +1,9 @@
+2015-12-01  Alan Modra  <amodra@gmail.com>
+
+       * bout.h: Invoke aout N_* macros with pointer to
+       struct internal_exec.
+       * os9k.h: Likewise.
+
 2015-11-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * vtv-change-permission.h (VTV_PAGE_SIZE) [__sun__ && __svr4__ &&
index 790763b60527f67a344c819049237d3c99759379..bf5dfdb21ec235f7f1a98e3df5a55c8e2e01f1b7 100644 (file)
@@ -1,3 +1,14 @@
+2015-12-01  Alan Modra  <amodra@gmail.com>
+
+       * adobe.h: Invoke aout N_* macros with pointer to
+       struct internal_exec.
+       * aout64.h: Likewise.
+       * dynix3.h: Likewise.
+       * encap.h: Likewise.
+       * hp.h: Likewise.
+       * hp300hpux.h: Likewise.
+       * sun4.h: Likewise.
+
 2015-01-01  Alan Modra  <amodra@gmail.com>
 
        Update year range in copyright notice of all files.
index 9c72fa51608550ab42fb63a286c73986f6810f72..cf8cfce1dccb0de7dd04b45862660a19452e5640 100644 (file)
@@ -47,7 +47,7 @@ struct external_exec
 #undef OMAGIC
 #undef NMAGIC
 
-#define N_BADMAG(x)      ((x).a_info != ZMAGIC)
+#define N_BADMAG(x)      ((x)->a_info != ZMAGIC)
 
 /* By default, segment size is constant.  But some machines override this
    to be a function of the a.out header (e.g. machine type).  */
@@ -77,25 +77,25 @@ struct internal_segdesc {
        unsigned int    a_filebase;     /* Base address in object file */
 };
 
-#define N_TXTADDR(x) \
+#define N_TXTADDR(x) is_this_really_unused?
 
 /* This is documented to be at 1024, but appears to really be at 2048.
    FIXME?!  */
 #define N_TXTOFF(x)    2048
 
-#define        N_TXTSIZE(x) ((x).a_text)
+#define        N_TXTSIZE(x) ((x)->a_text)
 
-#define N_DATADDR(x)
+#define N_DATADDR(x) is_this_really_unused?
 
-#define N_BSSADDR(x)
+#define N_BSSADDR(x) is_this_really_unused?
 
 /* Offsets of the various portions of the file after the text segment.  */
 
 #define N_DATOFF(x)    ( N_TXTOFF(x) + N_TXTSIZE(x) )
-#define N_TRELOFF(x)   ( N_DATOFF(x) + (x).a_data )
-#define N_DRELOFF(x)   ( N_TRELOFF(x) + (x).a_trsize )
-#define N_SYMOFF(x)    ( N_DRELOFF(x) + (x).a_drsize )
-#define N_STROFF(x)    ( N_SYMOFF(x) + (x).a_syms )
+#define N_TRELOFF(x)   ( N_DATOFF(x) + (x)->a_data )
+#define N_DRELOFF(x)   ( N_TRELOFF(x) + (x)->a_trsize )
+#define N_SYMOFF(x)    ( N_DRELOFF(x) + (x)->a_drsize )
+#define N_STROFF(x)    ( N_SYMOFF(x) + (x)->a_syms )
 \f
 /* Symbols */
 struct external_nlist {
index 7a250107dee0b41c25a8e826b8fbcfd406e236cf..08fd193e99cde0fc07c2292e3c152e396a0aa631 100644 (file)
@@ -136,7 +136,7 @@ struct external_exec
    in the text.  */
 #ifndef N_HEADER_IN_TEXT
 #define N_HEADER_IN_TEXT(x) \
-  (((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
+  (((x)->a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
 #endif
 
 /* Sun shared libraries, not linux.  This macro is only relevant for ZMAGIC
@@ -199,12 +199,12 @@ struct external_exec
 #define        N_TXTSIZE(x) \
   (/* For QMAGIC, we don't consider the header part of the text section.  */\
    N_IS_QMAGIC (x)                                                     \
-   ? (x).a_text - EXEC_BYTES_SIZE                                      \
+   ? (x)->a_text - EXEC_BYTES_SIZE                                     \
    : ((N_MAGIC (x) != ZMAGIC || N_SHARED_LIB (x))                      \
-      ? (x).a_text                                                     \
+      ? (x)->a_text                                                    \
       : (N_HEADER_IN_TEXT (x)                                          \
-        ? (x).a_text - EXEC_BYTES_SIZE /* No padding.  */              \
-        : (x).a_text                   /* A page of padding.  */ )))
+        ? (x)->a_text - EXEC_BYTES_SIZE        /* No padding.  */      \
+        : (x)->a_text                          /* A page of padding.  */ )))
 #endif
 /* The address of the data segment in virtual memory.
    It is the text segment address, plus text segment size, rounded
@@ -218,7 +218,7 @@ struct external_exec
 #endif
 /* The address of the BSS segment -- immediately after the data segment.  */
 
-#define N_BSSADDR(x)   (N_DATADDR (x) + (x).a_data)
+#define N_BSSADDR(x)   (N_DATADDR (x) + (x)->a_data)
 
 /* Offsets of the various portions of the file after the text segment.  */
 
@@ -238,16 +238,16 @@ struct external_exec
 #define N_DATOFF(x)    (N_TXTOFF (x) + N_TXTSIZE (x))
 #endif
 #ifndef N_TRELOFF
-#define N_TRELOFF(x)   (N_DATOFF (x) + (x).a_data)
+#define N_TRELOFF(x)   (N_DATOFF (x) + (x)->a_data)
 #endif
 #ifndef N_DRELOFF
-#define N_DRELOFF(x)   (N_TRELOFF (x) + (x).a_trsize)
+#define N_DRELOFF(x)   (N_TRELOFF (x) + (x)->a_trsize)
 #endif
 #ifndef N_SYMOFF
-#define N_SYMOFF(x)    (N_DRELOFF (x) + (x).a_drsize)
+#define N_SYMOFF(x)    (N_DRELOFF (x) + (x)->a_drsize)
 #endif
 #ifndef N_STROFF
-#define N_STROFF(x)    (N_SYMOFF (x) + (x).a_syms)
+#define N_STROFF(x)    (N_SYMOFF (x) + (x)->a_syms)
 #endif
 \f
 /* Symbols */
index 972477db9a44cbb0114889377541f700c0b77a66..2703782598a8dcc7bb900e2af8bc62e131ec8270 100644 (file)
@@ -69,19 +69,19 @@ struct dynix_external_exec
 
 #define N_TXTOFF(x) (EXEC_BYTES_SIZE)
 #define N_DATOFF(x) (N_TXTOFF(x) + N_TXTSIZE(x))
-#define N_SHDATOFF(x) (N_DATOFF(x) + (x).a_data)
-#define N_TRELOFF(x) (N_SHDATOFF(x) + (x).a_shdata)
-#define N_DRELOFF(x) (N_TRELOFF(x) + (x).a_trsize)
-#define N_SHDRELOFF(x) (N_DRELOFF(x) + (x).a_drsize)
-#define N_SYMOFF(x) (N_SHDRELOFF(x) + (x).a_shdrsize)
-#define N_STROFF(x) (N_SYMOFF(x) + (x).a_syms)
+#define N_SHDATOFF(x) (N_DATOFF(x) + (x)->a_data)
+#define N_TRELOFF(x) (N_SHDATOFF(x) + (x)->a_shdata)
+#define N_DRELOFF(x) (N_TRELOFF(x) + (x)->a_trsize)
+#define N_SHDRELOFF(x) (N_DRELOFF(x) + (x)->a_drsize)
+#define N_SYMOFF(x) (N_SHDRELOFF(x) + (x)->a_shdrsize)
+#define N_STROFF(x) (N_SYMOFF(x) + (x)->a_syms)
 
 #define N_TXTADDR(x) \
        (((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? 0 \
         : TEXT_START_ADDR + EXEC_BYTES_SIZE)
 
 #define N_TXTSIZE(x) \
-       (((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? ((x).a_text) \
-        : ((x).a_text - N_ADDRADJ(x) - EXEC_BYTES_SIZE))
+       (((OMAGIC == N_MAGIC(x)) || (SMAGIC == N_MAGIC(x))) ? ((x)->a_text) \
+        : ((x)->a_text - N_ADDRADJ(x) - EXEC_BYTES_SIZE))
 
 #endif /* A_OUT_DYNIX3_H */
index 6797e730f580eb34d577bbedde9c87489d32d59f..afed9b5c7fa7393aa24bc7c024c184ae0ad98547 100644 (file)
@@ -131,5 +131,5 @@ short __header_offset_temp;
 
 #define N_DATADDR(x) \
        ((N_FLAGS(x) & N_FLAGS_COFF_ENCAPSULATE) ? \
-        (SEGMENT_SIZE + ((N_TXTADDR(x)+(x).a_text-1) & ~(SEGMENT_SIZE-1))) : \
-        (N_TXTADDR(x)+(x).a_text))
+        (SEGMENT_SIZE + ((N_TXTADDR(x)+(x)->a_text-1) & ~(SEGMENT_SIZE-1))) : \
+        (N_TXTADDR(x)+(x)->a_text))
index be27668bd0b1f00d896a51181f88ccf39691a989..91b77bdef1df9fcc8856d2df43962d0e59584f3c 100644 (file)
@@ -60,10 +60,10 @@ struct exec
 #undef N_SET_MACHTYPE
 #undef N_SET_FLAGS
 
-#define N_MAGIC(exec) ((exec) . a_magic)
-#define N_MACHTYPE(exec) ((exec) . a_machtype)
-#define N_SET_MAGIC(exec, magic) (((exec) . a_magic) = (magic))
-#define N_SET_MACHTYPE(exec, machtype) (((exec) . a_machtype) = (machtype))
+#define N_MAGIC(execp) ((execp)->a_magic)
+#define N_MACHTYPE(execp) ((execp)->a_machtype)
+#define N_SET_MAGIC(execp, magic) (((execp)->a_magic) = (magic))
+#define N_SET_MACHTYPE(execp, machtype) (((execp)->a_machtype) = (machtype))
 
 #undef N_BADMAG
 #define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
index 527e42172523e30ee58da9a29beb786f85699bd0..cc65927693ad5a3cebb060a338f6265812c4ce04 100644 (file)
@@ -113,18 +113,18 @@ struct hp300hpux_header_extension
 #undef N_STROFF
 
 #define N_DATOFF(x)    ( N_TXTOFF(x) + N_TXTSIZE(x) )
-#define N_PASOFF(x)     ( N_DATOFF(x) + (x).a_data)
-#define N_SYMOFF(x)    ( N_PASOFF(x)   /* + (x).a_passize*/ )
-#define N_SUPOFF(x)     ( N_SYMOFF(x) + (x).a_syms )
-#define N_TRELOFF(x)   ( N_SUPOFF(x)    /* + 0 (x).a_supsize*/ )
-#define N_DRELOFF(x)   ( N_TRELOFF(x) + (x).a_trsize )
-#define N_EXTHOFF(x)    ( N_DRELOFF(x)   /*  + 0 (x).a_drsize */)
+#define N_PASOFF(x)     ( N_DATOFF(x) + (x)->a_data)
+#define N_SYMOFF(x)    ( N_PASOFF(x)   /* + (x)->a_passize*/ )
+#define N_SUPOFF(x)     ( N_SYMOFF(x) + (x)->a_syms )
+#define N_TRELOFF(x)   ( N_SUPOFF(x)    /* + (x)->a_supsize*/ )
+#define N_DRELOFF(x)   ( N_TRELOFF(x) + (x)->a_trsize )
+#define N_EXTHOFF(x)    ( N_DRELOFF(x)   /*  + (x)->a_drsize */)
 #define N_STROFF(x)    ( 0 /* no string table */ )
 
 /* use these when the file has gnu symbol tables */
-#define N_GNU_TRELOFF(x) (N_DATOFF(x) + (x).a_data)
-#define N_GNU_DRELOFF(x) (N_GNU_TRELOFF(x) + (x).a_trsize)
-#define N_GNU_SYMOFF(x)  (N_GNU_DRELOFF(x) + (x).a_drsize)
+#define N_GNU_TRELOFF(x) (N_DATOFF(x) + (x)->a_data)
+#define N_GNU_DRELOFF(x) (N_GNU_TRELOFF(x) + (x)->a_trsize)
+#define N_GNU_SYMOFF(x)  (N_GNU_DRELOFF(x) + (x)->a_drsize)
 
 #define TARGET_PAGE_SIZE 0x1000
 #define SEGMENT_SIZE 0x1000
index c6e3d2ce183b0a987796a13030378b861f83098a..9be0a11aeb500c41b725767839187264a1c60fba 100644 (file)
@@ -44,8 +44,8 @@
    expected text address.  These kludges have gotta go!
    For linked files, should reflect reality if we know it.  */
 
-#define N_SHARED_LIB(x) ((x).a_entry < TEXT_START_ADDR \
-                        && (x).a_text >= EXEC_BYTES_SIZE)
+#define N_SHARED_LIB(x) ((x)->a_entry < TEXT_START_ADDR \
+                        && (x)->a_text >= EXEC_BYTES_SIZE)
 
 /* This differs from the version in aout64.h (which we override by defining
    it here) only for NMAGIC (we return TEXT_START_ADDR+EXEC_BYTES_SIZE;
@@ -53,7 +53,7 @@
 
 #define N_TXTADDR(x) \
     (N_MAGIC(x)==OMAGIC? 0 \
-     : (N_MAGIC(x) == ZMAGIC && (x).a_entry < TEXT_START_ADDR)? 0 \
+     : (N_MAGIC(x) == ZMAGIC && (x)->a_entry < TEXT_START_ADDR)? 0 \
      : TEXT_START_ADDR+EXEC_BYTES_SIZE)
 
 /* When a file is linked against a shared library on SunOS 4, the
index b28cdaa522c98e9e14e79f3f93d04f2dedd52a76..dbbfc5e6d1d86740b523eb5c77dde773fcb83d2f 100644 (file)
@@ -87,16 +87,16 @@ struct external_exec
 
 /* These macros use the a_xxx field names, since they operate on the exec
    structure after it's been byte-swapped and realigned on the host machine.  */
-#define N_BADMAG(x)    (((x).a_info)!=BMAGIC)
+#define N_BADMAG(x)    (((x)->a_info)!=BMAGIC)
 #define N_TXTOFF(x)    EXEC_BYTES_SIZE
-#define N_DATOFF(x)    ( N_TXTOFF(x) + (x).a_text )
-#define N_TROFF(x)     ( N_DATOFF(x) + (x).a_data )
+#define N_DATOFF(x)    ( N_TXTOFF(x) + (x)->a_text )
+#define N_TROFF(x)     ( N_DATOFF(x) + (x)->a_data )
 #define N_TRELOFF      N_TROFF
-#define N_DROFF(x)     ( N_TROFF(x) + (x).a_trsize )
+#define N_DROFF(x)     ( N_TROFF(x) + (x)->a_trsize )
 #define N_DRELOFF      N_DROFF
-#define N_SYMOFF(x)    ( N_DROFF(x) + (x).a_drsize )
-#define N_STROFF(x)    ( N_SYMOFF(x) + (x).a_syms )
-#define N_DATADDR(x)   ( (x).a_dload )    
+#define N_SYMOFF(x)    ( N_DROFF(x) + (x)->a_drsize )
+#define N_STROFF(x)    ( N_SYMOFF(x) + (x)->a_syms )
+#define N_DATADDR(x)   ( (x)->a_dload )
 
 /* Address of text segment in memory after it is loaded.  */
 #if !defined (N_TXTADDR)
index 4329013d27597b99a876a5c1a2563a70268df6f9..accd9d0701db663395918df24fbfeac8fdd5d04d 100644 (file)
@@ -100,7 +100,7 @@ Boston, MA 02110-1301, USA.  */
 #define MODSIZE(mod) ((u_int32)((Mh_com)mod)->m_size)
 #endif /* 0 */
 #define MHCOM_BYTES_SIZE 80
-#define N_BADMAG(a) (((a).a_info) != MODSYNC)
+#define N_BADMAG(a) (((a)->a_info) != MODSYNC)
 
 typedef struct mh_com
 {