Announcing new prelink release

Jakub Jelinek jakub@redhat.com
Mon Oct 1 08:26:00 GMT 2001


Hi!

I'd like to announce new prelink release, available from
ftp://people.redhat.com/jakub/prelink-20011001.tar.bz2

See my older postings here on the topic or prelink documentation on what
this is for.

Among other things, recent changes include:
- fix layout code so that -R (random start of library placing in virtual
  memory) works
- on IA-32, when there are no R_386_PC32 relocs and no R_386_32 relocs
  with non-zero addend (= memory content), don't convert REL->RELA,
  only switch R_386_32 relocs to R_386_GLOB_DAT (this means 99% of
  libraries/binaries out there can happily use REL relocations and RELA
  must be used only to handle corner cases)
- support creating a new PT_LOAD segment if necessary, if SHT_NOBITS
  sections are small, instead of adding new PT_LOAD segment just add file
  backing to those NOBITS sections (previous prelink releases weren't
  able to prelink some programs with huge number of conflicts, like kmail)
- added testsuite
- new supported architectures (Alpha including .mdebug section support,
  Sparc, Sparc 64-bit, X86-64 (the last one untested)), beginning of PPC
  support

The tarball above includes a libc patch against today CVS glibc, libelf
0.7.0 patch if you're using libelf 0.7.0 (0.7.1 will have this fixed)
and kernel patch (posted today on lkml). To successfully test prelink, you
should use recent binutils (if it does not support -z combreloc, it is not
recent for this) and at least all libraries/binaries which you want to
prelink should be rebuilt with those binutils.

If somebody could test X86-64, I'd be very thankful.

And finally a WARNING: the --undo mode is still not finished, so back your
binaries/libraries first just to be sure.
I usually do:
prelink -avmn 2>&1 | tee /tmp/prelink.log # Prelink in dry mode just to see what will be prelinked
sed -n -e 's/Would prelink //p' /tmp/prelink.log > /save.list
sed -n -e 's/Would link \(.*\) to \(.*\)$/ln -f \2 \1/p' /tmp/prelink.log > /save.link
for i in `cat /save.list`; do mkdir -p /save`dirname $i`; cp -a $i /save$i; done
prelink -avm 2>&1 | tee /tmp/prelink.log # Do the real prelink of whole distro

--undo mode is high on the TODO list though, so this might change soon.

	Jakub



More information about the Binutils mailing list