public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Re: SIGSEGV in ld at elflink.h:5500
       [not found] ` <200207250422.g6P4Mrrt007253@hiauly1.hia.nrc.ca>
@ 2002-07-25  0:44   ` Alan Modra
  2002-07-26 11:57     ` John David Anglin
  0 siblings, 1 reply; 7+ messages in thread
From: Alan Modra @ 2002-07-25  0:44 UTC (permalink / raw)
  To: John David Anglin; +Cc: binutils

On Thu, Jul 25, 2002 at 12:22:53AM -0400, John David Anglin wrote:
> > Program received signal SIGSEGV, Segmentation fault.
> > 0x400000000004f604 in L$2249 () at ../../src/bfd/elflink.h:5500
> 
> > OK, so it's a section symbol from a removed linkonce section.
> > 
> > I think elf64-hppa.c needs to check for this case before calling
> > _bfd_elf64_link_record_local_dynamic_symbol, with something like
> > 
> > ((sec->flags & SEC_LINK_ONCE) != 0
> >  && bfd_is_abs_section (sec->output_section))
> 
> I traced back the value of "e" associated with the SIGSEGV and find
> that it is added in allocate_dynrel_entries.  I don't think the other
> functions that call _bfd_elf64_link_record_local_dynamic_symbol are
> a problem but I am not entirely certain.
> 
> The approach outlined above doesn't work.  It requires the input section
> for the symbol.  What we have is the owner and input index.  rent->sec->name
> is .eh_frame.  Any thoughts on an easy way to get the input section
> for the symbol?

The standard way is to read and swap in the symbol using
bfd_elf_get_elf_syms, then call bfd_section_from_elf_index on
sym.st_shndx.  However, I'm about to check in the following which
ought to make it easy for you.  In fact, you may not need to change
elf64-hppa.c at all.

Using bfd_elf_get_elf_syms in elf_link_record_local_dynamic_symbol
means we have no structures that change size between ELF32 and ELF64,
so the function can move to elflink.c.

bfd/ChangeLog
	* elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
	as elf_link_record_local_dynamic_symbol.
	(_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
	(elf_link_record_local_dynamic_symbol): Declare.  Now returns int.
	* elflink.h (elf_link_record_local_dynamic_symbol): Move to..
	* elflink.c: .. here.  Use bfd_elf_get_elf_syms.  Check whether an
	attempt is made to record a symbol in a discarded section, and
	return `2' in that case.

Committing to mainline.  This can go to the branch (assuming no
objections) when the elf64-hppa problem is proven fixed.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

Index: bfd/elf-bfd.h
===================================================================
RCS file: /cvs/src/src/bfd/elf-bfd.h,v
retrieving revision 1.84
diff -u -p -r1.84 elf-bfd.h
--- bfd/elf-bfd.h	23 Jul 2002 11:15:06 -0000	1.84
+++ bfd/elf-bfd.h	25 Jul 2002 06:41:20 -0000
@@ -1558,10 +1558,12 @@ extern Elf_Internal_Rela *_bfd_elf64_lin
 #define bfd_elf64_link_record_dynamic_symbol \
   _bfd_elf_link_record_dynamic_symbol
 
-extern boolean _bfd_elf32_link_record_local_dynamic_symbol
-  PARAMS ((struct bfd_link_info *, bfd *, long));
-extern boolean _bfd_elf64_link_record_local_dynamic_symbol
+extern int elf_link_record_local_dynamic_symbol
   PARAMS ((struct bfd_link_info *, bfd *, long));
+#define _bfd_elf32_link_record_local_dynamic_symbol \
+  elf_link_record_local_dynamic_symbol
+#define _bfd_elf64_link_record_local_dynamic_symbol \
+  elf_link_record_local_dynamic_symbol
 
 extern boolean _bfd_elf_close_and_cleanup
   PARAMS ((bfd *));
Index: bfd/elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.26
diff -u -p -r1.26 elflink.c
--- bfd/elflink.c	4 Jul 2002 14:40:25 -0000	1.26
+++ bfd/elflink.c	25 Jul 2002 06:41:27 -0000
@@ -302,6 +302,98 @@ _bfd_elf_link_record_dynamic_symbol (inf
   return true;
 }
 
