From: Steve Chamberlain Date: Fri, 17 Apr 1992 16:22:44 +0000 (+0000) Subject: Fri Apr 17 09:15:31 1992 Steve Chamberlain (sac@thepub.cygnus.com) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e59320117ef2161f271698ede38593710bfe77f1;p=binutils-gdb.git Fri Apr 17 09:15:31 1992 Steve Chamberlain (sac@thepub.cygnus.com) * bfd.c, Makefile.in: added tekhex * aoutx.h (set_section_contents): pages should be padded to the size of a page, not the size of a segment. * configure.in: added go32 host and i386-aout target. * i386aout.c, libaout.h: now works for go32 target * ieee.c: fix bit rot. * seclet.c: support for padding seclet type. --- diff --git a/bfd/Makefile.dos b/bfd/Makefile.dos index b7bcacd91c8..54bdff62533 100644 --- a/bfd/Makefile.dos +++ b/bfd/Makefile.dos @@ -89,10 +89,10 @@ CFLAGS = -g -O $(HDEFINES) $(TDEFINES) $(CSEARCH) $(CSWITCHES) # -DINTEL960VERSI BFD_LIBS = libbfd.o opncls.o bfd.o archive.o targets.o cache.o \ archures.o core.o section.o format.o syms.o reloc.o init.o ctor.o seclet.o -BFD_MACHINES = cpu-h8300.o cpu-i960.o cpu-sparc.o cpu-m68k.o cpu-m88k.o \ - cpu-vax.o cpu-mips.o cpu-a29k.o cpu-i386.o cpu-rs6000.o +BFD_MACHINES = cpu-h8300.o -BFD_BACKENDS = ieee.o srec.o coff-h8300.o + +BFD_BACKENDS = ieee.o srec.o coff-h83.o @@ -113,10 +113,10 @@ BFD_H=$(INCDIR)/bfd.h CFILES = libbfd.c opncls.c bfd.c archive.c targets.c cache.c archures.c \ coff-i386.c aout64.c aout32.c sunos.c demo64.c coff-i960.c srec.c \ oasys.c ieee.c coff-m68k.c coff-a29k.c coff-rs6000.c \ - format.c section.c core.c syms.c stab-syms.c reloc.c init.c ctor.c seclet.c \ + format.c section.c core.c syms.c reloc.c init.c ctor.c seclet.c \ coff-m88k.c coff-mips.c trad-core.c newsos3.c i386aout.c bout.c elf.c \ cpu-h8300.c cpu-i960.c cpu-sparc.c cpu-m68k.c cpu-m88k.c \ - cpu-vax.c cpu-mips.c cpu-a29k.c cpu-i386.c cpu-rs6000.c coff-h8300.c + cpu-vax.c cpu-mips.c cpu-a29k.c cpu-i386.c cpu-rs6000.c coff-h83.c STAGESTUFF = $(TARGETLIB) $(OFILES) @@ -352,7 +352,7 @@ oasys.o : oasys.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/oasys.h liboasys.h ieee.o : ieee.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/ieee.h libieee.h -coff-h8300.o: coff-h8300.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \ +coff-h83.o: coff-h83.c $(INCDIR)/bfd.h $(INCDIR)/obstack.h libbfd.h \ $(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h libcoff.h coffcode.h format.o : format.c $(INCDIR)/bfd.h \ $(INCDIR)/obstack.h libbfd.h @@ -362,7 +362,7 @@ core.o : core.c $(INCDIR)/bfd.h \ $(INCDIR)/obstack.h libbfd.h syms.o : syms.c $(INCDIR)/bfd.h \ $(INCDIR)/obstack.h libbfd.h -syms.o : stab-syms.c + reloc.o : reloc.c $(INCDIR)/bfd.h \ $(INCDIR)/obstack.h libbfd.h diff --git a/bfd/hosts/go32.h b/bfd/hosts/go32.h index a5de5f98cb8..92d80bc490a 100644 --- a/bfd/hosts/go32.h +++ b/bfd/hosts/go32.h @@ -6,6 +6,7 @@ #include #include #include +#include #ifndef O_ACCMODE #define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR) #endif diff --git a/bfd/seclet.c b/bfd/seclet.c index 8deef00dec0..e03048847e0 100644 --- a/bfd/seclet.c +++ b/bfd/seclet.c @@ -42,7 +42,6 @@ DEFUN(bfd_new_seclet,(abfd, section), section->seclets_tail = n; return n; - } @@ -61,24 +60,16 @@ DEFUN(rel,(abfd, seclet, output_section), bfd_byte *data; if (output_section->flags & SEC_HAS_CONTENTS ) { - - data = bfd_get_relocated_section_contents(abfd, seclet); - - if(bfd_set_section_contents(abfd, - output_section, - data, - seclet->offset, - seclet->size) == false) - { - abort(); + data = bfd_get_relocated_section_contents(abfd, seclet); + if(bfd_set_section_contents(abfd, + output_section, + data, + seclet->offset, + seclet->size) == false) + { + abort(); + } } - -} - - - - - } void @@ -89,21 +80,29 @@ DEFUN(seclet_dump_seclet,(abfd, seclet, section), { switch (seclet->type) { - - case bfd_indirect_seclet: + case bfd_indirect_seclet: /* The contents of this section come from another one somewhere else */ rel(abfd, seclet, section); - - break; - - default: + case bfd_fill_seclet: + /* Fill in the section with us */ + { + char *d = malloc(seclet->size); + unsigned int i; + for (i =0; i < seclet->size; i+=2) { + d[i] = seclet->u.fill.value >> 8; + } + for (i = 1; i < seclet->size; i+=2) { + d[i] = seclet->u.fill.value ; + } + bfd_set_section_contents(abfd, section, d, seclet->offset, seclet->size); + + } + break; + default: abort(); } - - - } void @@ -122,8 +121,6 @@ DEFUN(seclet_dump,(abfd), seclet_dump_seclet(abfd, p, o); p = p ->next; } - o = o->next; } - }