diff options
author | K. Richard Pixley <rich@cygnus> | 1991-05-18 02:15:32 +0000 |
---|---|---|
committer | K. Richard Pixley <rich@cygnus> | 1991-05-18 02:15:32 +0000 |
commit | d1a9e594859320d99c9ff5730d90dc171594c8e0 (patch) | |
tree | d427cb9e19b0d3b246579dcfceedd50c0a2400ef | |
parent | 7dc139f16d3249ceddcd5cc18977db24511a0260 (diff) | |
download | gdb-d1a9e594859320d99c9ff5730d90dc171594c8e0.zip gdb-d1a9e594859320d99c9ff5730d90dc171594c8e0.tar.gz gdb-d1a9e594859320d99c9ff5730d90dc171594c8e0.tar.bz2 |
Buying into ../include and ../libiberty.
-rw-r--r-- | gas/Makefile.in | 92 | ||||
-rw-r--r-- | gas/config/ho-sunos.h | 3 | ||||
-rw-r--r-- | gas/config/obj-aout.h | 18 | ||||
-rw-r--r-- | gas/config/obj-bout.c | 2 | ||||
-rw-r--r-- | gas/config/obj-bout.h | 2 | ||||
-rw-r--r-- | gas/config/obj-coff.c | 46 | ||||
-rw-r--r-- | gas/config/obj-coff.h | 2 |
7 files changed, 84 insertions, 81 deletions
diff --git a/gas/Makefile.in b/gas/Makefile.in index 217f642..7d91bec 100644 --- a/gas/Makefile.in +++ b/gas/Makefile.in @@ -27,7 +27,7 @@ # See below for how to change them for certain systems. ALLOCA = -CFLAGS = -g $(XCFLAGS) # -I$(srcdir)/../include +CFLAGS = -g $(XCFLAGS) -I$(srcdir)/../include INTERNAL_CFLAGS = $(CROSS) OLDCC = cc BISON = bison @@ -81,10 +81,6 @@ mandir = $(prefix)/man/man$(manext) # Additional system libraries to link with. CLIB= -# Change this to a null string if obstacks are installed in the -# system library. -OBSTACK=obstack.o - # Specify the rule for actually making gnulib. GNULIB = gnulib.portable @@ -177,7 +173,6 @@ REAL_HEADERS = \ $(srcdir)/tc.h \ $(srcdir)/obj.h \ $(srcdir)/read.h \ - $(srcdir)/reloc.h \ $(srcdir)/struc-symbol.h \ $(srcdir)/subsegs.h \ $(srcdir)/symbols.h \ @@ -242,11 +237,6 @@ ALL_CFLAGS = $(INTERNAL_CFLAGS) $(CFLAGS) $(HDEFINES) $(TDEFINES) USE_ALLOCA= `if [ x"${CC}" = x"${OLDCC}" ] ; then echo ${ALLOCA}; else true; fi` USE_HOST_ALLOCA= `if [ x"${CC}" = x"${OLDCC}" ] ; then echo ${HOST_PREFIX}${ALLOCA}; else true; fi` -# Dependency on obstack, alloca, malloc or whatever library facilities -# are not installed in the system libraries. -# We don't use USE_ALLOCA because backquote expansion doesn't work in deps. -LIBDEPS= $(OBSTACK) $(ALLOCA) $(MALLOC) - # Likewise, for use in the tools that must run on this machine # even if we are cross-building GCC. # We don't use USE_ALLOCA because backquote expansion doesn't work in deps. @@ -254,7 +244,7 @@ HOST_LIBDEPS= $(HOST_PREFIX)$(OBSTACK) $(HOST_PREFIX)$(ALLOCA) $(HOST_PREFIX)$(M # How to link with both our special library facilities # and the system's installed libraries. -LIBS = $(OBSTACK) $(USE_ALLOCA) $(MALLOC) $(CLIB) +LIBS = $(CLIB) $(srcdir)/../libiberty`if [ -d $(srcdir)/libiberty.$(target) ] ; then echo .$(target) ; fi`$(subdir)/libiberty.a # Likewise, for use in the tools that must run on this machine # even if we are cross-building GCC. @@ -305,104 +295,94 @@ compilations: ${OBJS} # Compiling object files from source files. -# Note that dependencies on obstack.h are not written -# because that file is not part of GAS. - app.o : app.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h as.o : as.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h atof-generic.o : atof-generic.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h bignum-copy.o : bignum-copy.c as.h host.h \ targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h cond.o : cond.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ - obstack.h + debug.o : debug.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ subsegs.h expr.o : expr.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ - obstack.h + flonum-const.o : flonum-const.c flonum.h bignum.h flonum-copy.o : flonum-copy.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h flonum-mult.o : flonum-mult.c flonum.h bignum.h frags.o : frags.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ - subsegs.h obstack.h + subsegs.h hash.o : hash.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h hex-value.o : hex-value.c input-file.o : input-file.c as.h host.h \ targ-env.h obj-format.h targ-cpu.h \ - struc-symbol.h reloc.h write.h flonum.h bignum.h expr.h \ + struc-symbol.h write.h flonum.h bignum.h expr.h \ frags.h hash.h read.h symbols.h tc.h obj.h input-file.h input-scrub.o : input-scrub.c /usr/include/errno.h /usr/include/sys/errno.h \ as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ input-file.h messages.o : messages.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h -obstack.o : obstack.c obstack.h +obstack.o : obstack.c output-file.o : output-file.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ output-file.h read.o : read.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ - obstack.h + strstr.o : strstr.c subsegs.o : subsegs.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ - subsegs.h obstack.h + subsegs.h symbols.o : symbols.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ - obstack.h subsegs.h + subsegs.h version.o : version.c write.o : write.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h symbols.h tc.h obj.h \ - subsegs.h obstack.h output-file.h + subsegs.h output-file.h xmalloc.o : xmalloc.c xrealloc.o : xrealloc.c atof-targ.o : atof-targ.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h \ symbols.h tc.h obj.h obj-format.o : obj-format.c as.h host.h targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h \ - symbols.h tc.h obj.h obstack.h + symbols.h tc.h obj.h targ-cpu.o : targ-cpu.c targ-env.h obj-format.h \ - targ-cpu.h struc-symbol.h reloc.h \ + targ-cpu.h struc-symbol.h \ write.h flonum.h bignum.h expr.h frags.h hash.h read.h \ - symbols.h tc.h obj.h obstack.h - -# Normally this target is not used; but it is used if you -# define ALLOCA=alloca.o. In that case, you must get a suitable alloca.c -# from the GNU Emacs distribution. -# Note some machines won't allow $(CC) without -S on this source file. -alloca.o: alloca.c - $(CC) $(ALL_CFLAGS) $(CPPFLAGS) -S `echo $(srcdir)/alloca.c | sed 's,^\./,,'` - as alloca.s -o alloca.o + symbols.h tc.h obj.h + # Compile the libraries to be used by gen*. # If we are not cross-building, gen* use the same .o's that cc1 will use, @@ -508,7 +488,7 @@ bootstrap: as force $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as $(MAKE) stage2 $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as - for i in *.o; do cmp $$i stage2/$$i; done + $(MAKE) stage-last bootstrap2: force $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as @@ -518,7 +498,7 @@ bootstrap2: force bootstrap3: force $(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as - $(MAKE) comparison + $(MAKE) stage-last # Copy the object files from a particular stage into a subdirectory. stage1: force diff --git a/gas/config/ho-sunos.h b/gas/config/ho-sunos.h index 13d5c3d..5d920f6 100644 --- a/gas/config/ho-sunos.h +++ b/gas/config/ho-sunos.h @@ -2,9 +2,10 @@ #ifndef __STDC__ #define NO_STDARG -#include <memory.h> #endif /* not __STDC__ */ +#include <memory.h> + #include <ctype.h> #include <string.h> diff --git a/gas/config/obj-aout.h b/gas/config/obj-aout.h index 602d760..d2152db 100644 --- a/gas/config/obj-aout.h +++ b/gas/config/obj-aout.h @@ -30,6 +30,24 @@ to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "a_out.h" #endif +struct reloc_info_generic +{ + unsigned long r_address; +/* + * Using bit fields here is a bad idea because the order is not portable. :-( + */ + unsigned int r_index; +#define r_symbolnum r_index + unsigned r_extern : 1; + unsigned r_pcrel:1; + unsigned r_length:2; /* 0=>byte 1=>short 2=>long 3=>8byte */ + unsigned r_bsr:1; /* NS32K */ + unsigned r_disp:1; /* NS32k */ + unsigned r_callj:1; /* i960 */ + enum reloc_type r_type; + long r_addend; +}; + extern const short seg_N_TYPE[]; extern const segT N_TYPE_seg[]; diff --git a/gas/config/obj-bout.c b/gas/config/obj-bout.c index 314edcc..846175f 100644 --- a/gas/config/obj-bout.c +++ b/gas/config/obj-bout.c @@ -113,7 +113,7 @@ char **where; fixS *fixP; /* Fixup chain for this segment. */ relax_addressT segment_address_in_file; { - struct reloc_info_generic ri; + struct relocation_info ri; register symbolS * symbolP; /* If a machine dependent emitter is needed, call it instead. */ diff --git a/gas/config/obj-bout.h b/gas/config/obj-bout.h index 5ba18f1..67e866a 100644 --- a/gas/config/obj-bout.h +++ b/gas/config/obj-bout.h @@ -205,7 +205,7 @@ struct relocation_info { /* Accessors */ /* The value of the symbol */ -#define S_GET_VALUE(s) ((long) ((s)->sy_symbol.n_value)) +#define S_GET_VALUE(s) ((unsigned long) ((s)->sy_symbol.n_value)) /* The name of the symbol */ #define S_GET_NAME(s) ((s)->sy_symbol.n_un.n_name) /* The pointer to the string table */ diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c index ef48334..707b2c8 100644 --- a/gas/config/obj-coff.c +++ b/gas/config/obj-coff.c @@ -129,18 +129,22 @@ const pseudo_typeS obj_pseudo_table[] = { { "val", s_ignore, 0 }, #endif /* ignore debug */ + { "ident", s_ignore, 0 }, /* we don't yet handle this. */ + + /* stabs aka a.out aka b.out directives for debug symbols. - Currently ignored silently. Except for .line which we - guess at from context. */ + Currently ignored silently. Except for .line at which + we guess from context. */ { "desc", s_ignore, 0 }, /* def */ /* { "line", s_ignore, 0 }, */ /* source code line number */ { "stabd", obj_coff_stab, 'd' }, /* stabs */ { "stabn", obj_coff_stab, 'n' }, /* stabs */ { "stabs", obj_coff_stab, 's' }, /* stabs */ + /* stabs-in-coff (?) debug pseudos (ignored) */ + { "optim", s_ignore, 0 }, /* For sun386i cc (?) */ /* other stuff */ { "ABORT", s_abort, 0 }, - { "ident", s_ignore, 0 }, { NULL} /* end sentinel */ }; /* obj_pseudo_table */ @@ -249,7 +253,7 @@ object_headers *headers; { tc_headers_hook(headers); -#ifdef CROSS_ASSEMBLE +#ifdef CROSS_COMPILE /* Eventually swap bytes for cross compilation for file header */ md_number_to_chars(*where, headers->filehdr.f_magic, sizeof(headers->filehdr.f_magic)); *where += sizeof(headers->filehdr.f_magic); @@ -286,14 +290,14 @@ object_headers *headers; *where += sizeof(headers->aouthdr.data_start); #endif /* OBJ_COFF_OMIT_OPTIONAL_HEADER */ -#else /* CROSS_ASSEMBLE */ +#else /* CROSS_COMPILE */ append(where, (char *) &headers->filehdr, sizeof(headers->filehdr)); #ifndef OBJ_COFF_OMIT_OPTIONAL_HEADER append(where, (char *) &headers->aouthdr, sizeof(headers->aouthdr)); #endif /* OBJ_COFF_OMIT_OPTIONAL_HEADER */ -#endif /* CROSS_ASSEMBLE */ +#endif /* CROSS_COMPILE */ /* Output the section headers */ c_section_header_append(where, &text_section_header); @@ -312,7 +316,7 @@ symbolS *symbolP; char numaux = syment->n_numaux; unsigned short type = S_GET_DATA_TYPE(symbolP); -#ifdef CROSS_ASSEMBLE +#ifdef CROSS_COMPILE md_number_to_chars(*where, syment->n_value, sizeof(syment->n_value)); *where += sizeof(syment->n_value); md_number_to_chars(*where, syment->n_scnum, sizeof(syment->n_scnum)); @@ -323,9 +327,9 @@ symbolS *symbolP; *where += sizeof(syment->n_sclass); md_number_to_chars(*where, syment->n_numaux, sizeof(syment->n_numaux)); *where += sizeof(syment->n_numaux); -#else /* CROSS_ASSEMBLE */ +#else /* CROSS_COMPILE */ append(where, (char *) syment, sizeof(*syment)); -#endif /* CROSS_ASSEMBLE */ +#endif /* CROSS_COMPILE */ /* Should do the following : if (.file entry) MD(..)... else if (static entry) MD(..) */ if (numaux > OBJ_COFF_MAX_AUXENTRIES) { @@ -333,7 +337,7 @@ symbolS *symbolP; } /* too many auxents */ for (i = 0; i < numaux; ++i) { -#ifdef CROSS_ASSEMBLE +#ifdef CROSS_COMPILE #if 0 /* This code has never been tested */ /* The most common case, x_sym entry. */ if ((SF_GET(symbolP) & (SF_FILE | SF_STATICS)) == 0) { @@ -372,9 +376,9 @@ symbolS *symbolP; *where += sizeof(auxP->x_scn.x_nlinno); } #endif /* 0 */ -#else /* CROSS_ASSEMBLE */ +#else /* CROSS_COMPILE */ append(where, (char *) &symbolP->sy_symbol.ost_auxent[i], sizeof(symbolP->sy_symbol.ost_auxent[i])); -#endif /* CROSS_ASSEMBLE */ +#endif /* CROSS_COMPILE */ }; /* for each aux in use */ @@ -385,7 +389,7 @@ static void c_section_header_append(where, header) char **where; SCNHDR *header; { -#ifdef CROSS_ASSEMBLE +#ifdef CROSS_COMPILE md_number_to_chars(*where, header->s_paddr, sizeof(header->s_paddr)); *where += sizeof(header->s_paddr); @@ -413,11 +417,11 @@ SCNHDR *header; md_number_to_chars(*where, header->s_flags, sizeof(header->s_flags)); *where += sizeof(header->s_flags); -#else /* CROSS_ASSEMBLE */ +#else /* CROSS_COMPILE */ append(where, (char *) header, sizeof(*header)); -#endif /* CROSS_ASSEMBLE */ +#endif /* CROSS_COMPILE */ return; } /* c_section_header_append() */ @@ -650,15 +654,15 @@ char *file_start; /* No matter which member of the union we process, they are both long. */ -#ifdef CROSS_ASSEMBLE +#ifdef CROSS_COMPILE md_number_to_chars(*where, line_entry->l_addr.l_paddr, sizeof(line_entry->l_addr.l_paddr)); *where += sizeof(line_entry->l_addr.l_paddr); md_number_to_chars(*where, line_entry->l_lnno, sizeof(line_entry->l_lnno)); *where += sizeof(line_entry->l_lnno); -#else /* CROSS_ASSEMBLE */ +#else /* CROSS_COMPILE */ append(where, (char *) line_entry, LINESZ); -#endif /* CROSS_ASSEMBLE */ +#endif /* CROSS_COMPILE */ } /* for each line number */ @@ -1538,13 +1542,13 @@ char **where; { symbolS *symbolP; -#ifdef CROSS_ASSEMBLE +#ifdef CROSS_COMPILE /* Gotta do md_ byte-ordering stuff for string_byte_count first - KWK */ md_number_to_chars(*where, string_byte_count, sizeof(string_byte_count)); where += sizeof(string_byte_count); -#else /* CROSS_ASSEMBLE */ +#else /* CROSS_COMPILE */ append(where, (char *) &string_byte_count, (unsigned long) sizeof(string_byte_count)); -#endif /* CROSS_ASSEMBLE */ +#endif /* CROSS_COMPILE */ for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next(symbolP)) { if (SF_GET_STRING(symbolP)) { diff --git a/gas/config/obj-coff.h b/gas/config/obj-coff.h index 6ed5c84..8ee3fe7 100644 --- a/gas/config/obj-coff.h +++ b/gas/config/obj-coff.h @@ -162,7 +162,7 @@ typedef struct { /* The zeroes if symbol name is longer than 8 chars */ #define S_GET_ZEROES(s) ((s)->sy_symbol.ost_entry.n_zeroes) /* The value of the symbol */ -#define S_GET_VALUE(s) ((s)->sy_symbol.ost_entry.n_value) +#define S_GET_VALUE(s) ((unsigned) ((s)->sy_symbol.ost_entry.n_value)) /* The numeric value of the segment */ #define S_GET_SEGMENT(s) (N_TYPE_seg[(s)->sy_symbol.ost_entry.n_scnum+4]) /* The data type */ |