From: Alan Modra Date: Wed, 27 Jun 2001 08:42:29 +0000 (+0000) Subject: * emulparams/hppa64linux.sh: New file. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9f22353f5ba698d6ca4a42697b47f973607c814a;p=binutils-gdb.git * emulparams/hppa64linux.sh: New file. * configure.tgt: hppa*64*-*-linux* uses hppa64linux.sh * Makefile.am (ALL_64_EMULATIONS): Add ehppa64linux.o (ehppa64linux.c): Add rule to make it. Run "make dep-am". * Makefile.in: Regenerate. --- diff --git a/ld/ChangeLog b/ld/ChangeLog index fe9e0af2900..9fd85ed5ce5 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,12 @@ +2001-06-27 Alan Modra + + * emulparams/hppa64linux.sh: New file. + * configure.tgt: hppa*64*-*-linux* uses hppa64linux.sh + * Makefile.am (ALL_64_EMULATIONS): Add ehppa64linux.o + (ehppa64linux.c): Add rule to make it. + Run "make dep-am". + * Makefile.in: Regenerate. + 2001-06-21 Hans-Peter Nilsson * ld.texinfo (Options, -r): Mention restrictions when using diff --git a/ld/Makefile.am b/ld/Makefile.am index 27c59634858..b2f04d73227 100644 --- a/ld/Makefile.am +++ b/ld/Makefile.am @@ -262,7 +262,8 @@ ALL_64_EMULATIONS = \ eelf64btsmip.o \ eelf64ltsmip.o \ eelf64hppa.o \ - eaixppc64.o + eaixppc64.o \ + ehppa64linux.o ALL_EMUL_EXTRA_OFILES = \ deffilep.o \ @@ -592,6 +593,9 @@ ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} hppalinux "$(tdir_hppalinux)" +ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)" ei386aout.c: $(srcdir)/emulparams/i386aout.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} i386aout "$(tdir_i386aout)" @@ -1047,7 +1051,7 @@ ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \ ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \ - ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h + ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h $(INCDIR)/libiberty.h ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \ @@ -1095,7 +1099,7 @@ ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ldlex.h ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \ ld.h $(INCDIR)/bin-bugs.h ldgram.h ldmisc.h ldexp.h \ - ldlang.h ldfile.h ldlex.h ldmain.h + ldlang.h ldfile.h ldlex.h ldmain.h $(INCDIR)/libiberty.h deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \ ld.h $(INCDIR)/bin-bugs.h ldmisc.h deffile.h diff --git a/ld/Makefile.in b/ld/Makefile.in index fdef9309ee1..1b62855b53a 100644 --- a/ld/Makefile.in +++ b/ld/Makefile.in @@ -371,7 +371,8 @@ ALL_64_EMULATIONS = \ eelf64btsmip.o \ eelf64ltsmip.o \ eelf64hppa.o \ - eaixppc64.o + eaixppc64.o \ + ehppa64linux.o ALL_EMUL_EXTRA_OFILES = \ @@ -475,7 +476,7 @@ deffilep.c ldgram.c ldlex.c DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = gtar +TAR = tar GZIP_ENV = --best SOURCES = $(ld_new_SOURCES) $(EXTRA_ld_new_SOURCES) OBJECTS = $(ld_new_OBJECTS) @@ -1306,6 +1307,9 @@ ehppalinux.c: $(srcdir)/emulparams/hppalinux.sh \ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/hppaelf.em \ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} ${GENSCRIPTS} hppalinux "$(tdir_hppalinux)" +ehppa64linux.c: $(srcdir)/emulparams/hppa64linux.sh \ + $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS} + ${GENSCRIPTS} hppa64linux "$(tdir_hppa64linux)" ei386aout.c: $(srcdir)/emulparams/i386aout.sh \ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS} ${GENSCRIPTS} i386aout "$(tdir_i386aout)" @@ -1738,7 +1742,7 @@ ldexp.o: ldexp.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \ ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \ - ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h + ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h $(INCDIR)/libiberty.h ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \ $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \ @@ -1786,7 +1790,7 @@ ldgram.o: ldgram.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \ ldlex.h ldlex.o: ldlex.c ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \ ld.h $(INCDIR)/bin-bugs.h ldgram.h ldmisc.h ldexp.h \ - ldlang.h ldfile.h ldlex.h ldmain.h + ldlang.h ldfile.h ldlex.h ldmain.h $(INCDIR)/libiberty.h deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \ ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \ ld.h $(INCDIR)/bin-bugs.h ldmisc.h deffile.h diff --git a/ld/configure.tgt b/ld/configure.tgt index 956b8b9fade..fe386dd1a60 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -248,6 +248,7 @@ m68*-hp*-netbsd*) targ_emul=m68k4knbsd ;; m68*-*-netbsd*) targ_emul=m68knbsd ;; m68*-*-psos*) targ_emul=m68kpsos ;; m68*-*-rtems*) targ_emul=m68kcoff ;; +hppa*64*-*-linux-gnu*) targ_emul=hppa64linux ;; hppa*64*-*) targ_emul=elf64hppa ;; hppa*-*-linux-gnu*) targ_emul=hppalinux ;; hppa*-*-*elf*) targ_emul=hppaelf ;; diff --git a/ld/emulparams/hppa64linux.sh b/ld/emulparams/hppa64linux.sh new file mode 100644 index 00000000000..3fe422be84d --- /dev/null +++ b/ld/emulparams/hppa64linux.sh @@ -0,0 +1,39 @@ +SCRIPT_NAME=elf +ELFSIZE=64 +OUTPUT_FORMAT="elf64-hppa-linux" +TEXT_START_ADDR=0x10000 +TARGET_PAGE_SIZE=0x10000 +MAXPAGESIZE=0x10000 +ARCH=hppa +MACHINE=hppa2.0w +ENTRY="main" +TEMPLATE_NAME=elf32 +GENERATE_SHLIB_SCRIPT=yes + +# We really want multiple .stub sections, one for each input .text section, +# but for now this is good enough. +OTHER_READONLY_SECTIONS='.PARISC.unwind : { *(.PARISC.unwind) } ' + +# The PA64 ELF port treats .plt sections differently than most. We also have +# to create a .opd section. What most systems call the .got, we call the .dlt +OTHER_READWRITE_SECTIONS='.opd : { *(.opd) } PROVIDE (__gp = .); .plt : { *(.plt) } .dlt : { *(.dlt) }' + +# The PA64 ELF port has two additional bss sections. huge bss and thread bss. +# Make sure they end up in the appropriate location. We also have to set +# __TLS_SIZE to the size of the thread bss section. +OTHER_BSS_SECTIONS='.hbss : { *(.hbss) } .tbss : { *(.tbss) }' +#OTHER_BSS_END_SYMBOLS='PROVIDE (__TLS_SIZE = SIZEOF (.tbss));' +OTHER_BSS_END_SYMBOLS='PROVIDE (__TLS_SIZE = 0);' + +# HPs use .dlt where systems use .got. Sigh. +OTHER_GOT_RELOC_SECTIONS='.rela.dlt : { *(.rela.dlt) }' + +# We're not actually providing a symbol anymore (due to the inability to be +# safe in regards to shared libraries). So we just allocate the hunk of space +# unconditionally, but do not mess around with the symbol table. +DATA_START_SYMBOLS='. += 16;' + +DATA_PLT= + +# .dynamic should be at the start of the .text segment. +TEXT_DYNAMIC=