Common subdirectories: binutils-2.11.2.orig/bfd and binutils-2.11.2.new/bfd Common subdirectories: binutils-2.11.2.orig/binutils and binutils-2.11.2.new/binutils Common subdirectories: binutils-2.11.2.orig/config and binutils-2.11.2.new/config diff -bru binutils-2.11.2.orig/config.sub binutils-2.11.2.new/config.sub --- binutils-2.11.2.orig/config.sub Thu Mar 22 06:12:23 2001 +++ binutils-2.11.2.new/config.sub Fri Jan 11 16:15:01 2002 @@ -649,6 +649,10 @@ basic_machine=i960-intel os=-nindy ;; + ntox86) + basic_machine=i386${os:--unknown} + os=-nto-qnx + ;; mon960) basic_machine=i960-intel os=-mon960 @@ -994,6 +998,18 @@ ;; -unixware*) os=-sysv4.2uw + ;; + -qnx*) + case $basic_machine in + x86-* | i[34567]86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` Common subdirectories: binutils-2.11.2.orig/etc and binutils-2.11.2.new/etc Common subdirectories: binutils-2.11.2.orig/gas and binutils-2.11.2.new/gas Common subdirectories: binutils-2.11.2.orig/gprof and binutils-2.11.2.new/gprof Common subdirectories: binutils-2.11.2.orig/include and binutils-2.11.2.new/include Common subdirectories: binutils-2.11.2.orig/intl and binutils-2.11.2.new/intl Common subdirectories: binutils-2.11.2.orig/ld and binutils-2.11.2.new/ld Common subdirectories: binutils-2.11.2.orig/libiberty and binutils-2.11.2.new/libiberty Common subdirectories: binutils-2.11.2.orig/opcodes and binutils-2.11.2.new/opcodes Common subdirectories: binutils-2.11.2.orig/texinfo and binutils-2.11.2.new/texinfo diff -bru binutils-2.11.2.orig/bfd/config.bfd binutils-2.11.2.new/bfd/config.bfd --- binutils-2.11.2.orig/bfd/config.bfd Thu Jun 14 07:16:59 2001 +++ binutils-2.11.2.new/bfd/config.bfd Fri Jan 11 13:51:18 2002 @@ -37,7 +37,7 @@ c54x*) targ_archs=bfd_tic54x_arch ;; hppa*) targ_archs=bfd_hppa_arch ;; x86_64) targ_archs=bfd_i386_arch ;; -i[3456]86) targ_archs=bfd_i386_arch ;; +x86 | i[3456]86) targ_archs=bfd_i386_arch ;; i370) targ_archs=bfd_i370_arch ;; m6811*|m68hc11*) targ_archs="bfd_m68hc11_arch bfd_m68hc12_arch" ;; m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch" ;; @@ -309,6 +309,11 @@ i[3456]86-*-dgux* | i[3456]86-*-sysv5*) targ_defvec=bfd_elf32_i386_vec targ_selvecs=i386coff_vec + ;; + i[3456]86-*-qnx* | i[3456]86-*-nto* | x86-*nto*) + targ_defvec=bfd_elf32_i386_vec + targ_selvecs=i386coff_vec + targ_cflags=-D__QNXTARGET__ ;; i[3456]86-*-rtemself*) targ_defvec=bfd_elf32_i386_vec Common subdirectories: binutils-2.11.2.orig/bfd/doc and binutils-2.11.2.new/bfd/doc diff -bru binutils-2.11.2.orig/bfd/elf.c binutils-2.11.2.new/bfd/elf.c --- binutils-2.11.2.orig/bfd/elf.c Mon Jun 11 06:04:09 2001 +++ binutils-2.11.2.new/bfd/elf.c Thu Jan 17 15:07:43 2002 @@ -2684,7 +2684,7 @@ struct elf_segment_map *m; unsigned int alloc; Elf_Internal_Phdr *phdrs; - file_ptr off, voff; + file_ptr off, voff, voff2; bfd_vma filehdr_vaddr, filehdr_paddr; bfd_vma phdrs_vaddr, phdrs_paddr; Elf_Internal_Phdr *p; @@ -2736,6 +2736,8 @@ off = bed->s->sizeof_ehdr; off += alloc * bed->s->sizeof_phdr; + voff2 = off; + filehdr_vaddr = 0; filehdr_paddr = 0; phdrs_vaddr = 0; @@ -2970,9 +2972,36 @@ off += sec->_raw_size; if ((flags & SEC_ALLOC) != 0) + { voff += sec->_raw_size; - } + if((flags & SEC_HAS_CONTENTS) != 0) + voff2 = voff; + } + } + else + { + /* We are setting up the file positions for + the non PT_LOAD segments. Especially for segments + contains non-allocated sections. */ + if (i == 0) + { + if (sec->filepos) + { + p->p_offset = sec->filepos; + } + else + { + p->p_offset = voff2; + } + } + if (!sec->filepos) + { + voff2 += sec->_raw_size; + p->p_filesz += sec->_raw_size; + } + } + if (p->p_type == PT_NOTE && bfd_get_format (abfd) == bfd_core) { /* The actual "note" segment has i == 0. @@ -3023,11 +3052,13 @@ m != NULL; m = m->next, p++) { +#if 0 if (p->p_type != PT_LOAD && m->count > 0) { BFD_ASSERT (! m->includes_filehdr && ! m->includes_phdrs); p->p_offset = m->sections[0]->filepos; } +#endif if (m->count == 0) { if (m->includes_filehdr) @@ -3692,6 +3723,11 @@ && (section->lma + section->_raw_size) \ <= SEGMENT_END (segment, base)) +#define IS_CONTAINED_BY_FILEPOS(section, segment) \ + ((unsigned)section->filepos >= segment->p_offset \ + && ((unsigned)section->filepos + section->_raw_size) \ + <= SEGMENT_END (segment, segment->p_offset)) + /* Special case: corefile "NOTE" section containing regs, prpsinfo etc. */ #define IS_COREFILE_NOTE(p, s) \ (p->p_type == PT_NOTE \ @@ -3723,7 +3759,9 @@ ((((IS_CONTAINED_BY_VMA (section, segment) \ || IS_SOLARIS_PT_INTERP (segment, section)) \ && (section->flags & SEC_ALLOC) != 0) \ - || IS_COREFILE_NOTE (segment, section)) \ + || IS_COREFILE_NOTE (segment, section) \ + || (IS_CONTAINED_BY_FILEPOS(section, segment) \ + && (section->flags & SEC_ALLOC) == 0)) \ && section->output_section != NULL \ && section->segment_mark == false) @@ -3750,8 +3788,8 @@ unsigned int j; Elf_Internal_Phdr *segment2; - if (segment->p_type != PT_LOAD) - continue; + //if (segment->p_type != PT_LOAD) +// continue; /* Determine if this segment overlaps any previous segments. */ for (j = 0, segment2 = elf_tdata (ibfd)->phdr; j < i; j++, segment2 ++) @@ -3951,6 +3989,7 @@ /* Match up the physical address of the segment with the LMA address of the output section. */ if (IS_CONTAINED_BY_LMA (output_section, segment, map->p_paddr) + || IS_CONTAINED_BY_FILEPOS(section, segment) || IS_COREFILE_NOTE (segment, section)) { if (matching_lma == 0) @@ -4216,16 +4255,7 @@ if (elf_tdata (obfd)->segment_map == NULL && elf_tdata (ibfd)->phdr != NULL) { - asection *s; - - /* Only set up the segments if there are no more SEC_ALLOC - sections. FIXME: This won't do the right thing if objcopy is - used to remove the last SEC_ALLOC section, since objcopy - won't call this routine in that case. */ - for (s = isec->next; s != NULL; s = s->next) - if ((s->flags & SEC_ALLOC) != 0) - break; - if (s == NULL) + if (isec->next == NULL) { if (! copy_private_bfd_data (ibfd, obfd)) return false; Common subdirectories: binutils-2.11.2.orig/bfd/hosts and binutils-2.11.2.new/bfd/hosts Common subdirectories: binutils-2.11.2.orig/bfd/po and binutils-2.11.2.new/bfd/po Common subdirectories: binutils-2.11.2.orig/binutils/po and binutils-2.11.2.new/binutils/po Common subdirectories: binutils-2.11.2.orig/binutils/testsuite and binutils-2.11.2.new/binutils/testsuite Common subdirectories: binutils-2.11.2.orig/binutils/testsuite/binutils-all and binutils-2.11.2.new/binutils/testsuite/binutils-all Common subdirectories: binutils-2.11.2.orig/binutils/testsuite/config and binutils-2.11.2.new/binutils/testsuite/config Common subdirectories: binutils-2.11.2.orig/binutils/testsuite/lib and binutils-2.11.2.new/binutils/testsuite/lib Common subdirectories: binutils-2.11.2.orig/binutils/testsuite/binutils-all/hppa and binutils-2.11.2.new/binutils/testsuite/binutils-all/hppa Common subdirectories: binutils-2.11.2.orig/config/mpw and binutils-2.11.2.new/config/mpw Common subdirectories: binutils-2.11.2.orig/gas/config and binutils-2.11.2.new/gas/config diff -bru binutils-2.11.2.orig/gas/configure binutils-2.11.2.new/gas/configure --- binutils-2.11.2.orig/gas/configure Mon Jun 11 06:04:38 2001 +++ binutils-2.11.2.new/gas/configure Fri Jan 11 14:52:16 2002 @@ -2242,7 +2242,7 @@ strongarm*) cpu_type=arm endian=little ;; thumb*) cpu_type=arm endian=little ;; hppa*) cpu_type=hppa ;; - i[3456]86) cpu_type=i386 arch=i386;; + x86 | i[3456]86) cpu_type=i386 arch=i386;; x86_64) cpu_type=i386 arch=x86_64;; ia64) cpu_type=ia64 ;; m6811|m6812|m68hc12) cpu_type=m68hc11 ;; @@ -2350,6 +2350,8 @@ h8500-*-coff) fmt=coff ;; i370-*-elf* | i370-*-linux*) fmt=elf ;; + x86-*-nto-* | i386-*-qnx* | i386-*-nto*) + fmt=elf ;; i386-ibm-aix*) fmt=coff em=i386aix ;; i386-sequent-bsd*) fmt=aout em=dynix bfd_gas=yes ;; i386-*-beospe*) fmt=coff em=pe bfd_gas=yes ;; diff -bru binutils-2.11.2.orig/gas/configure.in binutils-2.11.2.new/gas/configure.in --- binutils-2.11.2.orig/gas/configure.in Mon Jun 11 06:04:44 2001 +++ binutils-2.11.2.new/gas/configure.in Fri Jan 11 14:08:50 2002 @@ -125,7 +125,7 @@ thumb*) cpu_type=arm endian=little ;; hppa*) cpu_type=hppa ;; changequote(,)dnl - i[3456]86) cpu_type=i386 arch=i386;; + x86 | i[3456]86) cpu_type=i386 arch=i386;; x86_64) cpu_type=i386 arch=x86_64;; ia64) cpu_type=ia64 ;; m6811|m6812|m68hc12) cpu_type=m68hc11 ;; Common subdirectories: binutils-2.11.2.orig/gas/doc and binutils-2.11.2.new/gas/doc Common subdirectories: binutils-2.11.2.orig/gas/po and binutils-2.11.2.new/gas/po Common subdirectories: binutils-2.11.2.orig/gas/testsuite and binutils-2.11.2.new/gas/testsuite Common subdirectories: binutils-2.11.2.orig/gas/testsuite/config and binutils-2.11.2.new/gas/testsuite/config Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas and binutils-2.11.2.new/gas/testsuite/gas Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gasp and binutils-2.11.2.new/gas/testsuite/gasp Common subdirectories: binutils-2.11.2.orig/gas/testsuite/lib and binutils-2.11.2.new/gas/testsuite/lib Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/all and binutils-2.11.2.new/gas/testsuite/gas/all Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/alpha and binutils-2.11.2.new/gas/testsuite/gas/alpha Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/arc and binutils-2.11.2.new/gas/testsuite/gas/arc Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/arm and binutils-2.11.2.new/gas/testsuite/gas/arm Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/cris and binutils-2.11.2.new/gas/testsuite/gas/cris Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/d10v and binutils-2.11.2.new/gas/testsuite/gas/d10v Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/d30v and binutils-2.11.2.new/gas/testsuite/gas/d30v Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/elf and binutils-2.11.2.new/gas/testsuite/gas/elf Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/fr30 and binutils-2.11.2.new/gas/testsuite/gas/fr30 Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/h8300 and binutils-2.11.2.new/gas/testsuite/gas/h8300 Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/hppa and binutils-2.11.2.new/gas/testsuite/gas/hppa Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/i386 and binutils-2.11.2.new/gas/testsuite/gas/i386 Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/ia64 and binutils-2.11.2.new/gas/testsuite/gas/ia64 Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/ieee-fp and binutils-2.11.2.new/gas/testsuite/gas/ieee-fp Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/m32r and binutils-2.11.2.new/gas/testsuite/gas/m32r Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/m68hc11 and binutils-2.11.2.new/gas/testsuite/gas/m68hc11 Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/m68k and binutils-2.11.2.new/gas/testsuite/gas/m68k Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/m68k-coff and binutils-2.11.2.new/gas/testsuite/gas/m68k-coff Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/m88k and binutils-2.11.2.new/gas/testsuite/gas/m88k Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/macros and binutils-2.11.2.new/gas/testsuite/gas/macros Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/mcore and binutils-2.11.2.new/gas/testsuite/gas/mcore Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/mips and binutils-2.11.2.new/gas/testsuite/gas/mips Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/mn10200 and binutils-2.11.2.new/gas/testsuite/gas/mn10200 Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/mn10300 and binutils-2.11.2.new/gas/testsuite/gas/mn10300 Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/mri and binutils-2.11.2.new/gas/testsuite/gas/mri Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/pj and binutils-2.11.2.new/gas/testsuite/gas/pj Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/ppc and binutils-2.11.2.new/gas/testsuite/gas/ppc Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/sh and binutils-2.11.2.new/gas/testsuite/gas/sh Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/sparc and binutils-2.11.2.new/gas/testsuite/gas/sparc Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/sparc-solaris and binutils-2.11.2.new/gas/testsuite/gas/sparc-solaris Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/sun4 and binutils-2.11.2.new/gas/testsuite/gas/sun4 Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/symver and binutils-2.11.2.new/gas/testsuite/gas/symver Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/tic54x and binutils-2.11.2.new/gas/testsuite/gas/tic54x Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/tic80 and binutils-2.11.2.new/gas/testsuite/gas/tic80 Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/v850 and binutils-2.11.2.new/gas/testsuite/gas/v850 Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/vax and binutils-2.11.2.new/gas/testsuite/gas/vax Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/vtable and binutils-2.11.2.new/gas/testsuite/gas/vtable Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/hppa/basic and binutils-2.11.2.new/gas/testsuite/gas/hppa/basic Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/hppa/parse and binutils-2.11.2.new/gas/testsuite/gas/hppa/parse Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/hppa/reloc and binutils-2.11.2.new/gas/testsuite/gas/hppa/reloc Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gas/hppa/unsorted and binutils-2.11.2.new/gas/testsuite/gas/hppa/unsorted Common subdirectories: binutils-2.11.2.orig/gas/testsuite/gasp/mri and binutils-2.11.2.new/gas/testsuite/gasp/mri Common subdirectories: binutils-2.11.2.orig/gprof/po and binutils-2.11.2.new/gprof/po Common subdirectories: binutils-2.11.2.orig/include/aout and binutils-2.11.2.new/include/aout Common subdirectories: binutils-2.11.2.orig/include/coff and binutils-2.11.2.new/include/coff Common subdirectories: binutils-2.11.2.orig/include/elf and binutils-2.11.2.new/include/elf Common subdirectories: binutils-2.11.2.orig/include/mpw and binutils-2.11.2.new/include/mpw Common subdirectories: binutils-2.11.2.orig/include/nlm and binutils-2.11.2.new/include/nlm Common subdirectories: binutils-2.11.2.orig/include/opcode and binutils-2.11.2.new/include/opcode Common subdirectories: binutils-2.11.2.orig/include/regs and binutils-2.11.2.new/include/regs Common subdirectories: binutils-2.11.2.orig/include/mpw/sys and binutils-2.11.2.new/include/mpw/sys diff -bru binutils-2.11.2.orig/ld/Makefile.in binutils-2.11.2.new/ld/Makefile.in --- binutils-2.11.2.orig/ld/Makefile.in Mon Jun 11 06:05:07 2001 +++ binutils-2.11.2.new/ld/Makefile.in Fri Jan 11 15:58:34 2002 @@ -1497,6 +1497,9 @@ ez8002.c: $(srcdir)/emulparams/z8002.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/z8000.sc ${GEN_DEPENDS} ${GENSCRIPTS} z8002 "$(tdir_z8002)" +ei386nto.c: $(srcdir)/emulparams/i386nto.sh \ + $(srcdir)/emultempl/qnxelf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} i386nto "$(tdir_i386nto)" # The generated emulation files mostly have the same dependencies. $(EMULATION_OFILES): ../bfd/bfd.h sysdep.h config.h $(INCDIR)/bfdlink.h \ diff -bru binutils-2.11.2.orig/ld/configure.tgt binutils-2.11.2.new/ld/configure.tgt --- binutils-2.11.2.orig/ld/configure.tgt Mon Jun 11 06:05:08 2001 +++ binutils-2.11.2.new/ld/configure.tgt Fri Jan 11 13:55:10 2002 @@ -112,6 +112,7 @@ *-tandem-none) targ_emul=st2000 ;; i370-*-elf* | i370-*-linux-gnu*) targ_emul=elf32i370 ;; i370-*-mvs*) targ_emul=mvs ;; +i[3456]86-*-nto* | x86-*nto*) targ_emul=i386nto ;; i[3456]86-*-vsta) targ_emul=vsta ;; i[3456]86-go32-rtems*) targ_emul=i386go32 ;; i[3456]86-*-go32) targ_emul=i386go32 ;; Common subdirectories: binutils-2.11.2.orig/ld/emulparams and binutils-2.11.2.new/ld/emulparams Common subdirectories: binutils-2.11.2.orig/ld/emultempl and binutils-2.11.2.new/ld/emultempl Common subdirectories: binutils-2.11.2.orig/ld/po and binutils-2.11.2.new/ld/po Common subdirectories: binutils-2.11.2.orig/ld/scripttempl and binutils-2.11.2.new/ld/scripttempl Common subdirectories: binutils-2.11.2.orig/ld/testsuite and binutils-2.11.2.new/ld/testsuite Only in binutils-2.11.2.new/ld/emulparams/: i386nto.sh Only in binutils-2.11.2.new/ld/emultempl/: qnxelf32.em Common subdirectories: binutils-2.11.2.orig/ld/testsuite/config and binutils-2.11.2.new/ld/testsuite/config Common subdirectories: binutils-2.11.2.orig/ld/testsuite/ld-bootstrap and binutils-2.11.2.new/ld/testsuite/ld-bootstrap Common subdirectories: binutils-2.11.2.orig/ld/testsuite/ld-cdtest and binutils-2.11.2.new/ld/testsuite/ld-cdtest Common subdirectories: binutils-2.11.2.orig/ld/testsuite/ld-checks and binutils-2.11.2.new/ld/testsuite/ld-checks Common subdirectories: binutils-2.11.2.orig/ld/testsuite/ld-elfvers and binutils-2.11.2.new/ld/testsuite/ld-elfvers Common subdirectories: binutils-2.11.2.orig/ld/testsuite/ld-elfvsb and binutils-2.11.2.new/ld/testsuite/ld-elfvsb Common subdirectories: binutils-2.11.2.orig/ld/testsuite/ld-empic and binutils-2.11.2.new/ld/testsuite/ld-empic Common subdirectories: binutils-2.11.2.orig/ld/testsuite/ld-scripts and binutils-2.11.2.new/ld/testsuite/ld-scripts Common subdirectories: binutils-2.11.2.orig/ld/testsuite/ld-selective and binutils-2.11.2.new/ld/testsuite/ld-selective Common subdirectories: binutils-2.11.2.orig/ld/testsuite/ld-sh and binutils-2.11.2.new/ld/testsuite/ld-sh Common subdirectories: binutils-2.11.2.orig/ld/testsuite/ld-shared and binutils-2.11.2.new/ld/testsuite/ld-shared Common subdirectories: binutils-2.11.2.orig/ld/testsuite/ld-srec and binutils-2.11.2.new/ld/testsuite/ld-srec Common subdirectories: binutils-2.11.2.orig/ld/testsuite/ld-undefined and binutils-2.11.2.new/ld/testsuite/ld-undefined Common subdirectories: binutils-2.11.2.orig/ld/testsuite/ld-versados and binutils-2.11.2.new/ld/testsuite/ld-versados Common subdirectories: binutils-2.11.2.orig/ld/testsuite/lib and binutils-2.11.2.new/ld/testsuite/lib Common subdirectories: binutils-2.11.2.orig/libiberty/config and binutils-2.11.2.new/libiberty/config Common subdirectories: binutils-2.11.2.orig/libiberty/testsuite and binutils-2.11.2.new/libiberty/testsuite Common subdirectories: binutils-2.11.2.orig/opcodes/po and binutils-2.11.2.new/opcodes/po