This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

Re: __gmon_start__ issues between 2.1.x and 2.2.x on sparc(?)


On Mon, Feb 19, 2001 at 10:33:06PM +0100, Jakub Jelinek wrote:
> On Mon, Feb 19, 2001 at 01:46:51PM -0500, Ben Collins wrote:
> > Ok, I think I've narrowed down the possible recompiles I need for our
> > upgrade, and yes, dpkg/apt supports that sort of versioned relationship.
> > 
> > Now to get binutils fixed for elf32-sparc, and I guess elf64-sparc while
> > I'm at it.
> 
> I'll look into this tonight.

For what it's worth, I tried adapting the patch which fixed the problem
on PPC to sparc and sparc64 (attached).  Ben says it didn't fix the
issue, however.

Dan

/--------------------------------\  /--------------------------------\
|       Daniel Jacobowitz        |__|        SCS Class of 2002       |
|   Debian GNU/Linux Developer    __    Carnegie Mellon University   |
|         dan@debian.org         |  |       dmj+@andrew.cmu.edu      |
\--------------------------------/  \--------------------------------/
cvs server: Diffing .
Index: elf32-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sparc.c,v
retrieving revision 1.17
diff -u -r1.17 elf32-sparc.c
--- elf32-sparc.c	2001/02/09 16:19:25	1.17
+++ elf32-sparc.c	2001/02/19 19:06:38
@@ -1759,6 +1759,13 @@
 	  /* Mark the symbol as undefined, rather than as defined in
 	     the .plt section.  Leave the value alone.  */
 	  sym->st_shndx = SHN_UNDEF;
+	  /* If the symbol is weak, we do need to clear the value.
+	     Otherwise, the PLT entry would provide a definition for
+	     the symbol even if the symbol wasn't defined anywhere,
+	     and so the symbol would never be NULL.  */
+	  if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK)
+	      == 0)
+	    sym->st_value = 0;
 	}
     }
 
Index: elf64-sparc.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-sparc.c,v
retrieving revision 1.24
diff -u -r1.24 elf64-sparc.c
--- elf64-sparc.c	2001/02/09 17:53:16	1.24
+++ elf64-sparc.c	2001/02/19 19:06:47
@@ -2709,6 +2709,13 @@
 	  /* Mark the symbol as undefined, rather than as defined in
 	     the .plt section.  Leave the value alone.  */
 	  sym->st_shndx = SHN_UNDEF;
+	  /* If the symbol is weak, we do need to clear the value.
+	     Otherwise, the PLT entry would provide a definition for
+	     the symbol even if the symbol wasn't defined anywhere,
+	     and so the symbol would never be NULL.  */
+	  if ((h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR_NONWEAK)
+	      == 0)
+	    sym->st_value = 0;
 	}
     }
 
cvs server: Diffing doc
cvs server: Diffing hosts
cvs server: Diffing po

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