diff -crN binutils-/bfd/config.bfd binutils-work/bfd/config.bfd *** binutils-/bfd/config.bfd 2013-01-02 14:13:36.000000000 +0100 --- binutils-work/bfd/config.bfd 2013-01-04 19:51:54.000000000 +0100 *************** *** 680,686 **** ;; x86_64-*-rdos*) targ_defvec=bfd_elf64_x86_64_vec - targ_selvecs="bfd_elf32_i386_vec bfd_elf64_l1om_vec bfd_elf64_k1om_vec" want64=true ;; #endif --- 680,685 ---- diff -crN binutils-/ld/configure.tgt binutils-work/ld/configure.tgt *** binutils-/ld/configure.tgt 2012-12-05 06:48:20.000000000 +0100 --- binutils-work/ld/configure.tgt 2013-01-04 19:51:54.000000000 +0100 *************** *** 199,205 **** i[3-7]86-*-rtems*) targ_emul=elf_i386 ;; i[3-7]86-*-aros*) targ_emul=elf_i386 ;; i[3-7]86-*-rdos*) targ_emul=elf_i386 ;; ! x86_64-*-rdos*) targ_emul=elf_x86_64 ;; i[3-7]86-*-bsd) targ_emul=i386bsd ;; i[3-7]86-*-bsd386) targ_emul=i386bsd ;; i[3-7]86-*-bsdi*) targ_emul=i386bsd ;; --- 199,205 ---- i[3-7]86-*-rtems*) targ_emul=elf_i386 ;; i[3-7]86-*-aros*) targ_emul=elf_i386 ;; i[3-7]86-*-rdos*) targ_emul=elf_i386 ;; ! x86_64-*-rdos*) targ_emul=elf64rdos ;; i[3-7]86-*-bsd) targ_emul=i386bsd ;; i[3-7]86-*-bsd386) targ_emul=i386bsd ;; i[3-7]86-*-bsdi*) targ_emul=i386bsd ;; diff -crN binutils-/ld/emulparams/elf64rdos.sh binutils-work/ld/emulparams/elf64rdos.sh *** binutils-/ld/emulparams/elf64rdos.sh 1970-01-01 01:00:00.000000000 +0100 --- binutils-work/ld/emulparams/elf64rdos.sh 2013-01-04 20:30:28.000000000 +0100 *************** *** 0 **** --- 1,23 ---- + . ${srcdir}/emulparams/plt_unwind.sh + SCRIPT_NAME=elf + ELFSIZE=64 + OUTPUT_FORMAT="elf64-x86-64" + NO_REL_RELOCS=yes + MAXPAGESIZE=0x1000 + COMMONPAGESIZE=0x1000 + TEXT_START_ADDR=0x180E0000000 + LARGE_DATA_ADDR=0x30020000000 + ARCH="i386:x86-64" + MACHINE= + TEMPLATE_NAME=elf32 + GENERATE_SHLIB_SCRIPT=yes + GENERATE_PIE_SCRIPT=yes + LARGE_SECTIONS=yes + IREL_IN_PLT= + + if [ "x${host}" = "x${target}" ]; then + case " $EMULATION_LIBPATH " in + *" ${EMULATION_NAME} "*) + NATIVE=yes + esac + fi diff -crN binutils-/ld/Makefile.am binutils-work/ld/Makefile.am *** binutils-/ld/Makefile.am 2012-12-17 17:56:04.000000000 +0100 --- binutils-work/ld/Makefile.am 2013-01-04 19:51:54.000000000 +0100 *************** *** 512,517 **** --- 512,518 ---- eelf64mmix.c \ eelf64ppc.c \ eelf64ppc_fbsd.c \ + eelf64rdos.c \ eelf64tilegx.c \ eelf64tilegx_be.c \ eelf_l1om.c \ *************** *** 2084,2089 **** --- 2085,2093 ---- $(srcdir)/emultempl/ppc64elf.em ldemul-list.h \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64ppc_fbsd "$(tdir_elf64ppc_fbsd)" + eelf64rdos.c: $(srcdir)/emulparams/elf64rdos.sh \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf64tilegx "$(tdir_elf64rdos)" eelf64tilegx.c: $(srcdir)/emulparams/elf64tilegx.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} diff -crN binutils-/ld/Makefile.in binutils-work/ld/Makefile.in *** binutils-/ld/Makefile.in 2012-12-17 17:56:04.000000000 +0100 --- binutils-work/ld/Makefile.in 2013-01-04 19:51:54.000000000 +0100 *************** *** 819,824 **** --- 819,825 ---- eelf64mmix.c \ eelf64ppc.c \ eelf64ppc_fbsd.c \ + eelf64rdos.c \ eelf64tilegx.c \ eelf64tilegx_be.c \ eelf_l1om.c \ *************** *** 1232,1237 **** --- 1233,1239 ---- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64mmix.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ppc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64ppc_fbsd.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64rdos.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf64tilegx_be.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf_i386.Po@am__quote@ *************** *** 3558,3563 **** --- 3560,3568 ---- $(srcdir)/emultempl/ppc64elf.em ldemul-list.h \ $(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} elf64ppc_fbsd "$(tdir_elf64ppc_fbsd)" + eelf64rdos.c: $(srcdir)/emulparams/elf64rdos.sh \ + $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} elf64rdos "$(tdir_elf64rdos)" eelf64tilegx.c: $(srcdir)/emulparams/elf64tilegx.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} diff -crN binutils-/ld/scripttempl/elf.sc binutils-work/ld/scripttempl/elf.sc *** binutils-/ld/scripttempl/elf.sc 2012-12-18 21:42:44.000000000 +0100 --- binutils-work/ld/scripttempl/elf.sc 2013-01-04 20:17:00.000000000 +0100 *************** *** 496,502 **** RODATA_ADDR="\ SEGMENT_START(\"rodata-segment\", ${RODATA_ADDR}) + SIZEOF_HEADERS" else ! RODATA_ADDR="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))}" RODATA_ADDR="SEGMENT_START(\"rodata-segment\", ${RODATA_ADDR})" fi if test -n "${SHLIB_RODATA_ADDR}"; then --- 496,502 ---- RODATA_ADDR="\ SEGMENT_START(\"rodata-segment\", ${RODATA_ADDR}) + SIZEOF_HEADERS" else ! RODATA_ADDR="ALIGN(${SEGMENT_SIZE}) + (. & (${MAXPAGESIZE} - 1))" RODATA_ADDR="SEGMENT_START(\"rodata-segment\", ${RODATA_ADDR})" fi if test -n "${SHLIB_RODATA_ADDR}"; then *************** *** 605,610 **** --- 605,626 ---- pad the .data section. */ ${RELOCATING+. = ALIGN(. != 0 ? ${ALIGNMENT} : 1);} } + + EOF + + if test -n "${LARGE_DATA_ADDR}"; then + LARGE_DATA_ADDR=". = \ + SEGMENT_START(\"ldata-segment\", ${LARGE_DATA_ADDR}) + SIZEOF_HEADERS;" + fi + if test -n "${SHLIB_LARGE_DATA_ADDR}"; then + SHLIB_LARGE_DATA_ADDR=". = \ + SEGMENT_START(\"ldata-segment\", ${SHLIB_LARGE_DATA_ADDR}) + SIZEOF_HEADERS;" + fi + cat <