public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Updated RDOS support
@ 2013-01-04 22:03 Leif Ekblad
  2013-01-08  9:24 ` Alan Modra
  0 siblings, 1 reply; 9+ messages in thread
From: Leif Ekblad @ 2013-01-04 22:03 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 521 bytes --]

Change log:
* bfd/config.bfd: Removed unsupported models for rdos.
* ld/configure.tgt: Changed rdos target emulation to use a new file
* ld/emulparams/elf64rdos.sh: New emulation file for target rdos.
* ld/Makefile.am: Added target emulation file to makefile.
* ld/scripttempl/elf.sc: Fixed error in RODATA_ADDR script. Added support 
for putting large data in separate segment at a fixed address.
* ld/Makefile.in: Regenerated with autoconf from ld/Makefile.am

Tested with target rdos and rdos32.

Regards,
Leif Ekblad

[-- Attachment #2: binutils.diff --]
[-- Type: application/octet-stream, Size: 6330 bytes --]

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 <<EOF
+   ${RELOCATING+${CREATE_SHLIB-${CREATE_PIE-${LARGE_DATA_ADDR}}}}
+   ${RELOCATING+${CREATE_SHLIB+${SHLIB_LARGE_DATA_ADDR}}}
+   ${RELOCATING+${CREATE_PIE+${SHLIB_LARGE_DATA_ADDR}}}
+ 
    ${OTHER_BSS_SECTIONS}
    ${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
    ${RELOCATING+. = ALIGN(${ALIGNMENT});}

^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [PATCH] Updated RDOS support
@ 2013-01-18 21:39 Leif Ekblad
  2013-01-23 10:43 ` Alan Modra
  0 siblings, 1 reply; 9+ messages in thread
From: Leif Ekblad @ 2013-01-18 21:39 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]

With the ld-section patches in-place, here is the new patch for rdos:

Change log:
* bfd/config.bfd: Removed unsupported models for rdos.
* ld/configure.tgt: Changed rdos target emulation to use a new file
* ld/emulparams/elf64rdos.sh: Added new emulation file for target rdos.
* ld/Makefile.am: Added target emulation file to makefile.
* ld/Makefile.in: Regenerated with autoconf from ld/Makefile.am

Tested with target rdos.

Regards,
Leif Ekblad

[-- Attachment #2: binutils.diff --]
[-- Type: application/octet-stream, Size: 4530 bytes --]

diff -crN binutils-/bfd/config.bfd binutils-work/bfd/config.bfd
*** binutils-/bfd/config.bfd	Thu Jan 10 10:49:06 2013
--- binutils-work/bfd/config.bfd	Fri Jan 18 20:48:58 2013
***************
*** 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/Makefile.am binutils-work/ld/Makefile.am
*** binutils-/ld/Makefile.am	Thu Jan 10 10:49:20 2013
--- binutils-work/ld/Makefile.am	Fri Jan 18 20:48:58 2013
***************
*** 515,520 ****
--- 515,521 ----
  	eelf64mmix.c \
  	eelf64ppc.c \
  	eelf64ppc_fbsd.c \
+ 	eelf64rdos.c \
  	eelf64tilegx.c \
  	eelf64tilegx_be.c \
  	eelf_l1om.c \
***************
*** 2101,2106 ****
--- 2102,2110 ----
    $(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	Thu Jan 10 10:49:22 2013
--- binutils-work/ld/Makefile.in	Fri Jan 18 20:48:58 2013
***************
*** 822,827 ****
--- 822,828 ----
  	eelf64mmix.c \
  	eelf64ppc.c \
  	eelf64ppc_fbsd.c \
+ 	eelf64rdos.c \
  	eelf64tilegx.c \
  	eelf64tilegx_be.c \
  	eelf_l1om.c \
***************
*** 1245,1250 ****
--- 1246,1252 ----
  @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@
***************
*** 3585,3590 ****
--- 3587,3595 ----
    $(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/configure.tgt binutils-work/ld/configure.tgt
*** binutils-/ld/configure.tgt	Thu Jan 10 10:49:22 2013
--- binutils-work/ld/configure.tgt	Fri Jan 18 20:48:58 2013
***************
*** 217,223 ****
  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 ;;
--- 217,223 ----
  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	Thu Jan  1 01:00:00 1970
--- binutils-work/ld/emulparams/elf64rdos.sh	Fri Jan 18 21:31:00 2013
***************
*** 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=0x80020000000
+ 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-01-23 10:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-04 22:03 [PATCH] Updated RDOS support Leif Ekblad
2013-01-08  9:24 ` Alan Modra
2013-01-08 20:43   ` Leif Ekblad
2013-01-09  5:51     ` Alan Modra
2013-01-09 15:51       ` H.J. Lu
2013-01-09 20:12       ` [PATCH] Large section data, was: " Leif Ekblad
2013-01-14 13:38         ` Alan Modra
2013-01-18 21:39 Leif Ekblad
2013-01-23 10:43 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).