aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-06-27 08:42:29 +0000
committerAlan Modra <amodra@gmail.com>2001-06-27 08:42:29 +0000
commit9f22353f5ba698d6ca4a42697b47f973607c814a (patch)
treebe4f3002e3031784ba0127e4d47217f357f2fa39 /ld
parentd827344236a4e852e15a74dfd23490c1fc2ac139 (diff)
downloadgdb-9f22353f5ba698d6ca4a42697b47f973607c814a.zip
gdb-9f22353f5ba698d6ca4a42697b47f973607c814a.tar.gz
gdb-9f22353f5ba698d6ca4a42697b47f973607c814a.tar.bz2
* 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.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog9
-rw-r--r--ld/Makefile.am10
-rw-r--r--ld/Makefile.in12
-rw-r--r--ld/configure.tgt1
-rw-r--r--ld/emulparams/hppa64linux.sh39
5 files changed, 64 insertions, 7 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index fe9e0af..9fd85ed 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,12 @@
+2001-06-27 Alan Modra <amodra@bigpond.net.au>
+
+ * 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 <hp@axis.com>
* ld.texinfo (Options, -r): Mention restrictions when using
diff --git a/ld/Makefile.am b/ld/Makefile.am
index 27c5963..b2f04d7 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 fdef930..1b62855 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 956b8b9..fe386dd 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 0000000..3fe422b
--- /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=