This is the mail archive of the gas2@sourceware.cygnus.com mailing list for the gas2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patches to BFD, GAS, and LD


Since I didn't get any response to the patches I submitted a few
weeks ago (and they weren't incorporated), here they are again, 
updated to the latest gas snapshot (gas-950621).
Note that there are patches for BFD, GAS, and LD in this message,
as well as a patch to the top-level config.sub file.  They are all
extremely simple and should not cause any merging problems.

Please confirm when these are merged into the main tree.
Thanks!
                              Bryan

diff -crN gas-950621-old/bfd/ChangeLog gas-950621/bfd/ChangeLog
*** gas-950621-old/bfd/ChangeLog	Wed Jun 21 02:18:53 1995
--- gas-950621/bfd/ChangeLog	Wed Jun 21 16:15:39 1995
***************
*** 295,300 ****
--- 295,304 ----
  	(TARGET_LITTLE_SYM, TARGET_LITTLE_NAME): Define, to provide little
  	endian support.
  
+ Sun May  7 11:53:41 MDT 1995  Bryan Ford  <baford@cs.utah.edu>
+ 
+ 	* config/i386-moss.mt: created.
+ 
  Tue May  2 16:32:24 1995  Jeff Law  (law@snake.cs.utah.edu)
  
  	* config.bfd (hppa*-*-lites*): Treat just like hppa*-*-*elf*.
diff -crN gas-950621-old/bfd/bfd-in2.h gas-950621/bfd/bfd-in2.h
*** gas-950621-old/bfd/bfd-in2.h	Wed Jun 21 02:18:57 1995
--- gas-950621/bfd/bfd-in2.h	Wed Jun 21 15:23:50 1995
***************
*** 2094,2100 ****
    bfd_target_srec_flavour,
    bfd_target_som_flavour,
    bfd_target_os9k_flavour,
!   bfd_target_versados_flavour
  };
  
   /* Forward declaration.  */
--- 2094,2101 ----
    bfd_target_srec_flavour,
    bfd_target_som_flavour,
    bfd_target_os9k_flavour,
!   bfd_target_versados_flavour,
!   bfd_target_msdos_flavour
  };
  
   /* Forward declaration.  */
diff -crN gas-950621-old/bfd/config/i386-moss.mt gas-950621/bfd/config/i386-mos
s.mt
*** gas-950621-old/bfd/config/i386-moss.mt	Wed Dec 31 17:00:00 1969
--- gas-950621/bfd/config/i386-moss.mt	Wed Jun 21 15:17:37 1995
***************
*** 0 ****
--- 1,5 ----
+ # Target:  Intel 386 running MOSS (Mach-based DOS extender)
+ 
+ DEFAULT_VECTOR=bfd_elf32_i386_vec
+ SELECT_VECS=i386msdos_vec i386aout_vec
+ SELECT_ARCHITECTURES=bfd_i386_arch
diff -crN gas-950621-old/bfd/config/i386-msdos.mt gas-950621/bfd/config/i386-ms
dos.mt
*** gas-950621-old/bfd/config/i386-msdos.mt	Mon Feb  6 01:31:54 1995
--- gas-950621/bfd/config/i386-msdos.mt	Wed Jun 21 15:17:38 1995
***************
*** 1,5 ****
  # Target:  Intel 386 running DOS
! 
! DEFAULT_VECTOR=i386msdos_vec
! SELECT_VECS=i386aout_vec
  SELECT_ARCHITECTURES=bfd_i386_arch
--- 1,8 ----
  # Target:  Intel 386 running DOS
! # Use a.out as the default vector,
! # because that's what we want to use for everything but linking
! # (i.e. for object files and libraries and all that).
! # Producing the final executable in MS-DOS format is handled by the linker.
! DEFAULT_VECTOR=i386aout_vec
! SELECT_VECS=i386msdos_vec
  SELECT_ARCHITECTURES=bfd_i386_arch
