libelfg0 needs upgraded for prelink
Package: libelfg0
Version: 0.8.0-1
The new glibc 2.3-1 in debian sid glibc cvs (and soon sid itself)
will allow prelinking of binaries. This will require an updated
libelfg0 package. You need to upgrade libelfg0 to
ftp://www.ibiblio.org/pub/Linux/libs/libelf-0.8.2.tar.gz
and include the following two patches that redhat uses...
libelf-0.8.2-hash.patch
----------------------------------------------------------------------------
2002-06-14 Jakub Jelinek <jakub@redhat.com>
* update.c (_elf64_layout): Don't overwrite sh_entsize
unconditionally for ELF64 - some platforms use
64 bit DT_HASH entries.
--- libelf-0.7.0/lib/update.c.jj Fri Jun 12 15:42:39 1998
+++ libelf-0.7.0/lib/update.c Fri Jun 14 10:22:19 2002
@@ -317,7 +317,10 @@ _elf64_layout(Elf *elf, unsigned *flag)
entsize = scn_entsize(elf, version, shdr->sh_type);
if (entsize > 1) {
- rewrite(shdr->sh_entsize, entsize, scn->s_shdr_flags);
+ /* Some architectures use 64-bit hash entries. */
+ if (shdr->sh_type != SHT_HASH
+ || shdr->sh_entsize != _fsize(elf->e_class, version, ELF_T_ADDR))
+ rewrite(shdr->sh_entsize, entsize, scn->s_shdr_flags);
}
if (layout) {
-------------------------------------------------------------------------------
libelf-0.8.2-symver.patch
-------------------------------------------------------------------------------
2002-08-26 Jakub Jelinek <jakub@redhat.com>
* lib/verdef.h (xlt_verdef): Don't crash if calculating size of
section which hasn't been loaded yet.
* lib/verneed.h (xlt_verneed): Likewise.
--- libelf-0.8.2/lib/verdef.h.jj 2001-10-07 22:03:02.000000000 +0200
+++ libelf-0.8.2/lib/verdef.h 2002-08-26 19:04:54.000000000 +0200
@@ -138,6 +138,9 @@ xlt_verdef(unsigned char *dst, const uns
if (n < sizeof(verdef_stype)) {
return 0;
}
+ if (dst == NULL && src == NULL) {
+ return n;
+ }
soff = doff = 0;
for (;;) {
const verdef_stype *svd;
--- libelf-0.8.2/lib/verneed.h.jj 2001-10-07 22:03:02.000000000 +0200
+++ libelf-0.8.2/lib/verneed.h 2002-08-26 19:05:18.000000000 +0200
@@ -142,6 +142,9 @@ xlt_verneed(unsigned char *dst, const un
if (n < sizeof(verneed_stype)) {
return 0;
}
+ if (dst == NULL && src == NULL) {
+ return n;
+ }
soff = doff = 0;
for (;;) {
const verneed_stype *svn;
-------------------------------------------------------------------------------
I have been using a locally built debian libelfg0 package with this new
tarball and two patches with glibc 2.2.9x and now glibc 2.3 as well as
the most current prelink from Jakub. On debian ppc sid, prelinking works
prefectly under glibc 2.3-1 with the above requested changes. Can we
please get a new package for libelfg0 out ASAP. Thanks.
Jack
Reply to: