This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

hppa64-linux breakage


H.J.'s 2001-06-02 change to bfd/elf64-hppa.c broke hppa64-linux ld.
Not that there was anything wrong with H.J.'s patch, it just happened
to expose the fact that hppa64-linux-ld was using an elf64-hppa rather
than elf64-hppa-linux target.  Net effect was that the back end
check_relocs routine wasn't being called because of the test in
elflink.h around line 2107, and everything falls in a heap.

ld/ChangeLog
	* 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.

Applied to mainline and branch.

-- 
Alan Modra

Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.50.2.3
diff -u -p -r1.50.2.3 Makefile.am
--- Makefile.am	2001/06/11 10:05:07	1.50.2.3
+++ Makefile.am	2001/06/27 12:50:23
@@ -248,7 +248,8 @@ ALL_64_EMULATIONS = \
 	eelf64bmip.o \
 	eelf64btsmip.o \
 	eelf64ltsmip.o \
-	eelf64hppa.o
+	eelf64hppa.o \
+	ehppa64linux.o
 
 ALL_EMUL_EXTRA_OFILES = \
 	deffilep.o \
@@ -560,6 +561,9 @@ ehppalinux.c: $(srcdir)/emulparams/hppal
   $(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)"
Index: ld/configure.tgt
===================================================================
RCS file: /cvs/src/src/ld/configure.tgt,v
retrieving revision 1.42.2.5
diff -u -p -r1.42.2.5 configure.tgt
--- configure.tgt	2001/06/11 10:05:08	1.42.2.5
+++ configure.tgt	2001/06/27 12:50:25
@@ -242,6 +242,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 ;;
Index: ld/emulparams/hppa64linux.sh
===================================================================
RCS file: hppa64linux.sh
diff -N hppa64linux.sh
--- /dev/null	Tue May  5 13:32:27 1998
+++ hppa64linux.sh	Wed Jun 27 05:50:25 2001
@@ -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=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]