diff -crN gas-950621-old/bfd/config.bfd gas-950621/bfd/config.bfd
*** gas-950621-old/bfd/config.bfd	Wed Jun 21 02:18:56 1995
--- gas-950621/bfd/config.bfd	Wed Jun 21 15:17:38 1995
***************
*** 66,72 ****
    i[345]86-*-mach*)	bfd_name=i386-mach3 strip_underscore=yes ;;
    i[345]86-*-osf1mk*)	bfd_name=i386-mach3 strip_underscore=yes ;;
    i[345]86-*-os9k)	bfd_name=i386-os9k ;;
!   i[345]86-*-msdos)	bfd_name=i386-msdos ;;
    i[345]86-*-winnt)	bfd_name=i386-pe ;;
    i[345]86-*-pe)	bfd_name=i386-pe ;;
    i[345]86-none-*)	bfd_name=i386-coff ;;
--- 66,73 ----
    i[345]86-*-mach*)	bfd_name=i386-mach3 strip_underscore=yes ;;
    i[345]86-*-osf1mk*)	bfd_name=i386-mach3 strip_underscore=yes ;;
    i[345]86-*-os9k)	bfd_name=i386-os9k ;;
!   i[345]86-*-msdos*)	bfd_name=i386-msdos ;;
!   i[345]86-*-moss*)	bfd_name=i386-moss ;;
    i[345]86-*-winnt)	bfd_name=i386-pe ;;
    i[345]86-*-pe)	bfd_name=i386-pe ;;
    i[345]86-none-*)	bfd_name=i386-coff ;;
diff -crN gas-950621-old/bfd/i386msdos.c gas-950621/bfd/i386msdos.c
*** gas-950621-old/bfd/i386msdos.c	Fri Jun  9 18:05:53 1995
--- gas-950621/bfd/i386msdos.c	Wed Jun 21 15:27:06 1995
***************
*** 95,101 ****
    /* Find the total size of the program on disk and in memory.  */
    for (sec = abfd->sections; sec != (asection *) NULL; sec = sec->next)
      {
- printf("section %s: vma 0x%x size 0x%x\n", sec->name, sec->vma, sec->
_raw_size);
        if (bfd_get_section_flags (abfd, sec) & SEC_ALLOC)
          {
  	  bfd_vma sec_vma = bfd_get_section_vma (abfd, sec)
--- 95,100 ----
***************
*** 161,169 ****
  
    section->filepos = EXE_PAGE_SIZE + bfd_get_section_vma (abfd, section);
  
!   if (bfd_seek (abfd, (file_ptr) (section->filepos + offset), SEEK_SET) != 0
!       || bfd_write (location, 1, count, abfd) != count)
!     return false;
  
    return true;
  }
--- 160,171 ----
  
    section->filepos = EXE_PAGE_SIZE + bfd_get_section_vma (abfd, section);
  
!   if (bfd_get_section_flags (abfd, section) & SEC_LOAD)
!     {
!       if (bfd_seek (abfd, (file_ptr) (section->filepos + offset), SEEK_SET) 
!= 0
!           || bfd_write (location, 1, count, abfd) != count)
!         return false;
!     }
  
    return true;
  }
***************
*** 184,189 ****
--- 186,192 ----
  #define msdos_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
  #define msdos_bfd_link_add_symbols _bfd_generic_link_add_symbols
  #define msdos_bfd_final_link _bfd_generic_final_link
+ #define msdos_bfd_link_split_section _bfd_generic_link_split_section
  #define msdos_set_arch_mach _bfd_generic_set_arch_mach
  
  #define msdos_get_symtab_upper_bound _bfd_nosymbols_get_symtab_upper_bound
diff -crN gas-950621-old/config.sub gas-950621/config.sub
*** gas-950621-old/config.sub	Wed Jun 21 02:25:56 1995
--- gas-950621/config.sub	Wed Jun 21 15:17:38 1995
***************
*** 801,807 ****
  	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  	      | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[345]* \
  	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
! 	      | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
  	      | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
  	      | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
  	      | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix*  | -lites* \
--- 801,807 ----
  	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  	      | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[345]* \
  	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
! 	      | -amigados* | -msdos* | -moss* | -newsos* | -unicos* | -aos* \
  	      | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
  	      | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
  	      | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix*  | -lites* \
diff -crN gas-950621-old/gas/ChangeLog gas-950621/gas/ChangeLog
*** gas-950621-old/gas/ChangeLog	Wed Jun 21 02:22:30 1995
--- gas-950621/gas/ChangeLog	Wed Jun 21 15:17:38 1995
***************
*** 610,615 ****
--- 610,619 ----
  	* config/obj-elf.h (OUTPUT_FLAVOR): Define.
  
  
+ Sun May  7 11:53:41 MDT 1995  Bryan Ford  <baford@cs.utah.edu>
+ 
+ 	* configure.in: Added i386-*-moss* target.
+ 
  Thu Apr 27 20:07:33 1995  Doug Evans  <dje@canuck.cygnus.com>
  
  	* Makefile.in (RUNTEST): Use one in srcdir if present.
diff -crN gas-950621-old/gas/configure gas-950621/gas/configure
*** gas-950621-old/gas/configure	Wed Jun 21 02:22:32 1995
--- gas-950621/gas/configure	Wed Jun 21 15:17:39 1995
***************
*** 702,707 ****
--- 702,708 ----
        i386-*-mach*)
  			    fmt=aout em=mach bfd_gas=yes ;;
        i386-*-msdos*)        fmt=aout ;;
+       i386-*-moss*)	    fmt=elf ;;
        i386-*-pe)            fmt=coff targ=i386coff em=pe ;;
        i386-*-*nt)           fmt=coff targ=i386coff em=pe ;;
        i960-*-bout)          fmt=bout ;;
diff -crN gas-950621-old/gas/configure.in gas-950621/gas/configure.in
*** gas-950621-old/gas/configure.in	Wed Jun 21 02:22:31 1995
--- gas-950621/gas/configure.in	Wed Jun 21 15:17:39 1995
***************
*** 175,180 ****
--- 175,181 ----
        i386-*-mach*)
  			    fmt=aout em=mach bfd_gas=yes ;;
        i386-*-msdos*)        fmt=aout ;;
+       i386-*-moss*)	    fmt=elf ;;
        i386-*-pe)            fmt=coff targ=i386coff em=pe ;;
        i386-*-*nt)           fmt=coff targ=i386coff em=pe ;;
        i960-*-bout)          fmt=bout ;;
diff -crN gas-950621-old/ld/ChangeLog gas-950621/ld/ChangeLog
*** gas-950621-old/ld/ChangeLog	Wed Jun 21 02:25:02 1995
--- gas-950621/ld/ChangeLog	Wed Jun 21 15:17:39 1995
***************
*** 108,113 ****
--- 108,122 ----
  
  	* configure.in (hppa*-*-lites*): Handle like hppa*-*-*elf*.
  
+ Sun May  7 11:53:41 MDT 1995  Bryan Ford  <baford@cs.utah.edu>
+ 
+ 	* configure.in (i386-*-msdos*, i386-*-moss*): New targets.
+ 	* Makefile.in (ALL_EMULATIONS): Added i386msdos.o.
+ 	(i386msdos.o): New target.
+ 	* config/i386-msdos.mt: Created.
+ 	* emulparams/i386msdos.sh: Created.
+ 	* scripttempl/i386msdos.sc: Created.
+ 
  Mon Apr 24 19:21:02 1995  Michael Meissner  <meissner@cygnus.com>
  
  	* ldwrite.c (ldwrite): Before doing anything, reset the error
diff -crN gas-950621-old/ld/Makefile.in gas-950621/ld/Makefile.in
*** gas-950621-old/ld/Makefile.in	Wed Jun 21 02:25:03 1995
--- gas-950621/ld/Makefile.in	Wed Jun 21 15:17:39 1995
***************
*** 201,206 ****
--- 201,207 ----
  	eh8300h.o eh8500.o eh8500b.o eh8500c.o eh8500m.o eh8500s.o \
  	ehp300bsd.o ehp3hpux.o ehppaelf.o ei386aout.o ei386bsd.o \
  	ei386coff.o ei386go32.o ei386linux.o ei386lynx.o ei386mach.o \
