aboutsummaryrefslogtreecommitdiff
path: root/bfd/riscix.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2015-12-01 11:40:52 +1030
committerAlan Modra <amodra@gmail.com>2015-12-01 13:40:05 +1030
commitbbb1afc89b5cfa2f09b6a7c25fbfef745fbdd724 (patch)
treeb0653707257c0239c98dfdb1b3c43aaf98ae3f12 /bfd/riscix.c
parentb560e2acdd41fe6b6228b11c2d82ad2a96188153 (diff)
downloadgdb-bbb1afc89b5cfa2f09b6a7c25fbfef745fbdd724.zip
gdb-bbb1afc89b5cfa2f09b6a7c25fbfef745fbdd724.tar.gz
gdb-bbb1afc89b5cfa2f09b6a7c25fbfef745fbdd724.tar.bz2
Invoke aout N_* macros with pointer to struct internal_exec
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.
Diffstat (limited to 'bfd/riscix.c')
-rw-r--r--bfd/riscix.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/bfd/riscix.c b/bfd/riscix.c
index 9388c48..a1f6401 100644
--- a/bfd/riscix.c
+++ b/bfd/riscix.c
@@ -63,11 +63,11 @@
/* 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 \
@@ -81,13 +81,13 @@
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
@@ -99,10 +99,10 @@
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"
@@ -134,18 +134,18 @@
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