diff -Naur binutils-1.9-org/Makefile binutils-1.9/Makefile --- binutils-1.9-org/Makefile 1991-04-17 21:37:51.000000000 +0200 +++ binutils-1.9/Makefile 2006-12-10 14:48:05.000000000 +0100 @@ -26,11 +26,12 @@ # (particularly on COFF systems). #CC = cc -bindir=/usr/local/gnubin +#bindir=/usr/local/gnubin +bindir=/prog/osdev/linux-0.01-upd3_b/binbuild/bin # For BSD: # For SunOS 4.x, take out -DVPRINTF_MISSING. -CFLAGS = -g -DVPRINTF_MISSING +CFLAGS = -g #-DVPRINTF_MISSING # Don't add robotussin; it won't compile on BSD or GNU systems. # objdump is not here because it (at least used to) not compile # on most systems (trouble with N_DATADDR). Some of those problems diff -Naur binutils-1.9-org/a.out.gnu.h binutils-1.9/a.out.gnu.h --- binutils-1.9-org/a.out.gnu.h 1991-03-17 22:14:53.000000000 +0100 +++ binutils-1.9/a.out.gnu.h 2006-12-09 15:44:26.000000000 +0100 @@ -145,6 +145,9 @@ #define SEGMENT_SIZE PAGE_SIZE #endif +/* Address of data segment in memory after it is loaded. */ +#define SEGMENT_SIZE 1024 + #define _N_SEGMENT_ROUND(x) (((x) + SEGMENT_SIZE - 1) & ~(SEGMENT_SIZE - 1)) #define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text) diff -Naur binutils-1.9-org/ar.c binutils-1.9/ar.c --- binutils-1.9-org/ar.c 1991-03-17 06:36:41.000000000 +0100 +++ binutils-1.9/ar.c 2006-12-09 14:10:23.000000000 +0100 @@ -1986,8 +1986,8 @@ perror_with_name (name) char *name; { - extern int errno, sys_nerr; - extern char *sys_errlist[]; +// extern int errno, sys_nerr; +// extern char *sys_errlist[]; char *s; if (errno < sys_nerr) @@ -2001,8 +2001,8 @@ pfatal_with_name (name) char *name; { - extern int errno, sys_nerr; - extern char *sys_errlist[]; +// extern int errno, sys_nerr; +// extern char *sys_errlist[]; char *s; if (errno < sys_nerr) diff -Naur binutils-1.9-org/error.c binutils-1.9/error.c --- binutils-1.9-org/error.c 1990-11-03 15:30:00.000000000 +0100 +++ binutils-1.9/error.c 2006-12-09 14:15:36.000000000 +0100 @@ -18,6 +18,7 @@ /* David MacKenzie */ #include +#include #ifndef VPRINTF_MISSING @@ -49,8 +50,8 @@ strerror (errnum) int errnum; { - extern char *sys_errlist[]; - extern int sys_nerr; +// extern char *sys_errlist[]; +// extern int sys_nerr; if (errnum > 0 && errnum < sys_nerr) return sys_errlist[errnum]; diff -Naur binutils-1.9-org/gprof.c binutils-1.9/gprof.c --- binutils-1.9-org/gprof.c 1991-03-17 06:36:43.000000000 +0100 +++ binutils-1.9/gprof.c 2006-12-09 19:26:05.000000000 +0100 @@ -1,4 +1,4 @@ -/* `gprof', analyze gmon.out and print a profile. +/*n `gprof', analyze gmon.out and print a profile. Copyright (C) 1988 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -2313,7 +2313,7 @@ ret = HZ; #else nl[0].n_un.n_name="_hz"; - nlist ("/vmunix", &nl[0]); +// nlist ("/vmunix", &nl[0]); if (nl[0].n_type==0) fatal ("Can't find `%s' in namelist of /vmunix", nl[0].n_un.n_name); fp=ck_fopen ("/dev/kmem", "r"); @@ -2430,7 +2430,7 @@ { struct file_to_name *tail; - if(stream->_flag & _IOWRT) + // if(stream->_flag & _IOWRT) fflush (stream); if (ferror (stream)) fatal ("I/O error on `%s'", stream_name (stream)); diff -Naur binutils-1.9-org/ld.c binutils-1.9/ld.c --- binutils-1.9-org/ld.c 1991-03-29 21:29:40.000000000 +0100 +++ binutils-1.9/ld.c 2006-12-09 15:40:19.000000000 +0100 @@ -30,6 +30,7 @@ #ifndef sony_news #include #endif +#include #ifdef ns32000 struct relocation_info { /* Look for the default declaration in a.out.gnu.h for documentation. */ @@ -53,7 +54,7 @@ #ifdef COFF_ENCAPSULATE #include "a.out.encap.h" #else -#include +#include "a.out.gnu.h" #endif #endif @@ -5975,8 +5976,8 @@ perror_name (name) char *name; { - extern int errno, sys_nerr; - extern char *sys_errlist[]; +// extern int errno, sys_nerr; +// extern char *sys_errlist[]; char *s; if (errno < sys_nerr) @@ -5993,8 +5994,8 @@ perror_file (entry) struct file_entry *entry; { - extern int errno, sys_nerr; - extern char *sys_errlist[]; +// extern int errno, sys_nerr; +// extern char *sys_errlist[]; char *s; if (errno < sys_nerr) diff -Naur binutils-1.9-org/nm.c binutils-1.9/nm.c --- binutils-1.9-org/nm.c 1990-08-09 19:47:11.000000000 +0200 +++ binutils-1.9/nm.c 2006-12-09 14:13:52.000000000 +0100 @@ -14,11 +14,12 @@ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */ - + #include #include #include #include +#include #include "getopt.h" #if !defined(A_OUT) && !defined(MACH_O) @@ -246,7 +247,7 @@ void fatal (); void perror_name (); void print_file_name (); - + void main (argc, argv) char **argv; @@ -1138,8 +1139,8 @@ perror_name (name) char *name; { - extern int errno, sys_nerr; - extern char *sys_errlist[]; +// extern int errno, sys_nerr; +// extern char *sys_errlist[]; char *s; if (errno < sys_nerr) diff -Naur binutils-1.9-org/size.c binutils-1.9/size.c --- binutils-1.9-org/size.c 1990-07-10 09:38:02.000000000 +0200 +++ binutils-1.9/size.c 2006-12-09 17:43:57.000000000 +0100 @@ -19,6 +19,7 @@ #include #include #include +#include #if !defined(A_OUT) && !defined(MACH_O) #define A_OUT @@ -233,6 +234,9 @@ *bsize = hdr.a_bss; return 1; } + else + fprintf(stderr,"not magic %d\n",N_MAGIC(hdr)); + } #endif @@ -357,8 +361,8 @@ perror_name (name) char *name; { - extern int errno, sys_nerr; - extern char *sys_errlist[]; +// extern int errno, sys_nerr; +// extern char *sys_errlist[]; char *s; if (errno < sys_nerr) diff -Naur binutils-1.9-org/strip.c binutils-1.9/strip.c --- binutils-1.9-org/strip.c 1991-04-11 00:19:04.000000000 +0200 +++ binutils-1.9/strip.c 2006-12-09 14:14:55.000000000 +0100 @@ -21,7 +21,7 @@ #include #include #include -extern int errno; +//extern int errno; #include "getopt.h" #ifdef USG