+ 	ei386moss.o ei386msdos.o \
  	ei386nbsd.o ei386nw.o elnk960.o em68kaout.o em68kcoff.o em68kelf.o \
  	em68klynx.o em68knbsd.o em88kbcs.o emipsbig.o emipsbsd.o \
  	emipsidt.o emipsidtl.o emipslit.o enews.o ens32knbsd.o eppcnw.o \
***************
*** 319,324 ****
--- 320,331 ----
  ei386mach.c: $(srcdir)/emulparams/i386mach.sh \
    $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
  	${GENSCRIPTS} i386mach
+ ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
+   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ 	${GENSCRIPTS} i386moss
+ ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
+   $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386msdos.sc 
${GEN_DEPENDS}
+ 	${GENSCRIPTS} i386msdos
  eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
    $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc 
${GEN_DEPENDS}
  	${GENSCRIPTS} ebmon29k
diff -crN gas-950621-old/ld/config/i386-moss.mt gas-950621/ld/config/i386-moss.
mt
*** gas-950621-old/ld/config/i386-moss.mt	Wed Dec 31 17:00:00 1969
--- gas-950621/ld/config/i386-moss.mt	Wed Jun 21 15:17:39 1995
***************
*** 0 ****
--- 1,2 ----
+ EMUL=i386moss
+ EMUL_EXTRA1=i386msdos
diff -crN gas-950621-old/ld/config/i386-msdos.mt gas-950621/ld/config/i386-msdo
s.mt
*** gas-950621-old/ld/config/i386-msdos.mt	Wed Dec 31 17:00:00 1969
--- gas-950621/ld/config/i386-msdos.mt	Wed Jun 21 15:17:39 1995
***************
*** 0 ****
--- 1,2 ----
+ EMUL=i386msdos
+ EMUL_EXTRA1=i386aout
diff -crN gas-950621-old/ld/configure.in gas-950621/ld/configure.in
*** gas-950621-old/ld/configure.in	Wed Jun 21 02:25:02 1995
--- gas-950621/ld/configure.in	Wed Jun 21 15:18:22 1995
***************
*** 81,86 ****
--- 81,88 ----
    i[345]86-*-sysv*)	ld_target=i386-coff ;;
    i[345]86-*-mach*)	ld_target=i386-mach ;;
    i[345]86-*-gnu*)	ld_target=i386-gelf ;;
+   i[345]86-*-msdos*)	ld_target=i386-msdos ;;
+   i[345]86-*-moss*)	ld_target=i386-moss ;;
    i[345]86-*-winnt)	ld_target=i386-pe ;;
    i[345]86-*-pe)	ld_target=i386-pe ;;
    m8*-*-*)		ld_target=m88k-bcs ;;
