* aout64.h: Formatting fixes.
(N_TXTADDR): Evaluate to a bfd_vma. (N_DATADDR): Avoid negative unsigned warning. * hp300hpux.h: Formatting fixes. (N_DATADDR): As above.
This commit is contained in:
parent
ae81c75ec3
commit
5cc4813b22
3 changed files with 55 additions and 42 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2001-09-18 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* aout64.h: Formatting fixes.
|
||||||
|
(N_TXTADDR): Evaluate to a bfd_vma.
|
||||||
|
(N_DATADDR): Avoid negative unsigned warning.
|
||||||
|
* hp300hpux.h: Formatting fixes.
|
||||||
|
(N_DATADDR): Avoid negative unsigned warning.
|
||||||
|
|
||||||
Mon Apr 3 13:29:08 2000 Hans-Peter Nilsson <hp@axis.com>
|
Mon Apr 3 13:29:08 2000 Hans-Peter Nilsson <hp@axis.com>
|
||||||
|
|
||||||
* aout64.h (RELOC_EXT_BITS_EXTERN_BIG): Wrap definition in #ifndef.
|
* aout64.h (RELOC_EXT_BITS_EXTERN_BIG): Wrap definition in #ifndef.
|
||||||
|
|
|
@ -131,7 +131,8 @@ struct external_exec
|
||||||
/* This macro is only relevant for ZMAGIC files; QMAGIC always has the header
|
/* This macro is only relevant for ZMAGIC files; QMAGIC always has the header
|
||||||
in the text. */
|
in the text. */
|
||||||
#ifndef N_HEADER_IN_TEXT
|
#ifndef N_HEADER_IN_TEXT
|
||||||
#define N_HEADER_IN_TEXT(x) (((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
|
#define N_HEADER_IN_TEXT(x) \
|
||||||
|
(((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Sun shared libraries, not linux. This macro is only relevant for ZMAGIC
|
/* Sun shared libraries, not linux. This macro is only relevant for ZMAGIC
|
||||||
|
@ -151,15 +152,17 @@ struct external_exec
|
||||||
|
|
||||||
#ifndef N_TXTADDR
|
#ifndef N_TXTADDR
|
||||||
#define N_TXTADDR(x) \
|
#define N_TXTADDR(x) \
|
||||||
(/* The address of a QMAGIC file is always one page in, */ \
|
(/* The address of a QMAGIC file is always one page in, */ \
|
||||||
/* with the header in the text. */ \
|
/* with the header in the text. */ \
|
||||||
N_IS_QMAGIC (x) ? TARGET_PAGE_SIZE + EXEC_BYTES_SIZE : \
|
N_IS_QMAGIC (x) \
|
||||||
N_MAGIC(x) != ZMAGIC ? 0 : /* object file or NMAGIC */\
|
? (bfd_vma) TARGET_PAGE_SIZE + EXEC_BYTES_SIZE \
|
||||||
N_SHARED_LIB(x) ? 0 : \
|
: (N_MAGIC (x) != ZMAGIC \
|
||||||
N_HEADER_IN_TEXT(x) ? \
|
? (bfd_vma) 0 /* object file or NMAGIC */ \
|
||||||
TEXT_START_ADDR + EXEC_BYTES_SIZE : /* no padding */\
|
: (N_SHARED_LIB (x) \
|
||||||
TEXT_START_ADDR /* a page of padding */\
|
? (bfd_vma) 0 \
|
||||||
)
|
: (N_HEADER_IN_TEXT (x) \
|
||||||
|
? (bfd_vma) TEXT_START_ADDR + EXEC_BYTES_SIZE \
|
||||||
|
: (bfd_vma) TEXT_START_ADDR))))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If N_HEADER_IN_TEXT is not true for ZMAGIC, there is some padding
|
/* If N_HEADER_IN_TEXT is not true for ZMAGIC, there is some padding
|
||||||
|
@ -177,14 +180,15 @@ struct external_exec
|
||||||
|
|
||||||
/* Offset in an a.out of the start of the text section. */
|
/* Offset in an a.out of the start of the text section. */
|
||||||
#ifndef N_TXTOFF
|
#ifndef N_TXTOFF
|
||||||
#define N_TXTOFF(x) \
|
#define N_TXTOFF(x) \
|
||||||
(/* For {O,N,Q}MAGIC, no padding. */ \
|
(/* For {O,N,Q}MAGIC, no padding. */ \
|
||||||
N_MAGIC(x) != ZMAGIC ? EXEC_BYTES_SIZE : \
|
N_MAGIC (x) != ZMAGIC \
|
||||||
N_SHARED_LIB(x) ? 0 : \
|
? EXEC_BYTES_SIZE \
|
||||||
N_HEADER_IN_TEXT(x) ? \
|
: (N_SHARED_LIB (x) \
|
||||||
EXEC_BYTES_SIZE : /* no padding */\
|
? 0 \
|
||||||
ZMAGIC_DISK_BLOCK_SIZE /* a page of padding */\
|
: (N_HEADER_IN_TEXT (x) \
|
||||||
)
|
? EXEC_BYTES_SIZE /* no padding */ \
|
||||||
|
: ZMAGIC_DISK_BLOCK_SIZE /* a page of padding */)))
|
||||||
#endif
|
#endif
|
||||||
/* Size of the text section. It's always as stated, except that we
|
/* Size of the text section. It's always as stated, except that we
|
||||||
offset it to `undo' the adjustment to N_TXTADDR and N_TXTOFF
|
offset it to `undo' the adjustment to N_TXTADDR and N_TXTOFF
|
||||||
|
@ -193,25 +197,28 @@ struct external_exec
|
||||||
exec header to be part of the text segment.) */
|
exec header to be part of the text segment.) */
|
||||||
#ifndef N_TXTSIZE
|
#ifndef N_TXTSIZE
|
||||||
#define N_TXTSIZE(x) \
|
#define N_TXTSIZE(x) \
|
||||||
(/* For QMAGIC, we don't consider the header part of the text section. */\
|
(/* For QMAGIC, we don't consider the header part of the text section. */\
|
||||||
N_IS_QMAGIC (x) ? (x).a_text - EXEC_BYTES_SIZE : \
|
N_IS_QMAGIC (x) \
|
||||||
(N_MAGIC(x) != ZMAGIC || N_SHARED_LIB(x)) ? (x).a_text : \
|
? (x).a_text - EXEC_BYTES_SIZE \
|
||||||
N_HEADER_IN_TEXT(x) ? \
|
: ((N_MAGIC (x) != ZMAGIC || N_SHARED_LIB (x)) \
|
||||||
(x).a_text - EXEC_BYTES_SIZE: /* no padding */\
|
? (x).a_text \
|
||||||
(x).a_text /* a page of padding */\
|
: (N_HEADER_IN_TEXT (x) \
|
||||||
)
|
? (x).a_text - EXEC_BYTES_SIZE /* no padding */ \
|
||||||
|
: (x).a_text /* a page of padding */ )))
|
||||||
#endif
|
#endif
|
||||||
/* The address of the data segment in virtual memory.
|
/* The address of the data segment in virtual memory.
|
||||||
It is the text segment address, plus text segment size, rounded
|
It is the text segment address, plus text segment size, rounded
|
||||||
up to a N_SEGSIZE boundary for pure or pageable files. */
|
up to a N_SEGSIZE boundary for pure or pageable files. */
|
||||||
#ifndef N_DATADDR
|
#ifndef N_DATADDR
|
||||||
#define N_DATADDR(x) \
|
#define N_DATADDR(x) \
|
||||||
(N_MAGIC(x)==OMAGIC? (N_TXTADDR(x)+N_TXTSIZE(x)) \
|
(N_MAGIC (x) == OMAGIC \
|
||||||
: (N_SEGSIZE(x) + ((N_TXTADDR(x)+N_TXTSIZE(x)-1) & ~(N_SEGSIZE(x)-1))))
|
? (N_TXTADDR (x) + N_TXTSIZE (x)) \
|
||||||
|
: (N_SEGSIZE (x) + ((N_TXTADDR (x) + N_TXTSIZE (x) - 1) \
|
||||||
|
& ~ (bfd_vma) (N_SEGSIZE (x) - 1))))
|
||||||
#endif
|
#endif
|
||||||
/* The address of the BSS segment -- immediately after the data segment. */
|
/* 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. */
|
/* Offsets of the various portions of the file after the text segment. */
|
||||||
|
|
||||||
|
@ -228,21 +235,19 @@ struct external_exec
|
||||||
for NMAGIC. */
|
for NMAGIC. */
|
||||||
|
|
||||||
#ifndef N_DATOFF
|
#ifndef N_DATOFF
|
||||||
#define N_DATOFF(x) \
|
#define N_DATOFF(x) ( N_TXTOFF (x) + N_TXTSIZE (x) )
|
||||||
(N_TXTOFF(x) + N_TXTSIZE(x))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef N_TRELOFF
|
#ifndef N_TRELOFF
|
||||||
#define N_TRELOFF(x) ( N_DATOFF(x) + (x).a_data )
|
#define N_TRELOFF(x) ( N_DATOFF (x) + (x).a_data )
|
||||||
#endif
|
#endif
|
||||||
#ifndef N_DRELOFF
|
#ifndef N_DRELOFF
|
||||||
#define N_DRELOFF(x) ( N_TRELOFF(x) + (x).a_trsize )
|
#define N_DRELOFF(x) ( N_TRELOFF (x) + (x).a_trsize )
|
||||||
#endif
|
#endif
|
||||||
#ifndef N_SYMOFF
|
#ifndef N_SYMOFF
|
||||||
#define N_SYMOFF(x) ( N_DRELOFF(x) + (x).a_drsize )
|
#define N_SYMOFF(x) ( N_DRELOFF (x) + (x).a_drsize )
|
||||||
#endif
|
#endif
|
||||||
#ifndef N_STROFF
|
#ifndef N_STROFF
|
||||||
#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
|
#define N_STROFF(x) ( N_SYMOFF (x) + (x).a_syms )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Symbols */
|
/* Symbols */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Special version of <a.out.h> for use under hp-ux.
|
/* Special version of <a.out.h> for use under hp-ux.
|
||||||
Copyright 1988, 1993, 1995 Free Software Foundation, Inc. */
|
Copyright 1988, 1993, 1995, 2001 Free Software Foundation, Inc. */
|
||||||
|
|
||||||
struct hp300hpux_exec_bytes
|
struct hp300hpux_exec_bytes
|
||||||
{
|
{
|
||||||
|
@ -73,13 +73,13 @@ struct hp300hpux_header_extension
|
||||||
#define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
|
#define N_BADMAG(x) ((_N_BADMAG (x)) || (_N_BADMACH (x)))
|
||||||
|
|
||||||
#define N_DATADDR(x) \
|
#define N_DATADDR(x) \
|
||||||
((N_MAGIC(x)==OMAGIC || N_MAGIC(x)==HPUX_DOT_O_MAGIC) ? \
|
((N_MAGIC (x) == OMAGIC || N_MAGIC (x) == HPUX_DOT_O_MAGIC) \
|
||||||
(N_TXTADDR(x)+N_TXTSIZE(x)) \
|
? (N_TXTADDR (x) + N_TXTSIZE (x)) \
|
||||||
: (N_SEGSIZE(x) + ((N_TXTADDR(x)+N_TXTSIZE(x)-1) & ~(N_SEGSIZE(x)-1))))
|
: (N_SEGSIZE (x) + ((N_TXTADDR (x) + N_TXTSIZE (x) - 1) \
|
||||||
|
& ~ (bfd_vma) (N_SEGSIZE (x) - 1))))
|
||||||
|
|
||||||
#define _N_BADMACH(x) \
|
#define _N_BADMACH(x) \
|
||||||
(((N_MACHTYPE (x)) != HP9000S200_ID) && \
|
(((N_MACHTYPE (x)) != HP9000S200_ID) && ((N_MACHTYPE (x)) != HP98x6_ID))
|
||||||
((N_MACHTYPE (x)) != HP98x6_ID))
|
|
||||||
|
|
||||||
#define _N_BADMAG(x) (N_MAGIC(x) != HPUX_DOT_O_MAGIC \
|
#define _N_BADMAG(x) (N_MAGIC(x) != HPUX_DOT_O_MAGIC \
|
||||||
&& N_MAGIC(x) != OMAGIC \
|
&& N_MAGIC(x) != OMAGIC \
|
||||||
|
|
Loading…
Reference in a new issue