+/* Record a new local dynamic symbol.  Returns 0 on failure, 1 on
+   success, and 2 on a failure caused by attempting to record a symbol
+   in a discarded section, eg. a discarded link-once section symbol.  */
+
+int
+elf_link_record_local_dynamic_symbol (info, input_bfd, input_indx)
+     struct bfd_link_info *info;
+     bfd *input_bfd;
+     long input_indx;
+{
+  bfd_size_type amt;
+  struct elf_link_local_dynamic_entry *entry;
+  struct elf_link_hash_table *eht;
+  struct elf_strtab_hash *dynstr;
+  unsigned long dynstr_index;
+  char *name;
+  Elf_External_Sym_Shndx eshndx;
+  char esym[sizeof (Elf64_External_Sym)];
+
+  if (! is_elf_hash_table (info))
+    return 0;
+
+  /* See if the entry exists already.  */
+  for (entry = elf_hash_table (info)->dynlocal; entry ; entry = entry->next)
+    if (entry->input_bfd == input_bfd && entry->input_indx == input_indx)
+      return 1;
+
+  amt = sizeof (*entry);
+  entry = (struct elf_link_local_dynamic_entry *) bfd_alloc (input_bfd, amt);
+  if (entry == NULL)
+    return 0;
+
+  /* Go find the symbol, so that we can find it's name.  */
+  if (!bfd_elf_get_elf_syms (input_bfd, &elf_tdata (input_bfd)->symtab_hdr,
+			     (size_t) 1, (size_t) input_indx,
+			     &entry->isym, esym, &eshndx))
+    {
+      bfd_release (input_bfd, entry);
+      return 0;
+    }
+
+  if (entry->isym.st_shndx != SHN_UNDEF
+      && (entry->isym.st_shndx < SHN_LORESERVE
+	  || entry->isym.st_shndx > SHN_HIRESERVE))
+    {
+      asection *s;
+
+      s = bfd_section_from_elf_index (input_bfd, entry->isym.st_shndx);
+      if (s == NULL || bfd_is_abs_section (s->output_section))
+	{
+	  /* We can still bfd_release here as nothing has done another
+	     bfd_alloc.  We can't do this later in this function.  */
+	  bfd_release (input_bfd, entry);
+	  return 2;
+	}
+    }
+
+  name = (bfd_elf_string_from_elf_section
+	  (input_bfd, elf_tdata (input_bfd)->symtab_hdr.sh_link,
+	   entry->isym.st_name));
+
+  dynstr = elf_hash_table (info)->dynstr;
+  if (dynstr == NULL)
+    {
+      /* Create a strtab to hold the dynamic symbol names.  */
+      elf_hash_table (info)->dynstr = dynstr = _bfd_elf_strtab_init ();
+      if (dynstr == NULL)
+	return 0;
+    }
+
+  dynstr_index = _bfd_elf_strtab_add (dynstr, name, false);
+  if (dynstr_index == (unsigned long) -1)
+    return 0;
+  entry->isym.st_name = dynstr_index;
+
+  eht = elf_hash_table (info);
+
+  entry->next = eht->dynlocal;
+  eht->dynlocal = entry;
+  entry->input_bfd = input_bfd;
+  entry->input_indx = input_indx;
+  eht->dynsymcount++;
+
+  /* Whatever binding the symbol had before, it's now local.  */
+  entry->isym.st_info
+    = ELF_ST_INFO (STB_LOCAL, ELF_ST_TYPE (entry->isym.st_info));
+
+  /* The dynindx will be set at the end of size_dynamic_sections.  */
+
+  return 1;
+}
+
 /* Return the dynindex of a local dynamic symbol.  */
 
 long
Index: bfd/elflink.h
===================================================================
RCS file: /cvs/src/src/bfd/elflink.h,v
retrieving revision 1.178
diff -u -p -r1.178 elflink.h
--- bfd/elflink.h	23 Jul 2002 04:38:17 -0000	1.178
+++ bfd/elflink.h	25 Jul 2002 06:41:35 -0000
@@ -2448,93 +2448,6 @@ elf_add_dynamic_entry (info, tag, val)
 
   return true;
 }