diff -crN gas-950621-old/ld/configure.in.rej gas-950621/ld/configure.in.rej
*** gas-950621-old/ld/configure.in.rej	Wed Dec 31 17:00:00 1969
--- gas-950621/ld/configure.in.rej	Wed Jun 21 15:17:40 1995
***************
*** 0 ****
--- 1,17 ----
+ ***************
+ *** 82,87 ****
+     i[345]86-*-mach*)	ld_target=i386-mach ;;
+     i[345]86-*-gnuelf*)	ld_target=i386-gelf ;;
+     i[345]86-*-gnu*)	ld_target=i386-gnu ;;
+     i[345]86-*-winnt)	ld_target=i386-pe ;;
+     i[345]86-*-pe)	ld_target=i386-pe ;;
+     m8*-*-*)		ld_target=m88k-bcs ;;
+ --- 82,89 ----
+     i[345]86-*-mach*)	ld_target=i386-mach ;;
+     i[345]86-*-gnuelf*)	ld_target=i386-gelf ;;
+     i[345]86-*-gnu*)	ld_target=i386-gnu ;;
+ +   i[345]86-*-msdos*)	ld_target=i386-msdos ;;
+ +   i[345]86-*-moss*)	ld_target=i386-moss ;;
+     i[345]86-*-winnt)	ld_target=i386-pe ;;
+     i[345]86-*-pe)	ld_target=i386-pe ;;
+     m8*-*-*)		ld_target=m88k-bcs ;;
diff -crN gas-950621-old/ld/emulparams/i386moss.sh 
gas-950621/ld/emulparams/i386moss.sh
*** gas-950621-old/ld/emulparams/i386moss.sh	Wed Dec 31 17:00:00 1969
--- gas-950621/ld/emulparams/i386moss.sh	Wed Jun 21 15:17:40 1995
***************
*** 0 ****
--- 1,9 ----
+ SCRIPT_NAME=elf
+ OUTPUT_FORMAT="elf32-i386"
+ TEXT_START_ADDR=0x00002000
+ MAXPAGESIZE=0x1000
+ NONPAGED_TEXT_START_ADDR=0x00002000
+ ARCH=i386
+ NOP=0x9090
+ TEMPLATE_NAME=elf32
+ GENERATE_SHLIB_SCRIPT=yes
diff -crN gas-950621-old/ld/emulparams/i386msdos.sh 
gas-950621/ld/emulparams/i386msdos.sh
*** gas-950621-old/ld/emulparams/i386msdos.sh	Wed Dec 31 17:00:00 1969
--- gas-950621/ld/emulparams/i386msdos.sh	Wed Jun 21 15:17:40 1995
***************
*** 0 ****
--- 1,7 ----
+ SCRIPT_NAME=i386msdos
+ OUTPUT_FORMAT="msdos"
+ TEXT_START_ADDR=0x0
+ NONPAGED_TEXT_START_ADDR=0x0
+ SEGMENT_SIZE=0x10
+ PAD_TEXT=t
+ ARCH=i386
diff -crN gas-950621-old/ld/scripttempl/i386msdos.sc 
gas-950621/ld/scripttempl/i386msdos.sc
*** gas-950621-old/ld/scripttempl/i386msdos.sc	Wed Dec 31 17:00:00 1969
--- gas-950621/ld/scripttempl/i386msdos.sc	Wed Jun 21 15:17:40 1995
***************
*** 0 ****
--- 1,40 ----
+ cat <<EOF
+ OUTPUT_FORMAT("${OUTPUT_FORMAT}")
+ OUTPUT_ARCH(${ARCH})
+ 
+ ${RELOCATING+${LIB_SEARCH_DIRS}}
+ ${STACKZERO+${RELOCATING+${STACKZERO}}}
+ SECTIONS
+ {
+   ${RELOCATING+. = ${TEXT_START_ADDR};}
+   .text :
+   {
+     CREATE_OBJECT_SYMBOLS
+     *(.text)
+     ${RELOCATING+etext = .;}
+     ${RELOCATING+_etext = .;}
+     ${RELOCATING+__etext = .;}
+     ${PAD_TEXT+${RELOCATING+. = ${DATA_ALIGNMENT};}}
+   }
+   ${RELOCATING+. = ${DATA_ALIGNMENT};}
+   .rodata  ${RELOCATING-0} : { *(.rodata)  }
+   .data :
+   {
+     *(.data)
+     ${CONSTRUCTING+CONSTRUCTORS}
+     ${RELOCATING+edata  =  .;}
+     ${RELOCATING+_edata  =  .;}
+     ${RELOCATING+__edata  =  .;}
+   }
+   .bss :
+   {
+    ${RELOCATING+ _bss_start = .};
+    ${RELOCATING+ __bss_start = .};
+    *(.bss)
+    *(COMMON)
+    ${RELOCATING+end = ALIGN(4) };
+    ${RELOCATING+_end = ALIGN(4) };
+    ${RELOCATING+__end = ALIGN(4) };
+   }
+ }
+ EOF


				Bryan
---
Bryan Ford	baford@cs.utah.edu	University of Utah, CSS
`finger baford@schirf.cs.utah.edu' for PGP key and other info.