diff options
author | Steve Chamberlain <steve@cygnus> | 1991-05-18 02:57:45 +0000 |
---|---|---|
committer | Steve Chamberlain <steve@cygnus> | 1991-05-18 02:57:45 +0000 |
commit | 19b03b7aa4dd0eccffab131fd91495ef122fccc7 (patch) | |
tree | 0831b76b569fdb6121b914d3e941b5d15a3a4188 /ld | |
parent | f827120d4545a08c8e8edb25d4ec5b50d694912b (diff) | |
download | gdb-19b03b7aa4dd0eccffab131fd91495ef122fccc7.zip gdb-19b03b7aa4dd0eccffab131fd91495ef122fccc7.tar.gz gdb-19b03b7aa4dd0eccffab131fd91495ef122fccc7.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'ld')
-rw-r--r-- | ld/Makefile.in | 25 | ||||
-rwxr-xr-x | ld/config/hmake-sun4 | 2 | ||||
-rwxr-xr-x | ld/ldgld960.c | 6 | ||||
-rwxr-xr-x | ld/ldlnk960.c | 2 | ||||
-rw-r--r-- | ld/ldsym.c | 62 |
5 files changed, 47 insertions, 50 deletions
diff --git a/ld/Makefile.in b/ld/Makefile.in index 1e93cfa..37136c1 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -40,11 +40,6 @@ LINTFLAGS = $(INCLUDES) $(EXTRA_DEF) .SUFFIXES: .y .x .script $(SUFFIXES) -.y.o: - $(YACC) $< - mv y.tab.c ldgram.tab.c - $(CC) -c $(CFLAGS) ldgram.tab.c - mv ldgram.tab.o ldgram.o # go directly to ld.new in case this ld isn't capable of # linking native object on this host. It can be renamed on @@ -73,10 +68,10 @@ LDCSOURCES=ldlang.c ldmain.c ldwrite.c ldlnk960.c ldgld.c ldgld68k.c \ ldgldm88kbcs.c \ ldgld960.c ldemul.c ldver.c ldmisc.c ldexp.c ldsym.c ldfile.c ldvanilla.c -GENERATED_SOURCES=ldgram.tab.c ldlex.c ldgram.tab.h y.tab.h -GENERATED_HEADERS=ldgram.tab.h +GENERATED_SOURCES=ldgramtb.c ldlex.c ldgramtb.h +GENERATED_HEADERS=ldgramtb.h -LDSOURCES=$(LDCSOURCES) ldgram.y ldlex.l +LDSOURCES=$(LDCSOURCES) ldgram.y ldlex.l ldgramtb.h BFDSOURCES=../../bfd/common/*.c @@ -89,6 +84,13 @@ all: Makefile $(PROCESSED_SCRIPTS) $(LD_PROG) $(PROCESSED_SCRIPTS): mkscript $(SCRIPTS) +ldgramtb.o ldgramtb.h:ldgram.y + $(YACC) $< + mv y.tab.c ldgramtb.c + mv y.tab.h ldgramtb.h + $(CC) -c $(CFLAGS) ldgramtb.c + mv ldgramtb.o ldgram.o + #$(BFDLIB): $(BFDSOURCES) # (cd ../bfd; make) @@ -116,9 +118,6 @@ ld.dvi:ld.tex mkscript: mkscript.c -ldgram.o: ldgram.y -ldgram.tab.h:ldgram.y - cp y.tab.h ldgram.tab.h ldgld.o: $(PROCESSED_SCRIPTS) ldgld.c @@ -186,7 +185,7 @@ lintlog:$(SOURCES) Makefile tags TAGS:$(SOURCES) $(HEADERS) - etags -t $(SOURCES) $(HEADERS) + etags -t $? release: (cd /4/steve/ld; tar cf - $(LDSOURCES) $(HEADERS) $(MANSOURCES)) | tar xf - @@ -220,7 +219,7 @@ roll: echo Version $$V -dep: $(LDSOURCES) $(PROCESSED_SCRIPTS) +dep: $(LDSOURCES) $(PROCESSED_SCRIPTS) mkdep $(CFLAGS) $? # Dummy target to force execution of dependent targets. diff --git a/ld/config/hmake-sun4 b/ld/config/hmake-sun4 index 9c7fb77..b53bfde 100755 --- a/ld/config/hmake-sun4 +++ b/ld/config/hmake-sun4 @@ -3,6 +3,6 @@ YACC=yacc -tvd #CC=gcc -Wall -ansi #stuff for self hosting HOSTING_CRT0=/lib/crt0.o -HOSTING_LIBS=/limbo/latest/=sun4/lib/gcc/sparc/1.92/gnulib -lc +HOSTING_LIBS=/limbo/latest/=sun4/lib/gcc/sparc/1.93/gnulib -lc HOSTING_EMU=LDEMULATION=gld; export LDEMULATION diff --git a/ld/ldgld960.c b/ld/ldgld960.c index 7e7e6e0..bdb1c7b 100755 --- a/ld/ldgld960.c +++ b/ld/ldgld960.c @@ -108,9 +108,7 @@ gld960_before_allocation() static void gld960_set_output_arch() { - /* Set the output architecture and machine if possible */ - unsigned long machine = 0; - bfd_set_arch_mach(output_bfd, ldfile_output_architecture, machine); + bfd_set_arch_mach(output_bfd, ldfile_output_architecture, bfd_mach_i960_core); } static char * @@ -119,7 +117,7 @@ gld960_choose_target() #ifdef GNU960 output_filename = "b.out"; - return bfd_make_targ_name(BFD_BOUT_FORMAT,HOST_BYTE_ORDER_BIG_P); + return bfd_make_targ_name(BFD_BOUT_FORMAT, 0); #else diff --git a/ld/ldlnk960.c b/ld/ldlnk960.c index f7f7259..ea4df26 100755 --- a/ld/ldlnk960.c +++ b/ld/ldlnk960.c @@ -244,7 +244,7 @@ lnk960_choose_target() { #ifdef GNU960 - return bfd_make_targ_name(BFD_COFF_FORMAT,HOST_BYTE_ORDER_BIG_P); + return bfd_make_targ_name(BFD_COFF_FORMAT, 0); #else @@ -98,7 +98,7 @@ DEFUN(ldsym_get,(key), /* Nothing was found; create a new symbol table entry. */ - bp = (ldsym_type *) ldmalloc (sizeof (ldsym_type)); + bp = (ldsym_type *) ldmalloc ((bfd_size_type)(sizeof (ldsym_type))); bp->srefs_chain = (asymbol **)NULL; bp->sdefs_chain = (asymbol **)NULL; bp->scoms_chain = (asymbol **)NULL; @@ -149,9 +149,9 @@ list_file_locals (entry) lang_input_statement_type *entry; { asymbol **q; - fprintf (stderr, "\nLocal symbols of "); + printf ( "\nLocal symbols of "); info("%I", entry); - fprintf (stderr, ":\n\n"); + printf (":\n\n"); if (entry->asymbols) { for (q = entry->asymbols; *q; q++) { @@ -169,21 +169,21 @@ static void print_file_stuff(f) lang_input_statement_type *f; { - fprintf (stderr, " %s", f->filename); - fprintf (stderr, " "); + fprintf (stdout, " %s", f->filename); + fprintf (stdout, " "); if (f->just_syms_flag) { - fprintf (stderr, " symbols only\n"); + fprintf (stdout, " symbols only\n"); } else { asection *s; - if (option_longmap) { + if (true || option_longmap) { for (s = f->the_bfd->sections; s != (asection *)NULL; s = s->next) { - fprintf (stderr, "%08lx %08x 2**%2ud %s\n", - s->output_offset, + print_address(s->output_offset); + printf ( "%08x 2**%2ud %s\n", (unsigned)s->size, s->alignment_power, s->name); } } @@ -191,12 +191,11 @@ lang_input_statement_type *f; for (s = f->the_bfd->sections; s != (asection *)NULL; s = s->next) { - fprintf (stderr, "%s %lx(%x) ", - s->name, - s->output_offset, - (unsigned) s->size); + printf("%s ", s->name); + print_address(s->output_offset); + printf("(%x)", (unsigned)s->size); } - fprintf (stderr, "hex \n"); + printf("hex \n"); } } } @@ -204,11 +203,11 @@ lang_input_statement_type *f; void ldsym_print_symbol_table () { - fprintf (stderr, "\nFiles:\n\n"); + fprintf (stdout, "\nFiles:\n\n"); lang_for_each_file(print_file_stuff); - fprintf (stderr, "\nGlobal symbols:\n\n"); + fprintf (stdout, "\nGlobal symbols:\n\n"); { register ldsym_type *sp; @@ -218,41 +217,42 @@ ldsym_print_symbol_table () { asymbol *defsym = *(sp->sdefs_chain); asection *defsec = bfd_get_section(defsym); - fprintf(stderr,"%08lx ",defsym->value); + print_address(defsym->value); if (defsec) { - fprintf(stderr,"%08lx ",defsym->value+defsec->vma); - fprintf(stderr, - "%7s", + print_space(); + print_address(defsym->value+defsec->vma); + printf("%7s", bfd_section_name(output_bfd, defsec)); } else { - fprintf(stderr," ......."); + printf(" ......."); } } else { - fprintf(stderr,"undefined"); + printf("undefined"); } if (sp->scoms_chain) { - fprintf(stderr, " common size %5lu %s", - (*(sp->scoms_chain))->value, sp->name); + printf(" common size "); + print_address((*(sp->scoms_chain))->value); + printf("%s ",sp->name); } if (sp->sdefs_chain) { - fprintf(stderr, " symbol def %08lx %s", - (*(sp->sdefs_chain))->value, - sp->name); + printf(" symbol def "); + print_address((*(sp->sdefs_chain))->value); + printf("%s ",sp->name); } else { - fprintf(stderr, " undefined %s", - sp->name); + printf(" undefined "); + printf("%s ",sp->name); } - fprintf(stderr, "\n"); + print_nl(); } } @@ -414,7 +414,7 @@ ldsym_write() extern unsigned int total_symbols_seen; asymbol ** symbol_table = (asymbol **) - ldmalloc ((size_t)(global_symbol_count + + ldmalloc ((bfd_size_type)(global_symbol_count + total_files_seen + total_symbols_seen + 1) * sizeof (asymbol *)); asymbol ** tablep = write_file_locals(symbol_table); |