-
-/* Record a new local dynamic symbol.  */
-
-boolean
-elf_link_record_local_dynamic_symbol (info, input_bfd, input_indx)
-     struct bfd_link_info *info;
-     bfd *input_bfd;
-     long input_indx;
-{
-  struct elf_link_local_dynamic_entry *entry;
-  struct elf_link_hash_table *eht;
-  struct elf_strtab_hash *dynstr;
-  Elf_External_Sym esym;
-  Elf_External_Sym_Shndx eshndx;
-  Elf_External_Sym_Shndx *shndx;
-  unsigned long dynstr_index;
-  char *name;
-  file_ptr pos;
-  bfd_size_type amt;
-
-  if (! is_elf_hash_table (info))
-    return false;
-
-  /* See if the entry exists already.  */
-  for (entry = elf_hash_table (info)->dynlocal; entry ; entry = entry->next)
-    if (entry->input_bfd == input_bfd && entry->input_indx == input_indx)
-      return true;
-
-  entry = (struct elf_link_local_dynamic_entry *)
-    bfd_alloc (input_bfd, (bfd_size_type) sizeof (*entry));
-  if (entry == NULL)
-    return false;
-
-  /* Go find the symbol, so that we can find it's name.  */
-  amt = sizeof (Elf_External_Sym);
-  pos = elf_tdata (input_bfd)->symtab_hdr.sh_offset + input_indx * amt;
-  if (bfd_seek (input_bfd, pos, SEEK_SET) != 0
-      || bfd_bread ((PTR) &esym, amt, input_bfd) != amt)
-    return false;
-  shndx = NULL;
-  if (elf_tdata (input_bfd)->symtab_shndx_hdr.sh_size != 0)
-    {
-      amt = sizeof (Elf_External_Sym_Shndx);
-      pos = elf_tdata (input_bfd)->symtab_shndx_hdr.sh_offset;
-      pos += input_indx * amt;
-      shndx = &eshndx;
-      if (bfd_seek (input_bfd, pos, SEEK_SET) != 0
-	  || bfd_bread ((PTR) shndx, amt, input_bfd) != amt)
-	return false;
-    }
-  elf_swap_symbol_in (input_bfd, (const PTR) &esym, (const PTR) shndx,
-		      &entry->isym);
-
-  name = (bfd_elf_string_from_elf_section
-	  (input_bfd, elf_tdata (input_bfd)->symtab_hdr.sh_link,
-	   entry->isym.st_name));
-
-  dynstr = elf_hash_table (info)->dynstr;
-  if (dynstr == NULL)
-    {
-      /* Create a strtab to hold the dynamic symbol names.  */
-      elf_hash_table (info)->dynstr = dynstr = _bfd_elf_strtab_init ();
-      if (dynstr == NULL)
-	return false;
-    }
-
-  dynstr_index = _bfd_elf_strtab_add (dynstr, name, false);
-  if (dynstr_index == (unsigned long) -1)
-    return false;
-  entry->isym.st_name = dynstr_index;
-
-  eht = elf_hash_table (info);
-
-  entry->next = eht->dynlocal;
-  eht->dynlocal = entry;
-  entry->input_bfd = input_bfd;
-  entry->input_indx = input_indx;
-  eht->dynsymcount++;
-
-  /* Whatever binding the symbol had before, it's now local.  */
-  entry->isym.st_info
-    = ELF_ST_INFO (STB_LOCAL, ELF_ST_TYPE (entry->isym.st_info));
-
-  /* The dynindx will be set at the end of size_dynamic_sections.  */
-
-  return true;
-}
 \f
 /* Read and swap the relocs from the section indicated by SHDR.  This
    may be either a REL or a RELA section.  The relocations are

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

* Re: SIGSEGV in ld at elflink.h:5500
  2002-07-25  0:44   ` SIGSEGV in ld at elflink.h:5500 Alan Modra
@ 2002-07-26 11:57     ` John David Anglin
  2002-07-26 18:31       ` Alan Modra
  0 siblings, 1 reply; 7+ messages in thread
From: John David Anglin @ 2002-07-26 11:57 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils

> bfd/ChangeLog
> 	* elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
> 	as elf_link_record_local_dynamic_symbol.
> 	(_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
> 	(elf_link_record_local_dynamic_symbol): Declare.  Now returns int.
> 	* elflink.h (elf_link_record_local_dynamic_symbol): Move to..
> 	* elflink.c: .. here.  Use bfd_elf_get_elf_syms.  Check whether an
> 	attempt is made to record a symbol in a discarded section, and
> 	return `2' in that case.
> 
> Committing to mainline.  This can go to the branch (assuming no
> objections) when the elf64-hppa problem is proven fixed.

The patch fixes the elf64-hppa problem with section symbols in
excluded link once sections.  I have also checked the patch with
builds and checks of gcc under hppa-linux and hppa64-hp-hpux11.00.
Thus, if there are no other objections, I would like it on the
branch as well.

I have done some more experimentation with using INIT and FINI
sections on hppa64-hp-hpux11.00.  This exposes new problems with
respect to undefweak functions.  I hacked around a bit and ld can
now link a program with undefined weak functions.  However, I get
the following error when such a program executes:

./gengenrtl -h > tmp-genrtl.h
/usr/lib/pa20_64/dld.sl: Unsatisfied code symbol '__deregister_frame_info' in load module './gengenrtl'.
/usr/lib/pa20_64/dld.sl: Unsatisfied code symbol '_Jv_RegisterClasses' in load module './gengenrtl'.
/usr/lib/pa20_64/dld.sl: Unsatisfied code symbol '__register_frame_info' in load module './gengenrtl'.
/bin/sh: 22331 Killed

These symbols are undefined weak

                 w __deregister_frame_info
		 w _Jv_RegisterClasses
		 w __deregister_frame_info

As far as I can tell, the main difference between the hppa64 executable
and a similar executable on hppa-linux is that we have R_PARISC_FPTR64
relocs for the above.  Both have R_PARISC_IPLT relocs for the symbols.
There is also a difference in the type of the symbols (STT_FUNC and
STT_NOTYPE on hppa64 and hppa-linux, respectively) but I don't think
this is the cause of the above.  The basic problem is that the HP
linker and dynamic loader don't like unresolved symbols (other than
a few special ones) of any kind (HP added pthread routine stubs to
libc to work around this problem).  The HP dynamic loader doesn't
create FPTR relocs.  I am wondering if the linker could work around
the above  problem somehow.

This issue is how to handle code like:

extern void __register_frame_info (void *, struct object *)
                                  TARGET_ATTRIBUTE_WEAK;

...

  if (__register_frame_info)
      __register_frame_info (__EH_FRAME_BEGIN__, &object);

It would seem that we would have to get rid of the dynamic relocs
and symbol refererences, and zero the pointer to the plabel.  I don't
know if this is reasonable.  It would make the behavior of the
gnu linker differ from the hp one.

However, first there is another issue.  __deregister_frame_info and
__register_frame_info are defined in libgcc.a, so I don't know why
they weren't linked in.  They aren't weak.

Thoughts?

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

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

* Re: SIGSEGV in ld at elflink.h:5500
  2002-07-26 11:57     ` John David Anglin
@ 2002-07-26 18:31       ` Alan Modra
  2002-07-26 20:58         ` John David Anglin
  2002-07-26 21:59         ` H. J. Lu
  0 siblings, 2 replies; 7+ messages in thread
From: Alan Modra @ 2002-07-26 18:31 UTC (permalink / raw)
  To: John David Anglin; +Cc: binutils, drepper, hjl

On Fri, Jul 26, 2002 at 01:37:23PM -0400, John David Anglin wrote:
> /usr/lib/pa20_64/dld.sl: Unsatisfied code symbol '__register_frame_info' in load module './gengenrtl'.
> /bin/sh: 22331 Killed
> 
> These symbols are undefined weak

This touches on the general issue of exactly how gnu ld should handle
weak symbols.  It's something I'd like to correct post 2.13, as I
believe the current behaviour is wrong.  Ulrich, HJ, do you know
whether there is a proposal to specify weak sym handling in the works
for the ELF gabi?

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

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

* Re: SIGSEGV in ld at elflink.h:5500
  2002-07-26 18:31       ` Alan Modra
@ 2002-07-26 20:58         ` John David Anglin
  2002-07-26 21:59         ` H. J. Lu
  1 sibling, 0 replies; 7+ messages in thread
From: John David Anglin @ 2002-07-26 20:58 UTC (permalink / raw)
  To: Alan Modra; +Cc: binutils, drepper, hjl

> On Fri, Jul 26, 2002 at 01:37:23PM -0400, John David Anglin wrote:
> > /usr/lib/pa20_64/dld.sl: Unsatisfied code symbol '__register_frame_info' in load module './gengenrtl'.
> > /bin/sh: 22331 Killed
> > 
> > These symbols are undefined weak
> 
> This touches on the general issue of exactly how gnu ld should handle
> weak symbols.  It's something I'd like to correct post 2.13, as I
> believe the current behaviour is wrong.  Ulrich, HJ, do you know
> whether there is a proposal to specify weak sym handling in the works
> for the ELF gabi?

After I wrote, I found that removing "-E' from the link spec in pa64-hpux.h
allowed a complete build although there are a still huge number of testsuite
failures still related to this issue.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

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

* Re: SIGSEGV in ld at elflink.h:5500
  2002-07-26 18:31       ` Alan Modra
  2002-07-26 20:58         ` John David Anglin
@ 2002-07-26 21:59         ` H. J. Lu
  2002-07-28 21:09           ` Raise the test bar for hppa64-hpux and hppa-linux John David Anglin
  1 sibling, 1 reply; 7+ messages in thread
From: H. J. Lu @ 2002-07-26 21:59 UTC (permalink / raw)
  To: John David Anglin, binutils, drepper

On Sat, Jul 27, 2002 at 09:37:59AM +0930, Alan Modra wrote:
> On Fri, Jul 26, 2002 at 01:37:23PM -0400, John David Anglin wrote:
> > /usr/lib/pa20_64/dld.sl: Unsatisfied code symbol '__register_frame_info' in load module './gengenrtl'.
> > /bin/sh: 22331 Killed
> > 
> > These symbols are undefined weak
> 
> This touches on the general issue of exactly how gnu ld should handle
> weak symbols.  It's something I'd like to correct post 2.13, as I
> believe the current behaviour is wrong.  Ulrich, HJ, do you know
> whether there is a proposal to specify weak sym handling in the works
> for the ELF gabi?

Check out ld/testsuite/ld-elfweak/elfweak.exp. There are 12 expected
failures. I can work on a patch. But we have to fix glibc first:

http://sources.redhat.com/ml/libc-alpha/2001-09/msg00109.html

Otherwise, Linux may be broken. I don't want to spend my time before
glibc is changed.



H.J.

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

* Raise the test bar for hppa64-hpux and hppa-linux
  2002-07-26 21:59         ` H. J. Lu
@ 2002-07-28 21:09           ` John David Anglin
  2002-07-30  2:08             ` Alan Modra
  0 siblings, 1 reply; 7+ messages in thread
From: John David Anglin @ 2002-07-28 21:09 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils, drepper

> Check out ld/testsuite/ld-elfweak/elfweak.exp. There are 12 expected
> failures. I can work on a patch. But we have to fix glibc first:

We aren't running many elf tests under hppa64-hpux and hppa-linux.  The
enclosed patch enables running these tests and fixes the tests in ld-discard
for hppa.

There are still many fails to resolve in running these tests.  For
example, we use crtend.o in tests with shared links.  Under hppa-linux,
this file is not compiled with "-fPIC".  I can see in the gcc source
some evidence that this file is compiled with "-fPIC" on some systems.
However, we now have crtbeginS.o for shared links.  Don't see any
support for this in configure.host or in any linker scripts.

Under hppa-linux, there are a bunch of fails like:

/home/dave/binutils-2.12.90/objdir/ld/ld-new  -o tmpdir/shnp.so -shared  tmpdir/
sh1np.o tmpdir/sh2np.o
/home/dave/binutils-2.12.90/objdir/ld/ld-new: tmpdir/sh1np.o: relocation R_PARISC_DPREL21L can not be used when making a shared object; recompile with -fPIC
tmpdir/sh1np.o: could not read symbols: Bad value
FAIL: shared (non PIC)

Should I XFAIL these as I think "shared (non PIC)" is a not possible on pa.

I also see a bunch a number fails similar to:

diff tmpdir/shmpp.out /home/dave/binutils-2.12.90/src/ld/testsuite/ld-shared/sha
red.dat
12,15c12,15
< shlib_checkfunptr1 (shlib_shlibvar1) == 0
< shlib_checkfunptr2 (main_called) == 0
< shlib_getfunptr1 () != shlib_shlibvar1
< shlib_getfunptr2 () != main_called
---
> shlib_checkfunptr1 (shlib_shlibvar1) == 1
> shlib_checkfunptr2 (main_called) == 1
> shlib_getfunptr1 () == shlib_shlibvar1
> shlib_getfunptr2 () == main_called
child process exited abnormally
FAIL: shared (PIC main)

Please install if ok.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

2002-07-28  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* ld-discard/discard.exp, ld-scripts/phdrs.exp, ld-scripts/phdrs2.exp,
	ld-selective/sel-dump.exp: Test hppa*64*-*-hpux* target.
	* ld-elfvers/vers.exp, ld-elfvsb/elfvsb.exp, ld-elfweak/elfweak.exp,
	ld-linkonce/linkonce.exp, ld-shared/shared.exp,
	ld-undefined/weak-undef.exp:  Test hppa*64*-*-hpux* and hppa*-*-linux*
	targets.
	* ld-discard/exit.s, ld-discard/extern.s, ld-discard/start.s,
	ld-discard/static.s: Add whitespace before assembler directives.

Index: ld-discard/discard.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-discard/discard.exp,v
retrieving revision 1.1
diff -u -3 -p -r1.1 discard.exp
--- ld-discard/discard.exp	10 Nov 2001 01:17:57 -0000	1.1
+++ ld-discard/discard.exp	28 Jul 2002 18:53:16 -0000
@@ -22,7 +22,10 @@
 # Test for ELF here, so we don't have to qualify on ELF specifically
 # in every .d-file.
 
-if { ![istarget *-*-linux*] && ![istarget *-*-gnu] && ![istarget *-*-elf] } {
+if { ![istarget *-*-linux*] \
+     && ![istarget *-*-gnu] \
+     && ![istarget hppa*64*-*-hpux*] \
+     && ![istarget *-*-elf] } {
     return
 }
 
Index: ld-discard/exit.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-discard/exit.s,v
retrieving revision 1.1
diff -u -3 -p -r1.1 exit.s
--- ld-discard/exit.s	10 Nov 2001 01:17:57 -0000	1.1
+++ ld-discard/exit.s	28 Jul 2002 18:53:16 -0000
@@ -1,6 +1,6 @@
-.globl data
+	.globl data
 	.section	.data.exit,"aw"
 data:
-.globl text
+	.globl text
 	.section	.text.exit,"aw"
 text:
Index: ld-discard/extern.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-discard/extern.s,v
retrieving revision 1.1
diff -u -3 -p -r1.1 extern.s
--- ld-discard/extern.s	10 Nov 2001 01:17:57 -0000	1.1
+++ ld-discard/extern.s	28 Jul 2002 18:53:16 -0000
@@ -1,11 +1,11 @@
-.globl data
+	.globl data
 	.section	.data.exit,"aw"
 data:
-.globl text
+	.globl text
 	.section	.text.exit,"aw"
 text:
-.text
-.globl _start
+	.text
+	.globl _start
 _start:
 	.long	data
 	.section	.debug_info
Index: ld-discard/start.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-discard/start.s,v
retrieving revision 1.1
diff -u -3 -p -r1.1 start.s
--- ld-discard/start.s	10 Nov 2001 01:17:58 -0000	1.1
+++ ld-discard/start.s	28 Jul 2002 18:53:16 -0000
@@ -1,5 +1,5 @@
-.text
-.globl _start
+	.text
+	.globl _start
 _start:
 	.long	data
 	.section	.debug_info
Index: ld-discard/static.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-discard/static.s,v
retrieving revision 1.1
diff -u -3 -p -r1.1 static.s
--- ld-discard/static.s	10 Nov 2001 01:17:58 -0000	1.1
+++ ld-discard/static.s	28 Jul 2002 18:53:16 -0000
@@ -2,8 +2,8 @@
 data:
 	.section	.text.exit,"aw"
 text:
-.text
-.globl _start
+	.text
+	.globl _start
 _start:
 	.long	data
 	.section	.debug_info
Index: ld-elfvers/vers.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elfvers/vers.exp,v
retrieving revision 1.15
diff -u -3 -p -r1.15 vers.exp
--- ld-elfvers/vers.exp	16 Jul 2002 00:15:57 -0000	1.15
+++ ld-elfvers/vers.exp	28 Jul 2002 18:53:16 -0000
@@ -25,7 +25,9 @@ if ![isnative] then {return}
 # This test can only be run on a couple of ELF platforms.
 # Square bracket expressions seem to confuse istarget.
 # This is similar to the test that is used in ld-shared, BTW.
-if { ![istarget i?86-*-sysv4*] \
+if { ![istarget hppa*64*-*-hpux*] \
+     && ![istarget hppa*-*-linux*] \
+     && ![istarget i?86-*-sysv4*] \
      && ![istarget i?86-*-unixware] \
      && ![istarget i?86-*-elf*] \
      && ![istarget i?86-*-linux*] \
Index: ld-elfvsb/elfvsb.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elfvsb/elfvsb.exp,v
retrieving revision 1.13
diff -u -3 -p -r1.13 elfvsb.exp
--- ld-elfvsb/elfvsb.exp	19 Apr 2002 19:28:01 -0000	1.13
+++ ld-elfvsb/elfvsb.exp	28 Jul 2002 18:53:16 -0000
@@ -26,7 +26,9 @@ if ![isnative] then {return}
 
 # This test can only be run on a couple of ELF platforms.
 # Square bracket expressions seem to confuse istarget.
-if { ![istarget i?86-*-linux*] \
+if { ![istarget hppa*64*-*-hpux*] \
+     && ![istarget hppa*-*-linux*] \
+     && ![istarget i?86-*-linux*] \
      && ![istarget ia64-*-linux*] \
      && ![istarget m68k-*-linux*] \
      && ![istarget mips*-*-linux*] \
Index: ld-elfweak/elfweak.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-elfweak/elfweak.exp,v
retrieving revision 1.3
diff -u -3 -p -r1.3 elfweak.exp
--- ld-elfweak/elfweak.exp	14 Sep 2001 23:43:17 -0000	1.3
+++ ld-elfweak/elfweak.exp	28 Jul 2002 18:53:16 -0000
@@ -25,7 +25,9 @@ if ![isnative] then {return}
 # This test can only be run on a couple of ELF platforms.
 # Square bracket expressions seem to confuse istarget.
 # This is similar to the test that is used in ld-shared, BTW.
-if { ![istarget i?86-*-sysv4*] \
+if { ![istarget hppa*64*-*-hpux*] \
+     && ![istarget hppa*-*-linux*] \
+     && ![istarget i?86-*-sysv4*] \
      && ![istarget i?86-*-unixware] \
      && ![istarget i?86-*-elf*] \
      && ![istarget i?86-*-linux*] \
Index: ld-linkonce/linkonce.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-linkonce/linkonce.exp,v
retrieving revision 1.1
diff -u -3 -p -r1.1 linkonce.exp
--- ld-linkonce/linkonce.exp	29 Sep 2001 13:01:16 -0000	1.1
+++ ld-linkonce/linkonce.exp	28 Jul 2002 18:53:16 -0000
@@ -21,7 +21,10 @@
 # Test for ELF here (or really, .gnu.linkonce functionality), so we don't
 # have to qualify on ELF specifically in every .d-file.
 
-if { ![istarget *-*-linux*] && ![istarget *-*-gnu] && ![istarget *-*-elf] } {
+if { ![istarget *-*-linux*] \
+     && ![istarget *-*-gnu] \
+     && ![istarget hppa*64*-*-hpux*] \
+     && ![istarget *-*-elf] } {
     return
 }
 
Index: ld-scripts/phdrs.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/phdrs.exp,v
retrieving revision 1.9
diff -u -3 -p -r1.9 phdrs.exp
--- ld-scripts/phdrs.exp	27 Aug 2001 10:49:55 -0000	1.9
+++ ld-scripts/phdrs.exp	28 Jul 2002 18:53:16 -0000
@@ -22,6 +22,7 @@ if { ![istarget *-*-sysv4*] \
      && ![istarget *-*-unixware*] \
      && ![istarget *-*-elf*] \
      && ![istarget *-*-eabi*] \
+     && ![istarget hppa*64*-*-hpux*] \
      && ![istarget *-*-linux*] \
      && ![istarget *-*-irix5*] \
      && ![istarget *-*-irix6*] \
Index: ld-scripts/phdrs2.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-scripts/phdrs2.exp,v
retrieving revision 1.1
diff -u -3 -p -r1.1 phdrs2.exp
--- ld-scripts/phdrs2.exp	6 Jun 2002 10:03:38 -0000	1.1
+++ ld-scripts/phdrs2.exp	28 Jul 2002 18:53:16 -0000
@@ -19,6 +19,7 @@ if {    ![istarget *-*-sysv4*] \
      && ![istarget *-*-unixware*] \
      && ![istarget *-*-elf*] \
      && ![istarget *-*-eabi*] \
+     && ![istarget hppa*64*-*-hpux*] \
      && ![istarget *-*-linux*] \
      && ![istarget *-*-irix5*] \
      && ![istarget *-*-irix6*] \
Index: ld-selective/sel-dump.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-selective/sel-dump.exp,v
retrieving revision 1.1
diff -u -3 -p -r1.1 sel-dump.exp
--- ld-selective/sel-dump.exp	5 Feb 2002 06:45:15 -0000	1.1
+++ ld-selective/sel-dump.exp	28 Jul 2002 18:53:16 -0000
@@ -20,6 +20,7 @@
 
 if { ![istarget *-*-linux*]
      && ![istarget *-*-gnu]
+     && ![istarget hppa*64*-*-hpux*]
      && ![istarget *-*-elf] } {
     return
 }
Index: ld-shared/shared.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-shared/shared.exp,v
retrieving revision 1.12
diff -u -3 -p -r1.12 shared.exp
--- ld-shared/shared.exp	19 Apr 2002 19:28:06 -0000	1.12
+++ ld-shared/shared.exp	28 Jul 2002 18:53:17 -0000
@@ -28,7 +28,9 @@ if ![isnative] then {return}
 
 # This test can only be run on a couple of ELF platforms.
 # Square bracket expressions seem to confuse istarget.
-if { ![istarget i?86-*-sysv4*] \
+if { ![istarget hppa*64*-*-hpux*] \
+     && ![istarget hppa*-*-linux*] \
+     && ![istarget i?86-*-sysv4*] \
      && ![istarget i?86-*-unixware] \
      && ![istarget i?86-*-elf*] \
      && ![istarget i?86-*-linux*] \
Index: ld-undefined/weak-undef.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-undefined/weak-undef.exp,v
retrieving revision 1.2
diff -u -3 -p -r1.2 weak-undef.exp
--- ld-undefined/weak-undef.exp	13 Mar 2001 06:14:29 -0000	1.2
+++ ld-undefined/weak-undef.exp	28 Jul 2002 18:53:17 -0000
@@ -25,6 +25,7 @@ if { ![istarget *-*-sysv4*] \
      && ![istarget *-*-unixware*] \
      && ![istarget *-*-elf*] \
      && ![istarget *-*-eabi*] \
+     && ![istarget hppa*64*-*-hpux*] \
      && ![istarget *-*-linux*] \
      && ![istarget *-*-irix5*] \
      && ![istarget *-*-irix6*] \

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

* Re: Raise the test bar for hppa64-hpux and hppa-linux
  2002-07-28 21:09           ` Raise the test bar for hppa64-hpux and hppa-linux John David Anglin
@ 2002-07-30  2:08             ` Alan Modra
  0 siblings, 0 replies; 7+ messages in thread
From: Alan Modra @ 2002-07-30  2:08 UTC (permalink / raw)
  To: John David Anglin; +Cc: H. J. Lu, binutils, drepper

On Sun, Jul 28, 2002 at 07:04:13PM -0400, John David Anglin wrote:
> FAIL: shared (non PIC)
> 
> Should I XFAIL these as I think "shared (non PIC)" is a not possible on pa.

Yes please.

> < shlib_checkfunptr1 (shlib_shlibvar1) == 0
> < shlib_checkfunptr2 (main_called) == 0
> < shlib_getfunptr1 () != shlib_shlibvar1
> < shlib_getfunptr2 () != main_called
> ---
> > shlib_checkfunptr1 (shlib_shlibvar1) == 1
> > shlib_checkfunptr2 (main_called) == 1
> > shlib_getfunptr1 () == shlib_shlibvar1
> > shlib_getfunptr2 () == main_called
> child process exited abnormally
> FAIL: shared (PIC main)

I'd guess this one is a failure that needs fixing.  Probably due to
plabels.

> 	* ld-discard/discard.exp, ld-scripts/phdrs.exp, ld-scripts/phdrs2.exp,
> 	ld-selective/sel-dump.exp: Test hppa*64*-*-hpux* target.
> 	* ld-elfvers/vers.exp, ld-elfvsb/elfvsb.exp, ld-elfweak/elfweak.exp,
> 	ld-linkonce/linkonce.exp, ld-shared/shared.exp,
> 	ld-undefined/weak-undef.exp:  Test hppa*64*-*-hpux* and hppa*-*-linux*
> 	targets.
> 	* ld-discard/exit.s, ld-discard/extern.s, ld-discard/start.s,
> 	ld-discard/static.s: Add whitespace before assembler directives.

Installed.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

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

end of thread, other threads:[~2002-07-30  7:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20020724052338.GI26054@bubble.sa.bigpond.net.au>
     [not found] ` <200207250422.g6P4Mrrt007253@hiauly1.hia.nrc.ca>
2002-07-25  0:44   ` SIGSEGV in ld at elflink.h:5500 Alan Modra
2002-07-26 11:57     ` John David Anglin
2002-07-26 18:31       ` Alan Modra
2002-07-26 20:58         ` John David Anglin
2002-07-26 21:59         ` H. J. Lu
2002-07-28 21:09           ` Raise the test bar for hppa64-hpux and hppa-linux John David Anglin
2002-07-30  2:08             ` 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).