diff options
Diffstat (limited to 'contrib/binutils/include/aout')
-rw-r--r-- | contrib/binutils/include/aout/ChangeLog | 24 | ||||
-rw-r--r-- | contrib/binutils/include/aout/aout64.h | 75 | ||||
-rw-r--r-- | contrib/binutils/include/aout/sun4.h | 20 |
3 files changed, 74 insertions, 45 deletions
diff --git a/contrib/binutils/include/aout/ChangeLog b/contrib/binutils/include/aout/ChangeLog index e75a12f..d215c59 100644 --- a/contrib/binutils/include/aout/ChangeLog +++ b/contrib/binutils/include/aout/ChangeLog @@ -1,6 +1,10 @@ -2001-06-07 Alan Modra <amodra@bigpond.net.au> +2001-09-18 Alan Modra <amodra@bigpond.net.au> - * Many files: Update copyright notices. + * 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> @@ -41,6 +45,10 @@ Wed Jul 12 00:15:13 1995 Ken Raeburn <raeburn@kr-pc.cygnus.com> * sun4.h (PAGE_SIZE): Undefine before defining. +Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org) + + * aout64.h: Only define QMAGIC if it isn't already defined. + Thu Jun 16 14:22:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * aout64.h (BMAGIC): Define. @@ -175,20 +183,20 @@ Thu Jun 11 01:12:07 1992 John Gilmore (gnu at cygnus.com) Thu Jan 30 18:12:44 1992 John Gilmore (gnu at cygnus.com) - * aout/aout64.h: N_TXTSIZE needs some more parentheses. + * aout64.h: N_TXTSIZE needs some more parentheses. I don't trust C precedence. Wed Dec 18 14:32:01 1991 Per Bothner (bothner at cygnus.com) - * aout/aout64.h: Move common sunos-specific test + * aout64.h: Move common sunos-specific test to recognize shared libraries into new macro N_SHARED_LIB. - Use it to simplify&reformat N_TXTADDR, N_TXTOFF, N_TXTSIZE. + Use it to simplify & reformat N_TXTADDR, N_TXTOFF, N_TXTSIZE. Sat Nov 30 20:34:52 1991 Steve Chamberlain (sac at rtl.cygnus.com) - * ChangeLog, aout64.h, ar.h, encap.h, host.h, hp.h, ranlib.h, - reloc.h, stab.def, stab_gnu.h, sun4.h: All moved from the - devo/include directory + * aout64.h, ar.h, encap.h, host.h, hp.h, ranlib.h, reloc.h, + stab.def, stab_gnu.h, sun4.h: All moved from the devo/include + directory. Local Variables: diff --git a/contrib/binutils/include/aout/aout64.h b/contrib/binutils/include/aout/aout64.h index a8a8cd1..bc96d2a 100644 --- a/contrib/binutils/include/aout/aout64.h +++ b/contrib/binutils/include/aout/aout64.h @@ -131,7 +131,8 @@ struct external_exec /* This macro is only relevant for ZMAGIC files; QMAGIC always has the header in the 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 /* Sun shared libraries, not linux. This macro is only relevant for ZMAGIC @@ -151,15 +152,17 @@ struct external_exec #ifndef N_TXTADDR #define N_TXTADDR(x) \ - (/* The address of a QMAGIC file is always one page in, */ \ - /* with the header in the text. */ \ - N_IS_QMAGIC (x) ? TARGET_PAGE_SIZE + EXEC_BYTES_SIZE : \ - N_MAGIC(x) != ZMAGIC ? 0 : /* object file or NMAGIC */\ - N_SHARED_LIB(x) ? 0 : \ - N_HEADER_IN_TEXT(x) ? \ - TEXT_START_ADDR + EXEC_BYTES_SIZE : /* no padding */\ - TEXT_START_ADDR /* a page of padding */\ - ) + (/* The address of a QMAGIC file is always one page in, */ \ + /* with the header in the text. */ \ + N_IS_QMAGIC (x) \ + ? (bfd_vma) TARGET_PAGE_SIZE + EXEC_BYTES_SIZE \ + : (N_MAGIC (x) != ZMAGIC \ + ? (bfd_vma) 0 /* object file or NMAGIC */ \ + : (N_SHARED_LIB (x) \ + ? (bfd_vma) 0 \ + : (N_HEADER_IN_TEXT (x) \ + ? (bfd_vma) TEXT_START_ADDR + EXEC_BYTES_SIZE \ + : (bfd_vma) TEXT_START_ADDR)))) #endif /* 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. */ #ifndef N_TXTOFF -#define N_TXTOFF(x) \ - (/* For {O,N,Q}MAGIC, no padding. */ \ - N_MAGIC(x) != ZMAGIC ? EXEC_BYTES_SIZE : \ - N_SHARED_LIB(x) ? 0 : \ - N_HEADER_IN_TEXT(x) ? \ - EXEC_BYTES_SIZE : /* no padding */\ - ZMAGIC_DISK_BLOCK_SIZE /* a page of padding */\ - ) +#define N_TXTOFF(x) \ + (/* For {O,N,Q}MAGIC, no padding. */ \ + N_MAGIC (x) != ZMAGIC \ + ? EXEC_BYTES_SIZE \ + : (N_SHARED_LIB (x) \ + ? 0 \ + : (N_HEADER_IN_TEXT (x) \ + ? EXEC_BYTES_SIZE /* no padding */ \ + : ZMAGIC_DISK_BLOCK_SIZE /* a page of padding */))) #endif /* 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 @@ -193,25 +197,28 @@ struct external_exec exec header to be part of the text segment.) */ #ifndef N_TXTSIZE #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 : \ - (N_MAGIC(x) != ZMAGIC || N_SHARED_LIB(x)) ? (x).a_text : \ - N_HEADER_IN_TEXT(x) ? \ - (x).a_text - EXEC_BYTES_SIZE: /* no padding */\ - (x).a_text /* a page of padding */\ - ) + (/* For QMAGIC, we don't consider the header part of the text section. */\ + N_IS_QMAGIC (x) \ + ? (x).a_text - EXEC_BYTES_SIZE \ + : ((N_MAGIC (x) != ZMAGIC || N_SHARED_LIB (x)) \ + ? (x).a_text \ + : (N_HEADER_IN_TEXT (x) \ + ? (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 up to a N_SEGSIZE boundary for pure or pageable files. */ #ifndef N_DATADDR #define N_DATADDR(x) \ - (N_MAGIC(x)==OMAGIC? (N_TXTADDR(x)+N_TXTSIZE(x)) \ - : (N_SEGSIZE(x) + ((N_TXTADDR(x)+N_TXTSIZE(x)-1) & ~(N_SEGSIZE(x)-1)))) + (N_MAGIC (x) == OMAGIC \ + ? (N_TXTADDR (x) + N_TXTSIZE (x)) \ + : (N_SEGSIZE (x) + ((N_TXTADDR (x) + N_TXTSIZE (x) - 1) \ + & ~ (bfd_vma) (N_SEGSIZE (x) - 1)))) #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. */ @@ -228,21 +235,19 @@ struct external_exec for NMAGIC. */ #ifndef N_DATOFF -#define N_DATOFF(x) \ - (N_TXTOFF(x) + N_TXTSIZE(x)) +#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 /* Symbols */ diff --git a/contrib/binutils/include/aout/sun4.h b/contrib/binutils/include/aout/sun4.h index f42a0dd..623afc1 100644 --- a/contrib/binutils/include/aout/sun4.h +++ b/contrib/binutils/include/aout/sun4.h @@ -1,8 +1,24 @@ -/* SPARC-specific values for a.out files */ +/* SPARC-specific values for a.out files + + Copyright 2001 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Some systems, e.g., AIX, may have defined this in header files already included. */ -#undef TARGET_PAGE_SIZE +#undef TARGET_PAGE_SIZE #define TARGET_PAGE_SIZE 0x2000 /* 8K. aka NBPG in <sys/param.h> */ /* Note that some SPARCs have 4K pages, some 8K, some others. */ |