debian/0000755000000000000000000000000012233516346007173 5ustar debian/prelink.conf0000644000000000000000000000130312142257236011502 0ustar # This config file contains a list of directories both with binaries # and libraries prelink should consider by default. # If a directory name is prefixed with `-l ', the directory hierarchy # will be walked as long as filesystem boundaries are not crossed. # If a directory name is prefixed with `-h ', symbolic links in a # directory hierarchy are followed. # Directories or files with `-b ' prefix will be blacklisted. -b *.la -b *.png -b *.py -b *.pl -b *.pm -b *.sh -b *.xml -b *.xslt -b *.a -b *.js -b /lib/modules -b /usr/lib/locale -l /usr/local/sbin -l /sbin -l /usr/sbin -l /usr/local/bin -l /bin -l /usr/bin -l /usr/X11R6/bin -l /usr/games -l /usr/local/lib -l /lib -l /usr/lib -l /usr/X11R6/lib debian/rules0000755000000000000000000000406312142410446010247 0ustar #!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. SHELL+= -e #export DH_VERBOSE=1 objdir := $(CURDIR)/obj D := $(CURDIR)/debian/prelink E := $(CURDIR)/debian/execstack configure: configure-stamp configure-stamp: dh_testdir dh_autoreconf mkdir -p $(objdir) cd $(objdir) && ../configure \ --prefix=/ --mandir=/usr/share/man/ --disable-shared \ --disable-libtool-lock --disable-dependency-tracking touch $@ build: build-arch build-indep build-arch: build-stamp build-indep: build-stamp: configure-stamp dh_testdir cd $(objdir) && $(MAKE) # Commented out until a stable test suite has been added #@echo "====================TESTING=========================" #cd $(objdir) && $(MAKE) -C testsuite check-harder #cd $(objdir) && $(MAKE) -C testsuite check-cycle #@echo "====================TESTING END=====================" touch $@ clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp rm -rf $(objdir) dh_autoreconf_clean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs etc/ etc/default/ usr/sbin/ cp $(objdir)/src/prelink $(objdir)/src/execstack $D/usr/sbin/ mv $D/usr/sbin/prelink $D/usr/sbin/prelink.bin cp $(CURDIR)/debian/prelink.sh $D/usr/sbin/prelink chmod 0755 $D/usr/sbin/prelink cp debian/prelink.conf $D/etc/ dh_installdirs -pexecstack usr/sbin/ mv $D/usr/sbin/execstack $E/usr/sbin/ binary-arch: build install dh_testdir dh_testroot dh_installchangelogs ( cat debian/prelink.spec || \ printf "\n%%changelog\nNo upstream changelog\n" ) | \ sed -e '1,/^%changelog$$/d' \ > $D/usr/share/doc/prelink/changelog dh_installdocs TODO doc/prelink.pdf dh_installman doc/prelink.8 debian/prelink.bin.8 dh_installman -pexecstack doc/execstack.8 dh_installcron cp debian/prelink.default $D/etc/default/prelink dh_lintian dh_strip dh_link dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_builddeb binary: binary-arch .PHONY: build-indep build-arch build clean .PHONY: binary-indep binary-arch binary install configure debian/control0000644000000000000000000000165112142411114010563 0ustar Source: prelink Section: admin Priority: optional Maintainer: Debian QA Group Build-Depends: debhelper (>= 6.0.7~), libelfg0-dev, libpopt-dev, libselinux1-dev [linux-any], dh-autoreconf Standards-Version: 3.8.1.0 Package: prelink Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, execstack Description: ELF prelinking utility to speed up dynamic linking The prelink package contains a utility which modifies ELF shared libraries and executables, so that far fewer relocations need to be resolved at runtime and thus programs come up faster. Package: execstack Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Conflicts: prelink (<< 0.0.20090311-2) Replaces: prelink Description: ELF GNU_STACK program header editing utility The execstack package contains a utility which modifies (or adds) the GNU_STACK program header to ELF binaries, and allows changing the executable flag. debian/prelink.spec0000644000000000000000000006134212142257236011520 0ustar Summary: An ELF prelinking utility Name: prelink Version: 0.4.0 Release: 7%{?dist} License: GPLv2+ Group: System Environment/Base %define date 20090311 Source: ftp://people.redhat.com/jakub/prelink/prelink-%{date}.tar.bz2 Source2: prelink.conf Source3: prelink.cron Source4: prelink.sysconfig Buildroot: %{_tmppath}/prelink-root #BuildRequires: libelf-devel >= 0.7.0-5 BuildRequires: elfutils-libelf-devel-static BuildRequires: libselinux-static BuildRequires: glibc-static Requires: glibc >= 2.2.4-18, coreutils, findutils Requires: util-linux, gawk, grep # For now ExclusiveArch: %{ix86} alpha sparc sparcv9 sparc64 s390 s390x x86_64 ppc ppc64 %description The prelink package contains a utility which modifies ELF shared libraries and executables, so that far fewer relocations need to be resolved at runtime and thus programs come up faster. %prep %setup -q -n prelink %build %configure --disable-shared make %{_smp_mflags} echo ====================TESTING========================= make -C testsuite check-harder make -C testsuite check-cycle echo ====================TESTING END===================== %install %{makeinstall} mkdir -p %{buildroot}%{_sysconfdir}/rpm cp -a %{SOURCE2} %{buildroot}%{_sysconfdir} mkdir -p %{buildroot}%{_sysconfdir}/{sysconfig,cron.daily,prelink.conf.d} cp -a %{SOURCE3} %{buildroot}%{_sysconfdir}/cron.daily/prelink cp -a %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/prelink chmod 755 %{buildroot}%{_sysconfdir}/cron.daily/prelink chmod 644 %{buildroot}%{_sysconfdir}/{sysconfig/prelink,prelink.conf} cat > %{buildroot}%{_sysconfdir}/rpm/macros.prelink <<"EOF" # rpm-4.1 verifies prelinked libraries using a prelink undo helper. # Note: The 2nd token is used as argv[0] and "library" is a # placeholder that will be deleted and replaced with the appropriate # library file path. %%__prelink_undo_cmd /usr/sbin/prelink prelink -y library EOF chmod 644 %{buildroot}%{_sysconfdir}/rpm/macros.prelink mkdir -p %{buildroot}/var/{lib/misc,log/prelink} touch %{buildroot}/var/lib/misc/prelink.full touch %{buildroot}/var/lib/misc/prelink.quick touch %{buildroot}/var/lib/misc/prelink.force touch %{buildroot}/var/log/prelink/prelink.log %post touch /var/lib/misc/prelink.force %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc doc/prelink.pdf %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/prelink.conf %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/sysconfig/prelink %{_sysconfdir}/rpm/macros.prelink %dir %attr(0755,root,root) %{_sysconfdir}/prelink.conf.d %{_sysconfdir}/cron.daily/prelink %{_prefix}/sbin/prelink %{_prefix}/bin/execstack %{_mandir}/man8/prelink.8* %{_mandir}/man8/execstack.8* %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/lib/misc/prelink.full %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/lib/misc/prelink.quick %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/lib/misc/prelink.force %dir /var/log/prelink %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/log/prelink/prelink.log %changelog * Wed Mar 11 2009 Jakub Jelinek 0.4.0-7 - fix prelinking on ppc64 * Tue Mar 10 2009 Jakub Jelinek 0.4.0-6 - BuildRequire glibc-static - rebuilt with gcc 4.4 - sparc64 and ARM TLS support * Thu Feb 26 2009 Fedora Release Engineering - 0.4.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Fri Aug 29 2008 Tom "spot" Callaway 0.4.0-4 - fix license tag * Tue Apr 8 2008 Jakub Jelinek 0.4.0-3 - BuildRequire libselinux-static rather than libselinux-devel (#440749) * Tue Oct 9 2007 Jakub Jelinek 0.4.0-1 - add support for -c /etc/prelink.conf.d/*.conf in prelink.conf (#244452) - remove no longer existent directories from default prelink.conf (#248694) - reenabled prelink C++ optimizations which have not triggered any longer since _ZT[IV]* moved into .data.rel.ro section from .data - fixed performance issues in C++ optimizations, especially on GCJ CNI programs (#314051) - other performance improvements, prelink -avmR after prelink -ua now takes roughly 3m4s real time instead of 20m27s before - don't run TEXTREL tests if SELinux is enforcing (#245928) * Fri Dec 1 2006 Jakub Jelinek 0.3.10-1 - MIPS support (Richard Sandiford) - don't leave temporary files behind on prelink --verify failures (#199251) * Fri Oct 27 2006 Jakub Jelinek 0.3.9-4 - fix adjusting of .debug_ranges if end of range is at the end of some section and there is padding before the following one * Mon Oct 23 2006 Jakub Jelinek 0.3.9-3 - rebuilt * Fri Jul 28 2006 Alexandre Oliva 0.3.9-2 - avoid SEGFAULT when sorting cache entries (#197451) * Wed Jul 12 2006 Jakub Jelinek 0.3.9-1 - DT_GNU_HASH support - handle N_BNSYM and N_ENSYM stabs (#198203) - handle upgrades from prelink with smaller maxpagesize to prelink with larger maxpagesize (#196941) * Wed Jun 21 2006 Jakub Jelinek 0.3.8-1 - fix -q mode canonicalization fix, speed up filename canonicalization by caching canonicalization for directories (#145983, #188062) - remove bogus e_shoff assertion check (#194016) - move prelink log file to /var/log/prelink/prelink.log (#194473) - increase x86-64 maxpagesize to 2MB * Mon May 22 2006 Jakub Jelinek 0.3.7-1 - in -q mode, recheck the canonicalized filename to avoid overwriting symlinks with regular files (#145983, #188062) - allow prelinking of binaries with .tbss section * Mon Feb 13 2006 Jakub Jelinek 0.3.6-3 - rebuilt again, disable -Wl,-z,nocopyreloc tests on x86_64, nocopyreloc really doesn't work on this platform (#180552) * Wed Dec 12 2005 Jakub Jelinek 0.3.6-2 - rebuilt with GCC 4.1 - link against newer glibc to fix MALLOC_PERTURB_ bug on 64-bit arches * Thu Sep 1 2005 Jakub Jelinek 0.3.6-1 - remove kernel requires - installed kernel doesn't imply running kernel anyway and in FC5 kernels older than 2.4.20 can't be used anyway, as LinuxThreads are no longer included - don't relocate stabs N_{B,D,}SLINE (reported by Ashley Pittman) * Fri Jul 29 2005 Jakub Jelinek 0.3.5-2 - on ppc32 handle -mbss-plt .got sections created with -msecure-plt capable binutils (#164615) * Fri Jun 10 2005 Jakub Jelinek 0.3.5-1 - support for ppc32 -msecure-plt libraries and binaries - don't crash if d_tag is invalid (#155605) - rebuilt against robustified libelf (CAN-2005-1704) - fix handling of libraries and binaries given on command line without any / characters in the filename * Mon Mar 14 2005 Jakub Jelinek 0.3.4-3 - fix relocation of .debug_loc (#150194) * Sat Mar 5 2005 Jakub Jelinek 0.3.4-2 - rebuilt with GCC 4 * Mon Feb 7 2005 Jakub Jelinek 0.3.4-1 - fix prelink -uo when linked against libselinux (#146637) and when the -o argument filename is on a different filesystem than the object that needs undoing * Tue Nov 23 2004 Jakub Jelinek 0.3.3-1 - if layout code needs to re-prelink some library, make sure all libraries that depend on it are re-prelinked too (#140081) - add several more checks before deciding it is ok to prelink a binary (even if another bug like #140081 was in, these checks should hopefully catch it and refuse to (re-)prelink the binary) - added new PRELINK_NONRPM_CHECK_INTERVAL variable to %{_sysconfdir}/prelink, defaulting to 7 days. Prelink nightly job will not do anything if that interval has not elapsed since last prelinking and and the rpm database has not been modified since that prelinking. This is useful if you rely on rpm/up2date/yum/apt-rpm for library and binary updates. If you combine it with other means (installs from source, tarballs etc.), you probably want to set PRELINK_NONRPM_CHECK_INTERVAL=0. - update prelink man page (#126468) * Tue Oct 12 2004 Jakub Jelinek 0.3.2-11 - update PT_PHDR program header if present when adding new program headers (#133734) * Sat Oct 2 2004 Jakub Jelinek 0.3.2-10 - support for non-absolute blacklist glob patterns (e.g. -b *.la) - cache information about non-prelinkable files (non-ELF, statically linked, too small .dynamic, DT_TEXTREL with conflicts against it; #132056) - other speedups for prelink -aq - for --verify, make sure only read-only fd's are opened for the unprelinked temporary file, otherwise a kernel might ETXTBUSY on it (#133317) - change warning message if some object's dependencies can't be found - add buildrequires libselinux-devel and use %%{_tmppath} instead of /var/tmp in Buildroot (#132879) * Wed Sep 8 2004 Jakub Jelinek 0.3.2-8 - handle overlapping .opd sections on ppc64 * Tue Sep 7 2004 Jakub Jelinek 0.3.2-7 - fix warning messages if setting of security context fails * Wed Jul 7 2004 Jakub Jelinek 0.3.2-6 - change sed separator in testsuite scripts from | to , if \| is present in regexps, as that invokes undefined behaviour which changed between GNU sed 4.0.9 and 4.1 * Wed Jul 7 2004 Jakub Jelinek 0.3.2-5 - skip vDSO in ldd /sbin/init output when determining if /sbin/telinit -u should be run (#127350) * Tue Jun 15 2004 Elliot Lee - rebuilt * Thu May 20 2004 Jakub Jelinek 0.3.2-3 - 4 SPARC 64-bit fixes - use $CC instead of gcc when checking for TLS support in tls*.sh * Thu May 20 2004 Jakub Jelinek 0.3.2-2 - add 2 new TLS testcases (one that fails e.g. with glibc < 2.3.3-28 on IA-32) - SPARC TLS support * Wed May 5 2004 Jakub Jelinek 0.3.2-1 - fix cxx.c:68: find_cxx_sym: Assertive `n < ndeps' failed problem on 32-bit architectures (#118522) - build prelink.cache into temporary file and atomically rename over (#121109) * Wed Mar 17 2004 Jakub Jelinek 0.3.1-2 - unlink temporary files if renaming to the destination or setting of security context failed (#118251) - fix bi-architecture prelinking (#118226) - if prelink called from the cron script fails, note the exit status into /var/log/prelink.log * Thu Mar 4 2004 Jakub Jelinek 0.3.1-1 - add prelink documentation (PDF format) - fix assertion failures on PPC (.sdynbss related, #115925) - fix prelink --help (#115202) - avoid free on uninitialized variable in one error path (#117332) - s/i386/%%{ix86}/ to make mharris happy * Mon Feb 16 2004 Jakub Jelinek 0.3.0-21 - fix prelink abort in certain cases where a new PT_LOAD segment needs to be added (seen on AMD64) * Thu Jan 29 2004 Jakub Jelinek 0.3.0-20 - clearify message about unlisted dependencies - don't do SELinux context copying if is_selinux_enabled () < 0 * Tue Jan 27 2004 Jakub Jelinek 0.3.0-19 - refuse to prelink objects whose dependencies as reported by ldd don't include all dependencies transitively (this can happen when using RPATH and a shared library with the same SONAME exists both in that RPATH and either another RPATH or standard library directories) - add testcase for this - rework .dynsym/.symtab STT_SECTION translation, so that it works with binutils which put only sections not generated by the linker into .dynsym for shared libraries - fix make check, so that it is not confused by 2.6.x kernel VDSOs * Thu Jan 15 2004 Jakub Jelinek 0.3.0-18 - allow R_*_JU?MP_SLOT relocs to point also into .got.plt sections on IA32/AMD64/ARM/s390/s390x/SH * Tue Dec 9 2003 Jakub Jelinek 0.3.0-17 - set SELinux security context immediately before renaming, not before * Tue Nov 18 2003 Jakub Jelinek 0.3.0-15 - blacklist support - use FTW_ACTIONRETVAL if available to avoid even stating of files in blacklisted directory trees - SELinux support * Tue Oct 28 2003 Jakub Jelinek 0.3.0-13 - added execstack.8 manpage - changed order of columns in execstack --query output * Tue Oct 28 2003 Jakub Jelinek 0.3.0-12 - added execstack tool - added -o option, to be used together with -u - free temp_filename in close_dso * Mon Oct 27 2003 Jakub Jelinek 0.3.0-11 - fix adjustement of DT_VALRNGLO .. DT_VALRNGHI and DT_ADDRRNGLO .. DT_ADDRRNGHI dynamic tags when relocating shared libraries - never adjust p_vaddr/p_paddr/p_offset of PT_GNU_STACK segment - allow shell wildcards in %{_sysconfdir}/prelink.conf - fix REL->RELA conversion of shared libraries if .rel.dyn or .rel.plt are last sections in readonly PT_LOAD segment - force full reprelinking on prelink upgrades (well, first time the cron job is run after the upgrade) - require coreutils, findutils, util-linux, gawk and grep * Fri Oct 24 2003 Jakub Jelinek 0.3.0-10 - avoid removing PT_GNU_STACK segment if decreasing first PT_LOAD segment's p_vaddr on IA-32 * Mon Oct 13 2003 Jakub Jelinek 0.3.0-9 - avoid prelink crash if first dependency is to be prelinked because of address space overlaps * Thu Oct 9 2003 Jakub Jelinek 0.3.0-8 - use /var/lib/misc/prelink.full instead of /var/run/prelink.full for last full prelink timestamp (#106721) - warn about UPX compressed binaries or libraries/binaries without section headers (neither can be prelinked obviously) * Mon Oct 6 2003 Jakub Jelinek 0.3.0-7 - don't rely on malloc/calloc/realloc with size 0 returning a unique pointer - fix testsuite, so that it works even if installed glibc/libstdc++ is already prelinked * Wed Sep 17 2003 Jakub Jelinek 0.3.0-6 - fix comment in %{_sysconfdir}/sysconfig/prelink (#106217) * Tue Sep 2 2003 Jakub Jelinek 0.3.0-5 - fix prelink segfault on -z nocombreloc libraries (#103404) - run one make check round with -Wl,-z,nocombreloc to test handling of nocombreloc binaries and libraries * Fri Aug 15 2003 Jakub Jelinek 0.3.0-4 - redirect prelink's stderr from the cron job to prelink.log (#102456) * Mon Aug 11 2003 Jakub Jelinek 0.3.0-3 - fix DT_CHECKSUM computation - do STT_LOCAL symbol frobbing and .mdebug updates write_dso would do also before checksum computation (#89953) * Fri Aug 8 2003 Jakub Jelinek 0.3.0-2 - avoid assertion failures when changing PROGBITS .bss back into NOBITS .bss (#101813) - add 2 new tests for it * Tue Aug 5 2003 Jakub Jelinek 0.3.0-1 - run prelink from cron automatically, add %{_sysconfdir}/sysconfig/prelink to configure it - update manual page * Tue Jul 1 2003 Jakub Jelinek 0.2.1-2 - fix a thinko in the library path checking code - change R_386_GLOB_DAT into R_386_32 in .gnu.conflict, similarly R_X86_64_GLOB_DAT and R_X86_64_64 - fix a bug in find_free_space which caused "section file offsets not monotonically increasing" errors on some IA-32 binaries - add --md5 and --sha options - use mmap during --verify if possible - add */lib64 directories to prelink.conf * Mon Jun 30 2003 Jakub Jelinek 0.2.1-1 - make sure binaries prelinked for the second and later time without unprelinking in between verify correctly - make sure DT_CHECKSUM computation is the same for newly prelinked and second or later time prelinked libraries - dwarf2 abbrev hash bugfix - don't allow prelinking libraries outside directories specified in config file or on the command line - several new tests for reprelinking - pack non-alloced sections and section header table tightly after the last alloced section * Wed Jun 18 2003 Jakub Jelinek 0.2.0-28 - finish and enable ppc64 - fix ppc BR{,N}TAKEN reloc handling - fix up sh_offset values of zero-sized or SHT_NOBITS section if ld messed them up - issue error about bogus library dependency chains instead of segfaulting (plus testcases for it) * Fri Jun 13 2003 Jakub Jelinek 0.2.0-27 - add --quick mode - new test for --quick mode and also reprelinking of binary against upgraded shared library which needs more conflicts * Mon Jun 2 2003 Jakub Jelinek 0.2.0-26 - don't segfault in C++ optimizations if a conflict from undefined to defined value is seen - some more ppc64 work * Fri May 30 2003 Jakub Jelinek 0.2.0-25 - exec-shield support - with -R, don't randomize just base address from which all libs are layed out, but also slightly randomize order of libraries in the layout queue - add check-harder and check-cycle makefile goals in testsuite/, use it during rpm building * Fri May 23 2003 Jakub Jelinek 0.2.0-24 - optimize out conflicts in G++ 3+ virtual tables if they are just because some method has been called from a binary and thus there is a .plt slot in the binary. This change not only kills lots of conflicts on some KDE programs, but also should speed up runtime (not just startup time), since the hop through .plt is bypassed - added new C++ test - fix a bug in ppc64 fixup .plt code * Thu May 22 2003 Jakub Jelinek 0.2.0-23 - when updating dynamic tags for executable after section reshuffling, check section type as well, so that 0 sized sections don't get the tags attached instead of the proper ones - when an address space conflict is found between libraries for the same executable during layouting, check properly for all remaining conflicts as well * Thu May 15 2003 Jakub Jelinek 0.2.0-22 - don't adjust DT_REL{,A} if it is 0 - allow prelinking of libraries with no dependencies - fix handling of libraries with no lazy relocs, no normal relocs or no relocs at all - some new tests - fix SH (Daniel Jacobowitz) * Mon May 5 2003 Jakub Jelinek 0.2.0-21 - fix prelink on AMD64 - 2 new testcases - fix for debugging prelink_entry_dump/restore * Fri May 2 2003 Jakub Jelinek 0.2.0-20 - ppc TLS - some ppc64 work - avoid using trampolines for nested functions - fix typo in prelink man page (#89247) * Tue Apr 15 2003 Jakub Jelinek 0.2.0-19 - fix find_readonly_space bug which caused doxygen not to be prelinked * Mon Feb 17 2003 Jakub Jelinek 0.2.0-18 - fix section indices in .symtab if non-alloced sections weren't originally monotonically increasing - s390, s390x and Alpha TLS support * Mon Feb 10 2003 Jakub Jelinek 0.2.0-17 - never try to prelink or relocate stripped-to-file debuginfo * Tue Jan 21 2003 Jakub Jelinek 0.2.0-16 - x86-64 TLS support - added one more tls testcase * Fri Dec 13 2002 Jakub Jelinek 0.2.0-15 - hopefully finished IA-32 TLS support - require elfutils 0.72 for various data-swapping fixes * Wed Dec 11 2002 Jakub Jelinek 0.2.0-14 - rebuilt against elfutils 0.69 to fix a make check failure on Alpha * Mon Dec 9 2002 Jakub Jelinek 0.2.0-13 - use ELF_F_PERMISSIVE if defined - be permissive even when doing --reloc-only - fix up .plt section sh_entsize on Alpha * Wed Dec 4 2002 Jakub Jelinek 0.2.0-12 - some more fixes for elfutils * Tue Dec 3 2002 Jakub Jelinek 0.2.0-11 - make it work with elfutils instead of libelf 0.[78] - update to newer auto*/libtool - some more steps towards TLS support, at least --reloc-only should work * Thu Oct 3 2002 Jakub Jelinek 0.2.0-10 - x86-64, s390x and testsuite fixes * Sun Sep 29 2002 Jakub Jelinek 0.2.0-9 - enable on ppc and x86_64 - fix ppc far PLT slot prelink - support --undo on ppc - for bug-compatibility with some unnamed OS changed R_SPARC_RELATIVE --undo - tiny steps towards TLS support on IA-32, more will come * Tue Aug 27 2002 Jakub Jelinek 0.2.0-8 - avoid putting garbage into executable's .gnu.liblist sh_link if we did not have to grow .dynstr - don't segfault on bogus sh_link and sh_info values (#72705) * Mon Aug 26 2002 Jakub Jelinek 0.2.0-7 - when growing allocated shared lib sections (for REL->RELA conversion), make sure !PF_W and PF_W segments don't end up on the same page - when finding space for sections in an executable, make sure it is not included in between two reloc sections - for non-zero SHN_ABS symbols on 32-bit arches mask high 32-bits of st_value (libelf 0.8.x is strict here) * Fri Aug 23 2002 Jakub Jelinek 0.2.0-6 - make it work with libelf 0.8.2 * Fri Jun 21 2002 Tim Powers - automated rebuild * Fri Jun 21 2002 Jakub Jelinek 0.2.0-4 - add %{_sysconfdir}/rpm/macros.prelink * Mon Jun 17 2002 Jakub Jelinek 0.2.0-1 - added --undo and --verify mode - new architectures s390, s390x, arm, sh - handle binaries/shared libraries with non-allocated sections without monotonically increasing sh_offsets - handle .sbss and .sdynbss - fixed a bug in 64-bit LE/BE read routines - removed .rel{,a}.dyn reloc conversion/sorting, it was duplicating ld's -z combreloc and complicated lots of things - fixed STB_LOCAL/STT_SECTION symbol adjusting - use mkstemp for temporary files, allow --verify for binaries/libs on read-only filesystems - added DWARF-2 .debug_ranges adjustement, special case GCC's "set base to 0 and make things absolute instead of relative" trick - allow arches to override default layout mechanism (for ppc) - added some new tests, test --undo and --verify modes in the testsuite - alpha: adjust what R_ALPHA_GLOB_DAT points to too - i386: apply _32 and _PC32 REL relocs, as apply_rel can be called for C++ optimizations before REL->RELA conversion - ppc: layout strategy to satisfy ppc lib location preferences - sparc64: handle R_SPARC_DISP64 - x86-64: adjust what R_X86_64_RELATIVE points to too - link prelink statically, esp. because of --verify mode - run make check during build process * Mon Oct 1 2001 Jakub Jelinek 0.1.3-7 - fix layout code so that -R 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 - 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 - added testsuite - new supported architectures (Alpha including .mdebug section support, Sparc, Sparc 64-bit, X86_64 (the last one untested)), beginning of PPC support * Thu Sep 6 2001 Jakub Jelinek 0.1.3-6 - make sure lib base is always ELF page size aligned * Wed Aug 29 2001 Jakub Jelinek 0.1.3-5 - fix sorting of .rel*.dyn sections, so that all RELATIVE relocs really come first - when DT_RELCOUNT already exists and conversion REL->RELA is done, convert it into DT_RELACOUNT - set conflict lookupent and conflictent to 0 for undefineds - don't bother with DT_REL*COUNT for apps, they cannot have any RELATIVE relocs * Tue Aug 28 2001 Jakub Jelinek 0.1.3-4 - brown paper bag time: when determining if conversion from REL to RELA is needed, check all non-PLT rel sections, including last. This caused prelinking to fail with -z combreloc compiled libraries. * Mon Aug 27 2001 Jakub Jelinek 0.1.3-3 - don't use .gnu.reloc section, use .rel.dyn or .rela.dyn instead - put RELATIVE relocs first, not last, so that DT_REL{,A}COUNT works - put in updated glibc patch - no need for special binutils patch - all is done in the -z combreloc patchset * Tue Jul 24 2001 Jakub Jelinek 0.1.3-2 - use the new DT_GNU_CONFLICT/DT_GNU_LIBLIST/SHT_GNU_LIBLIST constants - unlink *.#prelink# files if necessary * Wed Jul 18 2001 Jakub Jelinek 0.1.3-1 - fix layout.c - create .gnu.prelink_undo section, --undo and --verify modes will use that - some more C++ specific optimizations * Fri Jul 13 2001 Jakub Jelinek 0.1.2-1 - bail out early if ELF object does not have sh_offsets monotonically increasing - disallow prelinking if there are conflicts against read-only segments in shared libraries (ie. non-pic shared libraries - this is better than bailing out for all non-pic shared libraries) - add some C++ specific optimizations to reduce number of conflicts, more to come * Tue Jul 10 2001 Jakub Jelinek 0.1.1-2 - fix incremental prelinking * Tue Jul 10 2001 Jakub Jelinek 0.1.1-1 - relocate stabs and dwarf-2 debugging formats - support both --all and incremental prelinking - handle hardlinks - limit to libraries in %{_sysconfdir}/prelink.conf directories or directories from command line * Tue Jul 3 2001 Jakub Jelinek 0.1.0-1 - new package debian/prelink.lintian-overrides0000644000000000000000000000016412142410424014205 0ustar # Make sure prelink never tries to operate on itself. prelink binary: statically-linked-binary usr/sbin/prelink.bin debian/source/0000755000000000000000000000000012142260122010456 5ustar debian/source/format0000644000000000000000000000001412142260122011664 0ustar 3.0 (quilt) debian/changelog0000644000000000000000000004143712233516277011061 0ustar prelink (0.0.20090925-8) unstable; urgency=low * QA upload. * Add debian/patches/ftbfs-no-copy-dt-needed.patch: (Closes: #713628) - Fixes a FTBFS with The --no-copy-dt-needed linker flag which requires that all needed libraries are explicitly added to the linker command line. -- Andreas Moog Sat, 10 Aug 2013 23:22:16 +0200 prelink (0.0.20090925-7) unstable; urgency=low * QA upload. * m4/libelf.m4: Fixed open() call to include mode, as some gcc configurations disallow using O_CREAT without it. On Ubuntu, this caused an FTBFS on all architectures in prelink's check for proper libelf support (thanks, Ben Collins). * Convert to dh-autoreconf, dropping manual autotools update patches. * Convert to 3.0 (quilt) source format. * Add ${misc:Depends}. * Add build-arch and build-indep targets to debian/rules. * Override statically-linked-binary Lintian error; prelink.bin must remain statically linked so that e.g. it doesn't try to operate on itself. -- Colin Watson Wed, 08 May 2013 09:49:27 +0100 prelink (0.0.20090925-6) unstable; urgency=low * QA upload. * Use system libtool * Remove debian/patches/Makefile.in.dpatch, which is now automatically generated. * Switch back to libelfg0 (since it is up to date on all architectures). -- Michael Gilbert Mon, 11 Jun 2012 14:34:26 -0400 prelink (0.0.20090925-5) unstable; urgency=low * QA upload. * Use libelf instead of libelfg0. -- Michael Gilbert Mon, 11 Jun 2012 10:22:26 -0400 prelink (0.0.20090925-4) unstable; urgency=low * QA upload. * Use system config.sub and config.guess. -- Michael Gilbert Sat, 09 Jun 2012 12:53:24 -0400 prelink (0.0.20090925-3) unstable; urgency=low * QA upload. * Remove explicit libc6-dev dependencies and set selinux dependency as linux-only; making it possible to build on non-linux architectures. -- Michael Gilbert Sat, 09 Jun 2012 03:40:29 -0400 prelink (0.0.20090925-2) unstable; urgency=low * QA upload * debian/control: Set Maintainer: to the QA group, drop Uploaders: * debian/patches/: Add r187.dpatch, r188.dpatch, r189.dpatch and r190.dpatch, cherry-picked from the upstream SVN (svn://sourceware.org/svn/prelink), which define and handle several new DWARF codes emitted by gcc > 4.5 (Closes: #676390) -- Andrey Rahmatullin Thu, 07 Jun 2012 16:14:47 +0600 prelink (0.0.20090925-1) unstable; urgency=low * New upstream release. * debian/{control,rules}: - Split execstack into a separate binary package to avoid dragging the full prelink utility/cron stack into main. (Closes: #543599) Thanks to Kees Cook * debian/control: - Prelink is now supposed to build on any architecture. (Closes: #497328) * debian/patches/timestamp.dpatch - Adds -T options to add timestamp on every error output. (Closes: #367320) * debian/prelink.sh: - Verifies if the programm is being redirected or attached to a TTY. (Closes: #449383) -- Andrés Roldán Mon, 19 Oct 2009 14:07:56 +0000 prelink (0.0.20090311-1) unstable; urgency=low * New upstream release. -- Andrés Roldán Tue, 14 Apr 2009 14:15:26 +0000 prelink (0.0.20071009-1) unstable; urgency=low * New upstream release. * debian/patches/prelink.8.dpatch: - Removed. Already applied by upstream. -- Andrés Roldán Sat, 13 Oct 2007 02:40:10 +0000 prelink (0.0.20061201-1) unstable; urgency=low * New upstream version. -- Andrés Roldán Mon, 4 Dec 2006 16:10:40 +0000 prelink (0.0.20061027-1) unstable; urgency=low * New upstream version. * debian/patches/cache.dpatch: - Removed. Upstream already applied it. -- Andrés Roldán Fri, 10 Nov 2006 20:46:16 +0000 prelink (0.0.20060712-3) unstable; urgency=low * debian/prelink.sh: - Added LC_ALL='C' line to avoid annoying messages with coreutils >= 6.0 -- Andrés Roldán Thu, 19 Oct 2006 13:39:40 +0000 prelink (0.0.20060712-2) unstable; urgency=low * debian/patches/cache.dpatch: - Solves a crash when sorting the cache file. (Closes: #379366) -- Andrés Roldán Tue, 15 Aug 2006 23:38:08 +0000 prelink (0.0.20060712-1) unstable; urgency=low * New upstream version. * debian/prelink.cron-daily: - Uses Debian package database instead of Redhat. (Closes: #338183) * debian/prelink.sh: - Don't exit with 0 code if prelink was aborted by lack of disk space. (Closes: #366320) * debian/patches/prelink.8.dpatch: - Fixed typos in prelink manpage. (Closes: #337187) -- Andrés Roldán Mon, 17 Jul 2006 13:46:50 +0000 prelink (0.0.20060522-1) unstable; urgency=low * New upstream release. * debian/patches/fsync.dpatch: - Patch to ensure writing the data on the disk when a file is renamed. (Closes: #352926) -- Andrés Roldán Wed, 24 May 2006 15:22:16 +0000 prelink (0.0.20050901-1) unstable; urgency=low * New upstream version. * Standards-Version is now 3.6.2. -- Andrés Roldán Wed, 21 Sep 2005 14:25:11 +0000 prelink (0.0.20050610-1) unstable; urgency=low * New upstream release. * debian/prelink.cron.daily: - Don't run prelink with -v option as this gives sensible information of the memory of the binaries on the system. Patch taken from Ubuntu. Thanks to Martin Pitt . (Closes: #314604) * debian/control: - Adds ppc64 support. (Closes: #301097) -- Andrés Roldán Fri, 17 Jun 2005 16:11:01 +0000 prelink (0.0.20050314-1) unstable; urgency=low * New upstream version. * debian/prelink.conf: - Valgrind can be now prelinked. * debian/prelink.spec: - Updated. -- Andrés Roldán Mon, 4 Apr 2005 14:56:47 +0000 prelink (0.0.20050207-2) unstable; urgency=low * debian/prelink.sh: - Added check for existance of directories supposed to be prelinked. (Closes: #288951, #288952) -- Andrés Roldán Thu, 17 Feb 2005 09:09:01 +0000 prelink (0.0.20050207-1) unstable; urgency=low * New upstream release. * debian/prelink.cron.daily: - s|^#!/bin/sh|#!/bin/bash. (Closes: #284706) * debian/copyright: - Put the actual copyright of the package. (Closes: #290217) * debian/prelink.spec: - Updated. -- Andrés Roldán Fri, 11 Feb 2005 17:35:45 +0000 prelink (0.0.20041123-1) unstable; urgency=medium * New upstream release. * debian/prelink.{cron.daily,defaults,spec}: - Updated from upstream. * debian/changelog: Reencoded to UTF-8. -- Andrés Roldán Fri, 3 Dec 2004 14:24:04 +0000 prelink (0.0.20041012-2) unstable; urgency=high * Gentoo patch that executes /sbin/init upon a change made by prelink. It grants that filesystems are umounted on shutdown/reboot. Thanks to Sindre Aamås for the information. (Closes: #281409) -- Andrés Roldán Tue, 16 Nov 2004 00:44:25 +0000 prelink (0.0.20041012-1) unstable; urgency=low * New upstream release. * debian/prelink.sh: - Changed interpreter from /bin/sh to /bin/bash due to a bashism in 'read' command. -- Andrés Roldán Wed, 13 Oct 2004 18:27:29 +0000 prelink (0.0.20041002-2) unstable; urgency=high * debian/patches/00list.alpha: - Removed. Solves FTBFS bug on alpha. -- Andrés Roldán Fri, 8 Oct 2004 17:17:15 +0000 prelink (0.0.20041002-1) unstable; urgency=low * New upstream version. * debian/prelink.conf: - Added some blacklist extensions now supported by this version. * debian/patches/00list: - Commented out ts.dpatch. * debian/patches/typo.dpatch: - Removed as it's already onto the upstream source. -- Andrés Roldán Mon, 4 Oct 2004 16:39:23 +0000 prelink (0.0.20040908-1) unstable; urgency=low * New upstream release. * debian/control: - Removed again sparc from Architecture list. * debian/prelink.sh: - Added timeout to prelink wrapper to avoid hanging up when prompting whether to prelink or not. (closes: #233143) * debian/patches/typo.dpatch: - Changes minor typo. (closes: #265550) * debian/patches/md5sha.dpatch: - Changes confusing reference to --md5 and --sha options. (closes: #274146) -- Andrés Roldán Fri, 1 Oct 2004 14:45:16 +0000 prelink (0.0.20040520-3) unstable; urgency=medium * Removed test phase. It crashes build on some archs in a innecessary way. I won't however add any arch I want unless build success had been reported. (closes: #252968) * Urgency set medium to make this change reach sarge soon. -- Andrés Roldán Thu, 24 Jun 2004 14:56:30 +0000 prelink (0.0.20040520-2) unstable; urgency=low * Removed some tests on alpha. * Added amd64 to the architecture list. (closes: #248851) -- Andrés Roldán Thu, 8 Apr 2004 22:50:22 +0000 prelink (0.0.20040520-1) unstable; urgency=low * New upstream version. * Compiled against libelfg0 0.85. * debian/prelink.sh: Added -P option to df. (closes: #244623) -- Andrés Roldán Thu, 8 Apr 2004 22:50:22 +0000 prelink (0.0.20040317-1) unstable; urgency=low * New upstream version. * debian/prelink.cron-daily: Updated according the new upstream version. * debian/prelink.conf: Updated. Added some blacklist directories including valgrind's. (closes: #241193) * debian/prelink.sh: Updated. Many many thanks to Xavier Hienne . -- Andrés Roldán Thu, 8 Apr 2004 22:50:22 +0000 prelink (0.0.20040304-1) unstable; urgency=low * New upstream version. - Added prelink PDF documentation. * debian/copyright: Updated. Upstream URL has changed. * debian/prelink.default: Updated comments. * debian/control: Updated Build-Depends due to FTBFS on alpha. * debian/prelink.sh: Trivial comment update. * debian/rules: Add prelink.pdf to documentation. -- Andrés Roldán Fri, 5 Mar 2004 23:13:36 -0500 prelink (0.0.20040216-1) unstable; urgency=low * New upstream version. * Improved prelink wrapper script. Now it only warn for partitions potentially prelinked. (closes: #233143, #232828, #234175) * Now build-depend on libc6-dev (>> 2.3.1). (closes: #211066) * Removed reloc2.sh test for all archs because it fails when it's built with optimizations. (closes: #233197) -- Andrés Roldán Mon, 23 Feb 2004 14:13:09 +0000 prelink (0.0.20040129-4) unstable; urgency=low * Removed reloc2.sh test for alpha due to FTBFS bug. -- Andrés Roldán Sat, 14 Feb 2004 17:55:24 +0000 prelink (0.0.20040129-3) unstable; urgency=low * Added prelink.sh wrapper wich will check the disk space and show a warning when it detects low disk space on some partition. -- Andrés Roldán Thu, 12 Feb 2004 03:17:29 +0000 prelink (0.0.20040129-2) unstable; urgency=low * Ouch. Forgot to upgrade the cronfile. This will really fix #231007. -- Andrés Roldán Thu, 12 Feb 2004 00:22:26 +0000 prelink (0.0.20040129-1) unstable; urgency=low * New upstream version (from prelink-0.3.0-20). * Now the default action on the cron script is to do nothing unless it is specifically written on /etc/default/prelink. (closes: #231007) * Documented the prelink problem when you have low disk space. (closes: #223921, #226136) * Removed layout.c.dpatch. (closes: #228453) * Removed sparc from arch list. It definetly won't work again. -- Andrés Roldán Thu, 12 Feb 2004 00:01:18 +0000 prelink (0.0.20040115-1) unstable; urgency=low * New upstream version (from prelink-0.3.0-18). -- Andrés Roldán Tue, 27 Jan 2004 00:00:45 +0000 prelink (0.0.20031209-1) unstable; urgency=low * New upstream release (from prelink-0.3.0-17). - Added SELinux support. - Add Build-Depends on libselinux1-dev. - Add black list support (--black-list option). -- Andrés Roldán Tue, 30 Dec 2003 19:55:27 +0000 prelink (0.0.20031029-3) unstable; urgency=low * Linked again with libelfg0-dev to support prelink for sparc. * Added sparc again to Architecture list. -- Andrés Roldán Wed, 19 Nov 2003 00:35:39 +0000 prelink (0.0.20031029-2) unstable; urgency=low * Built with newer libc6. * Added again TLS tests (Yeah! we have TLS on sid!). * Removed quick1 test. -- Andrés Roldán Fri, 31 Oct 2003 20:31:39 +0000 prelink (0.0.20031029-1) unstable; urgency=low * New upstream version (from prelink-0.3.0-13.src.rpm). - Added execstack(8) program, a tool which sets, clears, or queries executable stack flag of ELF binaries and shared libraries. -- Andrés Roldán Wed, 29 Oct 2003 23:54:44 +0000 prelink (0.0.20031027-1) unstable; urgency=low * Yes, yet another new upstream version (from prelink-0.3.0-11.src.rpm). * Updated debian/prelink.cron.daily. -- Andrés Roldán Tue, 28 Oct 2003 19:17:50 +0000 prelink (0.0.20031024-1) unstable; urgency=low * New upstream version (from prelink-0.3.0-10.src.rpm). * Removed prelink.spec patch. That file was put on debian/ directory. -- Andrés Roldán Tue, 28 Oct 2003 15:53:14 +0000 prelink (0.0.20031012-1) unstable; urgency=low * New upstream release (from prelink-0.3.0-9.src.rpm). (closes: #216076) - Updated prelink.cron.daily. - Updated prelink.spec patch. - Removed dso.c patch. * Updated copyright. -- Andrés Roldán Sun, 26 Oct 2003 16:43:22 +0000 prelink (0.0.20030902-7) unstable; urgency=low * Removed dependency on libelfg0. Will prepare a NMU for libelfg0 to accomplish that. (closes: #215527) -- Andrés Roldán Mon, 13 Oct 2003 17:42:04 +0000 prelink (0.0.20030902-6) unstable; urgency=low * Changed maintainer's e-mail. * Stop supporting prelink on sparc. * Conflicts with libelfg0, no matter what version. -- Andrés Roldán Sat, 11 Oct 2003 19:44:17 +0000 prelink (0.0.20030902-5) unstable; urgency=low * Changed "source" by "." on debian/prelink.cron.daily. (closes: #211487) * Removed TLS tests because glibc does not yet support this. See Bug #211610 for more information. (closes: #211048) * Removed hack from Marco d'Itri that refused to compile undosyslibs test. -- Andrés Roldán Fri, 19 Sep 2003 17:14:05 +0000 prelink (0.0.20030902-4) unstable; urgency=low * Fixed the "oh, you're so stupid" changelog. * Now build depends on dpatch. * Bumped Standards-Version to 3.6.1. -- Andrés Roldán Tue, 16 Sep 2003 23:58:56 +0000 prelink (0.0.20030902-3) unstable; urgency=low * Changed comment in /etc/default/prelink. (closes: #210782) * Compiled with libelf1-dev (from elfutils) since it is the library supported by upstream. Removed build-depend on libelfg0-dev. -- Andrés Roldán Tue, 16 Sep 2003 14:31:10 +0000 prelink (0.0.20030902-2) unstable; urgency=low * New maintainer. * Fixed path on /etc/cron.daily/prelink. (closes: #210691) -- Andrés Roldán Mon, 15 Sep 2003 19:24:59 +0000 prelink (0.0.20030902-1) unstable; urgency=low * New upstream release (from prelink-0.3.0-5.src.rpm). * Added /etc/cron.daily/prelink from the SRPM. * Enabled again the test reloc11.sh. -- Marco d'Itri Thu, 11 Sep 2003 19:57:35 +0200 prelink (0.0.20030522-1) unstable; urgency=low * New upstream release. -- Marco d'Itri Fri, 23 May 2003 19:31:42 +0200 prelink (0.0.20030515-1) unstable; urgency=low * New upstream release. (Closes: #191874, #193548) -- Marco d'Itri Fri, 16 May 2003 14:30:08 +0200 prelink (0.0.20030217-1) unstable; urgency=low * New upstream release (from prelink-0.2.0-18.src.rpm). * Removed arm and s390 from the Architectures list because the package does not build on them. s390 porters beware: a newer would be needed anyway! -- Marco d'Itri Sat, 3 May 2003 15:33:23 +0200 prelink (0.0.20030210-1) unstable; urgency=low * New upstream release. * Fix the package description. (Closes: #175926) * Add a comment about start-stop-daemon to README.Debian. (Closes: #179806) * Depend on a newer libelfg0. (Closes: #179826) -- Marco d'Itri Sun, 16 Feb 2003 12:51:49 +0100 prelink (0.0.20021213-2) unstable; urgency=low * Initial release. -- Marco d'Itri Thu, 2 Jan 2003 01:56:54 +0100 debian/NEWS0000644000000000000000000000076412142257236007700 0ustar prelink (0.0.20030902-1) unstable; urgency=low * Added /etc/cron.daily/prelink. When enabled in /etc/default/prelink, this script will prelink the system every night. -- Marco d'Itri Thu, 11 Sep 2003 19:15:09 +0200 prelink (0.0.20030902-5) unstable; urgency=low * Removed TLS tests because glibc does not yet support this for the x86 architecture. See Bug #211610 for more information. -- Andrés Roldán Fri, 19 Sep 2003 16:54:45 +0000 debian/prelink.default0000644000000000000000000000277612142257236012220 0ustar # Set this to no to disable prelinking altogether # or to yes to enable it. Any other value will # make prelink do nothing. # (if you change this from yes to no prelink -ua # will be run next night to undo prelinking) PRELINKING=unknown # Options to pass to prelink # -m Try to conserve virtual memory by allowing overlapping # assigned virtual memory slots for libraries which # never appear together in one binary # -R Randomize virtual memory slot assignments for libraries. # This makes it slightly harder for various buffer overflow # attacks, since library addresses will be different on each # host using -R. PRELINK_OPTS=-mR # How often should full prelink be run (in days) # Normally, prelink will be run in quick mode, every # $PRELINK_FULL_TIME_INTERVAL days it will be run # in normal mode. Comment this line out if prelink # should be run in normal mode always. PRELINK_FULL_TIME_INTERVAL=14 # How often should prelink run (in days) even if # no packages have been upgraded via dpkg. # If $PRELINK_FULL_TIME_INTERVAL days have not elapsed # yet since last normal mode prelinking, last # quick mode prelinking happened less than # $PRELINK_NONRPM_CHECK_INTERVAL days ago # and no packages have been upgraded by rpm # since last quick mode prelinking, prelink # will not do anything. # Change to # PRELINK_NONRPM_CHECK_INTERVAL=0 # if you want to disable the dpkg database timestamp # check (especially if you don't use dpkg # exclusively to upgrade system libraries and/or binaries). PRELINK_NONRPM_CHECK_INTERVAL=7 debian/compat0000644000000000000000000000000212142257236010370 0ustar 5 debian/prelink.postrm0000644000000000000000000000045712142257236012112 0ustar #!/bin/sh -e case "$1" in remove) rm -f /etc/prelink.cache /var/lib/misc/prelink.full /var/log/prelink.log ;; purge|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument '$1'" >&2 exit 1 ;; esac #DEBHELPER# debian/prelink.bin.80000644000000000000000000000002312142257236011471 0ustar .so man8/prelink.8 debian/README.Debian0000644000000000000000000000327012142257236011235 0ustar Usage ~~~~~ This program will not be executed automatically. You will have to run it every time a new program is installed in the system or configure /etc/default/prelink to have it run every night from crontab. Prelink all executables and libraries on the system (this will take a few minutes and report errors for old or broken binaries which cannot be prelinked): # prelink --all --conserve-memory --random Revert everything: # prelink --all --undo Removing the package will not automatically undo prelinking. Kernel requirements ~~~~~~~~~~~~~~~~~~~ BEWARE: prelinked binaries will probably not work on kernels <= 2.4.10. Do not report bugs if you are not running a modern kernel. prelink and start-stop-daemon ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When stopping a daemon, /sbin/start-stop-daemon may compare the on disk executable with the one loaded in memory. After prelink has run they will differ, so you have to be careful and check you are still able to cleanly shut down your system. The safest option is to run prelink in single user mode. Please see bug #179806 for details. SECURITY ~~~~~~~~ This program does modify executables and libraries. These changes will be reported by programs like checksecurity(8) and tripwire(8). Another thing to have in mind is that prelink will damage your binaries if you are low on disk space. The recommended disk space is at least 50M because prelink adds some sections and segments sometimes to some binaries and shared libraries and it may fulfill your hard disk. See Bug#223921. Some interesting mailing lists threads ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ http://sources.redhat.com/ml/libc-alpha/2001-06/msg00113.html http://gcc.gnu.org/ml/gcc/2001-05/msg01670.html debian/patches/0000755000000000000000000000000012233516277010625 5ustar debian/patches/ts.patch0000644000000000000000000000344412142260060012262 0ustar Description: Remove some tests diff -urN prelink-0.0.20040520.orig/testsuite/Makefile.am prelink-0.0.20040520/testsuite/Makefile.am --- prelink-0.0.20040520.orig/testsuite/Makefile.am 2004-05-14 21:55:10.000000000 +0000 +++ prelink-0.0.20040520/testsuite/Makefile.am 2004-06-03 15:18:21.000000000 +0000 @@ -10,9 +10,8 @@ reloc7.sh reloc8.sh reloc9.sh reloc10.sh reloc11.sh \ shuffle1.sh shuffle2.sh shuffle3.sh shuffle4.sh shuffle5.sh \ shuffle6.sh shuffle7.sh \ - layout1.sh layout2.sh tls1.sh tls2.sh tls3.sh tls4.sh tls5.sh tls6.sh \ - cxx1.sh quick1.sh cycle1.sh cycle2.sh deps1.sh deps2.sh \ - undosyslibs.sh + layout1.sh layout2.sh tls1.sh tls2.sh tls3.sh tls4.sh tls5.sh \ + cxx1.sh cycle1.sh cycle2.sh deps1.sh deps2.sh TESTS_ENVIRONMENT = \ PRELINK="../src/prelink -c ./prelink.conf -C ./prelink.cache --ld-library-path=. --dynamic-linker=`echo ./ld*.so.*[0-9]`" \ CC="$(CC) $(LINKOPTS)" CCLINK="$(CC) -Wl,--dynamic-linker=`echo ./ld*.so.*[0-9]`" \ diff -urN prelink-0.0.20040520.orig/testsuite/Makefile.in prelink-0.0.20040520/testsuite/Makefile.in --- prelink-0.0.20040520.orig/testsuite/Makefile.in 2004-05-14 21:55:27.000000000 +0000 +++ prelink-0.0.20040520/testsuite/Makefile.in 2004-06-03 15:18:05.000000000 +0000 @@ -105,9 +105,8 @@ reloc7.sh reloc8.sh reloc9.sh reloc10.sh reloc11.sh \ shuffle1.sh shuffle2.sh shuffle3.sh shuffle4.sh shuffle5.sh \ shuffle6.sh shuffle7.sh \ - layout1.sh layout2.sh tls1.sh tls2.sh tls3.sh tls4.sh tls5.sh tls6.sh \ - cxx1.sh quick1.sh cycle1.sh cycle2.sh deps1.sh deps2.sh \ - undosyslibs.sh + layout1.sh layout2.sh tls1.sh tls2.sh tls3.sh tls4.sh tls5.sh \ + cxx1.sh cycle1.sh cycle2.sh deps1.sh deps2.sh TESTS_ENVIRONMENT = \ PRELINK="../src/prelink -c ./prelink.conf -C ./prelink.cache --ld-library-path=. --dynamic-linker=`echo ./ld*.so.*[0-9]`" \ debian/patches/dso.c.patch0000644000000000000000000000106512142257612012650 0ustar Description: Changed optimization level --- prelink-0.0.20030902.orig/src/dso.c 2003-08-11 11:55:11.000000000 +0000 +++ prelink-0.0.20030902/src/dso.c 2003-09-16 23:26:16.000000000 +0000 @@ -334,7 +334,13 @@ } else sections[--k] = i; +/* this fails for the statically linked upx executable assert (j == k); +*/ + if (j != k) { + printf("assert(j == k) at dso.c:311 has failed for file %s\n", name); + goto error_out; + } section_cmp_dso = dso; qsort (sections + k, dso->ehdr.e_shnum - k, sizeof (*sections), section_cmp); debian/patches/init.patch0000644000000000000000000000311112142324150012567 0ustar Description: Add method to re-execute /sbin/init upon change made by prelink Bug-Debian: http://bugs.debian.org/281409 Index: b/src/main.c =================================================================== --- a/src/main.c +++ b/src/main.c @@ -58,6 +58,8 @@ const char *prelink_conf = PRELINK_CONF; const char *prelink_cache = PRELINK_CACHE; const char *undo_output; +int noreexecinit; +time_t initctime; const char *argp_program_version = "prelink 1.0"; @@ -111,6 +113,7 @@ {"mmap-region-end", OPT_MMAP_REG_END, "BASE_ADDRESS", OPTION_HIDDEN, "" }, {"seed", OPT_SEED, "SEED", OPTION_HIDDEN, "" }, {"compute-checksum", OPT_COMPUTE_CHECKSUM, 0, OPTION_HIDDEN, "" }, + {"init", 'i', 0, 0, "Do not re-execute init" }, { 0 } }; @@ -222,12 +225,29 @@ case OPT_COMPUTE_CHECKSUM: compute_checksum = 1; break; + case 'i': + noreexecinit=1; + break; default: return ARGP_ERR_UNKNOWN; } return 0; } +time_t get_ctime(const char *file) { + struct stat st; + if(stat(file,&st) == 0) + return st.st_ctime; + return 0; +} + +void checkinit() { + if(initctime != get_ctime("/sbin/init")) { + printf("Executing /sbin/init U\n"); + system("/sbin/init U"); + } +} + static struct argp argp = { options, parse_opt, "[FILES]", argp_doc }; int @@ -247,6 +267,11 @@ argp_parse (&argp, argc, argv, 0, &remaining, 0); + if(!noreexecinit) { + initctime = get_ctime("/sbin/init"); + atexit(checkinit); + } + if (ld_library_path == NULL) ld_library_path = getenv ("LD_LIBRARY_PATH"); debian/patches/prelink.8.patch0000644000000000000000000000335412142257731013461 0ustar Description: Fix typos diff -urN prelink-0.0.20060712.orig/doc/prelink.8 prelink-0.0.20060712/doc/prelink.8 --- prelink-0.0.20060712.orig/doc/prelink.8 2004-11-23 10:37:41.000000000 +0000 +++ prelink-0.0.20060712/doc/prelink.8 2006-07-17 13:53:39.000000000 +0000 @@ -74,7 +74,7 @@ When assigning addresses to libraries, start with random address within architecture dependant virtual address space range. This can make some buffer overflow attacks slightly harder to exploit, -because libraries are not present on the same addresses accross different +because libraries are not present on the same addresses across different machines. Normally, assigning virtual addresses starts at the bottom of architecture dependant range. @@ -176,7 +176,7 @@ .B \-\-md5 This is similar to .I \-\-verify -option, except instead of outputing the content of the binary or library +option, except instead of outputting the content of the binary or library before prelinking to standard output MD5 digest is printed. See .BR md5sum (1). @@ -184,7 +184,7 @@ .B \-\-sha This is similar to .I \-\-verify -option, except instead of outputing the content of the binary or library +option, except instead of outputting the content of the binary or library before prelinking to standard output SHA1 digest is printed. See .BR sha1sum (1). @@ -218,7 +218,7 @@ .I \-h options apply), or particular ELF binaries or shared libraries. Unlike when walking directory hierarchies, specifying a shared library -explicitely on the command line causes it to be prelinked even if no binary +explicitly on the command line causes it to be prelinked even if no binary is linked against it. Normally, only binaries are collected together with all libraries they depend on. .SH EXAMPLES debian/patches/fsync.patch0000644000000000000000000000131112142324141012746 0ustar Description: Ensure to write the data on the disk when renamed a file Index: b/src/cache.c =================================================================== --- a/src/cache.c +++ b/src/cache.c @@ -682,6 +682,7 @@ if (write (fd, &cache, sizeof (cache)) != sizeof (cache) || write (fd, data, len) != len || fchmod (fd, 0644) + || fsync (fd) || close (fd) || rename (prelink_cache_tmp, prelink_cache)) { Index: b/src/dso.c =================================================================== --- a/src/dso.c +++ b/src/dso.c @@ -1630,6 +1630,8 @@ } elf_end (dso->elf); + if (dso_is_rdwr (dso)) + fsync (dso->fd); close (dso->fd); if (dso->elfro) { debian/patches/prelink.h.patch0000644000000000000000000000262312142324131013524 0ustar Index: b/src/prelink.h =================================================================== --- a/src/prelink.h +++ b/src/prelink.h @@ -27,6 +27,45 @@ #include #include +/* http://gcc.gnu.org/ml/gcc/2003-01/msg00922.html */ +#ifndef R_390_TLS_DTPMOD +#define R_390_TLS_DTPMOD 54 +#define R_390_TLS_DTPOFF 55 +#define R_390_TLS_TPOFF 56 +#endif + +/* from http://www.cygwin.com/ml/libc-alpha/2003-02/msg00241.html */ +#ifndef R_PPC_TLS +#define R_PPC_TLS 67 +#define R_PPC_DTPMOD32 68 +#define R_PPC_TPREL16 69 +#define R_PPC_TPREL16_LO 70 +#define R_PPC_TPREL16_HI 71 +#define R_PPC_TPREL16_HA 72 +#define R_PPC_TPREL32 73 +#define R_PPC_DTPREL16 74 +#define R_PPC_DTPREL16_LO 75 +#define R_PPC_DTPREL16_HI 76 +#define R_PPC_DTPREL16_HA 77 +#define R_PPC_DTPREL32 78 +#define R_PPC_GOT_TLSGD16 79 +#define R_PPC_GOT_TLSGD16_LO 80 +#define R_PPC_GOT_TLSGD16_HI 81 +#define R_PPC_GOT_TLSGD16_HA 82 +#define R_PPC_GOT_TLSLD16 83 +#define R_PPC_GOT_TLSLD16_LO 84 +#define R_PPC_GOT_TLSLD16_HI 85 +#define R_PPC_GOT_TLSLD16_HA 86 +#define R_PPC_GOT_TPREL16 87 +#define R_PPC_GOT_TPREL16_LO 88 +#define R_PPC_GOT_TPREL16_HI 89 +#define R_PPC_GOT_TPREL16_HA 90 +#define R_PPC_GOT_DTPREL16 91 +#define R_PPC_GOT_DTPREL16_LO 92 +#define R_PPC_GOT_DTPREL16_HI 93 +#define R_PPC_GOT_DTPREL16_HA 94 +#endif + #ifndef DT_GNU_LIBLIST #define DT_GNU_LIBLIST 0x6ffffef9 #define DT_GNU_LIBLISTSZ 0x6ffffdf7 debian/patches/ftbfs-no-copy-dt-needed.patch0000644000000000000000000000151712233516277016167 0ustar Description:Fixes a FTBFS with The --no-copy-dt-needed linker flag which requires that all needed libraries are explicitly added to the linker command line. Author: Andreas Moog Bug-Debian: http://bugs.debian.org/713628 Forwarded: Per mail to Jakub Jelinek, jakub AT redhat DOT com Last-Update: 2013-08-10 Index: prelink/src/Makefile.am =================================================================== --- prelink.orig/src/Makefile.am 2013-08-10 23:28:39.000000000 +0200 +++ prelink/src/Makefile.am 2013-08-10 23:38:53.094809543 +0200 @@ -21,7 +21,7 @@ verify.c canonicalize.c md5.c md5.h sha.c sha.h \ $(common_SOURCES) $(arch_SOURCES) prelink_LDADD = @LIBGELF@ -prelink_LDFLAGS = -all-static +prelink_LDFLAGS = -all-static -pthread execstack_SOURCES = execstack.c $(common_SOURCES) $(arch_SOURCES) debian/patches/md5sha.patch0000644000000000000000000000124012142324122013005 0ustar Description: Change confusing reference to --md5 and --sha Bug-Debian: http://bugs.debian.org/274146 Index: b/doc/prelink.8 =================================================================== --- a/doc/prelink.8 +++ b/doc/prelink.8 @@ -179,7 +179,7 @@ improbable case of modified file and original file having the same digest or checksum). .TP -.B \-\-md5 +.B \-y \-\-md5 This is similar to .I \-\-verify option, except instead of outputting the content of the binary or library @@ -187,7 +187,7 @@ See .BR md5sum (1). .TP -.B \-\-sha +.B \-y \-\-sha This is similar to .I \-\-verify option, except instead of outputting the content of the binary or library debian/patches/cache.patch0000644000000000000000000000106612142257576012717 0ustar Description: Fix a crash when sorting the cache file diff -urN prelink-0.0.20060712.orig/src/cache.c prelink-0.0.20060712/src/cache.c --- prelink-0.0.20060712.orig/src/cache.c 2006-08-15 23:36:13.000000000 +0000 +++ prelink-0.0.20060712/src/cache.c 2006-08-15 23:36:34.000000000 +0000 @@ -336,8 +336,8 @@ struct prelink_entry *a = * (struct prelink_entry **) A; struct prelink_entry *b = * (struct prelink_entry **) B; - if (a == NULL && b != NULL) - return 1; + if (a == NULL) + return (b != NULL); if (a != NULL && b == NULL) return -1; debian/patches/r189.patch0000644000000000000000000000255212142324160012340 0ustar Description: Add some new DWARF definitions from the upstream r189 Author: Andrey Rahmatullin Index: b/src/dwarf2.c =================================================================== --- a/src/dwarf2.c +++ b/src/dwarf2.c @@ -391,10 +391,13 @@ case DW_OP_consts: case DW_OP_breg0 ... DW_OP_breg31: case DW_OP_fbreg: + case DW_OP_GNU_convert: + case DW_OP_GNU_reinterpret: read_uleb128 (ptr); break; case DW_OP_bregx: case DW_OP_bit_piece: + case DW_OP_GNU_regval_type: read_uleb128 (ptr); read_uleb128 (ptr); break; @@ -431,6 +434,14 @@ ptr += leni; } break; + case DW_OP_GNU_const_type: + read_uleb128 (ptr); + ptr += *ptr + 1; + break; + case DW_OP_GNU_deref_type: + ++ptr; + read_uleb128 (ptr); + break; default: error (0, 0, "%s: Unknown DWARF DW_OP_%d", dso->filename, op); return 1; Index: b/src/dwarf2.h =================================================================== --- a/src/dwarf2.h +++ b/src/dwarf2.h @@ -383,6 +383,11 @@ #define DW_OP_GNU_encoded_addr 0xf1 #define DW_OP_GNU_implicit_pointer 0xf2 #define DW_OP_GNU_entry_value 0xf3 +#define DW_OP_GNU_const_type 0xf4 +#define DW_OP_GNU_regval_type 0xf5 +#define DW_OP_GNU_deref_type 0xf6 +#define DW_OP_GNU_convert 0xf7 +#define DW_OP_GNU_reinterpret 0xf9 #define DW_OP_lo_user 0xe0 #define DW_OP_hi_user 0xff debian/patches/r190.patch0000644000000000000000000000136712142324162012335 0ustar Description: Add some new DWARF definitions from the upstream r190 Author: Andrey Rahmatullin Index: b/src/dwarf2.c =================================================================== --- a/src/dwarf2.c +++ b/src/dwarf2.c @@ -366,6 +366,7 @@ case DW_OP_const4u: case DW_OP_const4s: case DW_OP_call4: + case DW_OP_GNU_parameter_ref: ptr += 4; break; case DW_OP_call_ref: Index: b/src/dwarf2.h =================================================================== --- a/src/dwarf2.h +++ b/src/dwarf2.h @@ -388,6 +388,7 @@ #define DW_OP_GNU_deref_type 0xf6 #define DW_OP_GNU_convert 0xf7 #define DW_OP_GNU_reinterpret 0xf9 +#define DW_OP_GNU_parameter_ref 0xfa #define DW_OP_lo_user 0xe0 #define DW_OP_hi_user 0xff debian/patches/ts2.patch0000644000000000000000000000325112142260070012341 0ustar Description: Remove some tests on alpha diff -urN prelink-0.0.20040520.orig/testsuite/Makefile.am prelink-0.0.20040520/testsuite/Makefile.am --- prelink-0.0.20040520.orig/testsuite/Makefile.am 2004-06-05 15:43:28.000000000 +0000 +++ prelink-0.0.20040520/testsuite/Makefile.am 2004-06-05 15:44:04.000000000 +0000 @@ -10,8 +10,8 @@ reloc7.sh reloc8.sh reloc9.sh reloc10.sh reloc11.sh \ shuffle1.sh shuffle2.sh shuffle3.sh shuffle4.sh shuffle5.sh \ shuffle6.sh shuffle7.sh \ - layout1.sh layout2.sh tls1.sh tls2.sh tls3.sh tls4.sh tls5.sh \ - cxx1.sh cycle1.sh cycle2.sh deps1.sh deps2.sh + tls1.sh tls2.sh tls3.sh tls4.sh tls5.sh \ + cycle1.sh cycle2.sh deps1.sh deps2.sh TESTS_ENVIRONMENT = \ PRELINK="../src/prelink -c ./prelink.conf -C ./prelink.cache --ld-library-path=. --dynamic-linker=`echo ./ld*.so.*[0-9]`" \ CC="$(CC) $(LINKOPTS)" CCLINK="$(CC) -Wl,--dynamic-linker=`echo ./ld*.so.*[0-9]`" \ diff -urN prelink-0.0.20040520.orig/testsuite/Makefile.in prelink-0.0.20040520/testsuite/Makefile.in --- prelink-0.0.20040520.orig/testsuite/Makefile.in 2004-06-05 15:43:28.000000000 +0000 +++ prelink-0.0.20040520/testsuite/Makefile.in 2004-06-05 15:44:36.000000000 +0000 @@ -105,8 +105,8 @@ reloc7.sh reloc8.sh reloc9.sh reloc10.sh reloc11.sh \ shuffle1.sh shuffle2.sh shuffle3.sh shuffle4.sh shuffle5.sh \ shuffle6.sh shuffle7.sh \ - layout1.sh layout2.sh tls1.sh tls2.sh tls3.sh tls4.sh tls5.sh \ - cxx1.sh cycle1.sh cycle2.sh deps1.sh deps2.sh + tls1.sh tls2.sh tls3.sh tls4.sh tls5.sh \ + cycle1.sh cycle2.sh deps1.sh deps2.sh TESTS_ENVIRONMENT = \ PRELINK="../src/prelink -c ./prelink.conf -C ./prelink.cache --ld-library-path=. --dynamic-linker=`echo ./ld*.so.*[0-9]`" \ debian/patches/timestamp.patch0000644000000000000000000000442612142324153013644 0ustar Description: Add -T option to print the timestamp Index: b/doc/prelink.8 =================================================================== --- a/doc/prelink.8 +++ b/doc/prelink.8 @@ -147,6 +147,9 @@ When processing command line directory arguments, limit directory tree walk to a single file system. .TP +.B \-T \-\-timestamp\-output +Prefix output with timestamps. +.TP .B \-u \-\-undo Revert binaries and libraries to their original content before they were prelinked. Index: b/src/main.c =================================================================== --- a/src/main.c +++ b/src/main.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "prelink.h" @@ -50,6 +51,7 @@ enum verify_method_t verify_method; int quick; int compute_checksum; +int timestamp_output; long long seed; GElf_Addr mmap_reg_start = ~(GElf_Addr) 0; GElf_Addr mmap_reg_end = ~(GElf_Addr) 0; @@ -99,6 +101,7 @@ {"undo", 'u', 0, 0, "Undo prelink" }, {"verbose", 'v', 0, 0, "Produce verbose output" }, {"verify", 'y', 0, 0, "Verify file consistency by undoing and redoing prelink and printing original to standard output" }, + {"timestamp-output", 'T', 0, 0, "Prefix output with timestamps" }, {"md5", OPT_MD5, 0, 0, "For verify print MD5 sum of original to standard output instead of content" }, {"sha", OPT_SHA, 0, 0, "For verify print SHA sum of original to standard output instead of content" }, {"dynamic-linker", OPT_DYNAMIC_LINKER, "DYNAMIC_LINKER", @@ -143,6 +146,9 @@ case 'v': ++verbose; break; + case 'T': + timestamp_output = 1; + break; case 'R': random_base |= 1; break; @@ -250,6 +256,19 @@ static struct argp argp = { options, parse_opt, "[FILES]", argp_doc }; +void print_error_prefix(void) +{ + time_t t; + char buf[20]; + + if (timestamp_output) { + t = time(NULL); + if (strftime(buf, 20, "%Y-%m-%d %H:%M:%S", localtime(&t))) + fprintf(stderr, "%s ", buf); + } + fprintf(stderr, "prelink: "); +} + int main (int argc, char *argv[]) { @@ -257,6 +276,8 @@ setlocale (LC_ALL, ""); + error_print_progname = print_error_prefix; + /* Set the default for exec_shield. */ if (! access ("/proc/sys/kernel/exec-shield", F_OK)) exec_shield = 1; debian/patches/series0000644000000000000000000000031312233516277012037 0ustar prelink.h.patch #ts.patch md5sha.patch init.patch fsync.patch #prelink.8.patch #cache.patch timestamp.patch r187.patch r188.patch r189.patch r190.patch open-with-mode.patch ftbfs-no-copy-dt-needed.patch debian/patches/r187.patch0000644000000000000000000000626212142324155012344 0ustar Description: Add some new DWARF definitions from the upstream r187 Author: Andrey Rahmatullin Index: b/src/dwarf2.c =================================================================== --- a/src/dwarf2.c +++ b/src/dwarf2.c @@ -295,8 +295,8 @@ } static int -adjust_location_list (DSO *dso, unsigned char *ptr, size_t len, - GElf_Addr start, GElf_Addr adjust) +adjust_location_list (DSO *dso, struct cu_data *cu, unsigned char *ptr, + size_t len, GElf_Addr start, GElf_Addr adjust) { unsigned char *end = ptr + len; unsigned char op; @@ -366,9 +366,20 @@ case DW_OP_const4u: case DW_OP_const4s: case DW_OP_call4: - case DW_OP_call_ref: ptr += 4; break; + case DW_OP_call_ref: + if (cu == NULL) + { + error (0, 0, "%s: DWARF DW_OP_call_ref shouldn't appear" + " in .debug_frame", dso->filename); + return 1; + } + if (cu->cu_version == 2) + ptr += ptr_size; + else + ptr += 4; + break; case DW_OP_const8u: case DW_OP_const8s: ptr += 8; @@ -393,6 +404,19 @@ ptr += len; } break; + case DW_OP_GNU_implicit_pointer: + if (cu == NULL) + { + error (0, 0, "%s: DWARF DW_OP_GNU_implicit_pointer shouldn't" + " appear in .debug_frame", dso->filename); + return 1; + } + if (cu->cu_version == 2) + ptr += ptr_size; + else + ptr += 4; + read_uleb128 (ptr); + break; default: error (0, 0, "%s: Unknown DWARF DW_OP_%d", dso->filename, op); return 1; @@ -461,8 +485,8 @@ } static int -adjust_dwarf2_loc (DSO *dso, GElf_Addr offset, GElf_Addr base, - GElf_Addr start, GElf_Addr adjust) +adjust_dwarf2_loc (DSO *dso, struct cu_data *cu, GElf_Addr offset, + GElf_Addr base, GElf_Addr start, GElf_Addr adjust) { unsigned char *ptr, *endsec; GElf_Addr low, high; @@ -505,7 +529,7 @@ len = read_16 (ptr); assert (ptr + len <= endsec); - if (adjust_location_list (dso, ptr, len, start, adjust)) + if (adjust_location_list (dso, cu, ptr, len, start, adjust)) return 1; ptr += len; @@ -564,7 +588,7 @@ } else { - if (adjust_dwarf2_loc (dso, addr, base, start, adjust)) + if (adjust_dwarf2_loc (dso, cu, addr, base, start, adjust)) return NULL; } } @@ -654,7 +678,7 @@ case DW_AT_location: case DW_AT_data_member_location: case DW_AT_vtable_elem_location: - if (adjust_location_list (dso, ptr, len, start, adjust)) + if (adjust_location_list (dso, cu, ptr, len, start, adjust)) return NULL; break; default: @@ -942,7 +966,7 @@ /* FALLTHROUGH */ case DW_CFA_def_cfa_expression: len = read_uleb128 (ptr); - if (adjust_location_list (dso, ptr, len, start, adjust)) + if (adjust_location_list (dso, NULL, ptr, len, start, adjust)) return 1; ptr += len; break; Index: b/src/dwarf2.h =================================================================== --- a/src/dwarf2.h +++ b/src/dwarf2.h @@ -358,6 +358,7 @@ #define DW_OP_GNU_push_tls_address 0xe0 #define DW_OP_GNU_uninit 0xf0 #define DW_OP_GNU_encoded_addr 0xf1 +#define DW_OP_GNU_implicit_pointer 0xf2 #define DW_OP_lo_user 0xe0 #define DW_OP_hi_user 0xff debian/patches/r188.patch0000644000000000000000000000606712142324157012352 0ustar Description: Add some new DWARF definitions from the upstream r188 Author: Andrey Rahmatullin Index: b/src/dwarf2.c =================================================================== --- a/src/dwarf2.c +++ b/src/dwarf2.c @@ -400,8 +400,8 @@ break; case DW_OP_implicit_value: { - uint32_t len = read_uleb128 (ptr); - ptr += len; + uint32_t leni = read_uleb128 (ptr); + ptr += leni; } break; case DW_OP_GNU_implicit_pointer: @@ -417,6 +417,20 @@ ptr += 4; read_uleb128 (ptr); break; + case DW_OP_GNU_entry_value: + { + uint32_t leni = read_uleb128 (ptr); + if ((end - ptr) < leni) + { + error (0, 0, "%s: DWARF DW_OP_GNU_entry_value with too large" + " length", dso->filename); + return 1; + } + if (adjust_location_list (dso, cu, ptr, leni, start, adjust)) + return 1; + ptr += leni; + } + break; default: error (0, 0, "%s: Unknown DWARF DW_OP_%d", dso->filename, op); return 1; @@ -678,6 +692,10 @@ case DW_AT_location: case DW_AT_data_member_location: case DW_AT_vtable_elem_location: + case DW_AT_GNU_call_site_value: + case DW_AT_GNU_call_site_data_value: + case DW_AT_GNU_call_site_target: + case DW_AT_GNU_call_site_target_clobbered: if (adjust_location_list (dso, cu, ptr, len, start, adjust)) return NULL; break; Index: b/src/dwarf2.h =================================================================== --- a/src/dwarf2.h +++ b/src/dwarf2.h @@ -79,6 +79,11 @@ #define DW_TAG_class_template 0x4103 #define DW_TAG_GNU_BINCL 0x4104 #define DW_TAG_GNU_EINCL 0x4105 +#define DW_TAG_GNU_template_template_param 0x4106 +#define DW_TAG_GNU_template_parameter_pack 0x4107 +#define DW_TAG_GNU_formal_parameter_pack 0x4108 +#define DW_TAG_GNU_call_site 0x4109 +#define DW_TAG_GNU_call_site_parameter 0x410a #define DW_TAG_lo_user 0x4080 #define DW_TAG_hi_user 0xffff @@ -198,6 +203,24 @@ #define DW_AT_src_coords 0x2104 #define DW_AT_body_begin 0x2105 #define DW_AT_body_end 0x2106 +#define DW_AT_GNU_vector 0x2107 +#define DW_AT_GNU_guarded_by 0x2108 +#define DW_AT_GNU_pt_guarded_by 0x2109 +#define DW_AT_GNU_guarded 0x210a +#define DW_AT_GNU_pt_guarded 0x210b +#define DW_AT_GNU_locks_excluded 0x210c +#define DW_AT_GNU_exclusive_locks_required 0x210d +#define DW_AT_GNU_shared_locks_required 0x210e +#define DW_AT_GNU_odr_signature 0x210f +#define DW_AT_GNU_template_name 0x2110 +#define DW_AT_GNU_call_site_value 0x2111 +#define DW_AT_GNU_call_site_data_value 0x2112 +#define DW_AT_GNU_call_site_target 0x2113 +#define DW_AT_GNU_call_site_target_clobbered 0x2114 +#define DW_AT_GNU_tail_call 0x2115 +#define DW_AT_GNU_all_tail_call_sites 0x2116 +#define DW_AT_GNU_all_call_sites 0x2117 +#define DW_AT_GNU_all_source_call_sites 0x2118 #define DW_AT_lo_user 0x2000 #define DW_AT_hi_user 0x3ff0 @@ -359,6 +382,7 @@ #define DW_OP_GNU_uninit 0xf0 #define DW_OP_GNU_encoded_addr 0xf1 #define DW_OP_GNU_implicit_pointer 0xf2 +#define DW_OP_GNU_entry_value 0xf3 #define DW_OP_lo_user 0xe0 #define DW_OP_hi_user 0xff debian/patches/layout.c.patch0000644000000000000000000000166512142257661013412 0ustar Description: Changed optimization level --- prelink-0.0.20030902.orig/src/layout.c 2003-06-13 15:12:26.000000000 +0000 +++ prelink-0.0.20030902/src/layout.c 2003-09-16 23:26:16.000000000 +0000 @@ -614,7 +614,23 @@ < ((deps[j - 1]->end + max_page_size - 1) & ~(max_page_size - 1)) && (deps[j]->type == ET_DYN || deps[j - 1]->type == ET_DYN)) +{ /* XXX some binaries cause a segfault but I do not know why -- Md*/ + fprintf(stderr, + "Unknown fatal error at src/layout.c:538\n" + "l.binlibs[i]->filename: %s\n" + "deps[j]->base: %lx\n" + "(deps[j - 1]->end + max_page_size - 1) & ~(max_page_size - 1): %ld\n" + "[deps[j - 1]->end: %lx max_page_size: %lu]\n" + "deps[j]->type: %x deps[j - 1]->type: %x\n" + , + l.binlibs[i]->filename, + deps[j]->base, + ((deps[j - 1]->end + max_page_size - 1) & ~(max_page_size - 1)), + deps[j - 1]->end, max_page_size, + deps[j]->type, deps[j - 1]->type + ); abort (); +} } #endif } debian/patches/open-with-mode.patch0000644000000000000000000000116512142324311014466 0ustar Description: Fix open() call to include mode, as required by O_CREAT Author: Ben Collins Forwarded: no Last-Update: 2013-05-08 Index: b/m4/libelf.m4 =================================================================== --- a/m4/libelf.m4 +++ b/m4/libelf.m4 @@ -73,7 +73,7 @@ Elf64_Addr val; Elf_Scn *scn; - fd = open ("conflibelftest", O_RDWR | O_CREAT | O_EXCL); if (fd == -1) exit (1); + fd = open ("conflibelftest", O_RDWR | O_CREAT | O_EXCL, 0644); if (fd == -1) exit (1); unlink ("conflibelftest"); if (write (fd, sparc64_elf, sizeof(sparc64_elf)) != sizeof(sparc64_elf)) exit (1); debian/copyright0000644000000000000000000000131012142257236011120 0ustar It has be taken by Andrés Roldán This package was debianized by Marco d'Itri on Thu, 2 Jan 2003 01:56:54 +0100. It was downloaded from: ftp://people.redhat.com/jakub/prelink/ ftp://download.fedora.redhat.com/pub/fedora/linux/core/development/SRPMS/ Upstream Author: Jakub Jelinek Copyright: Copyright (C) 2001, 2002, 2003, 2004 Red Hat, Inc. Written by Jakub Jelinek , 2001. License: You are free to distribute this software under the terms of the GNU General Public License, Version 2. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2 file. debian/prelink.sh0000644000000000000000000000235712142257236011201 0ustar #!/bin/bash # # Prelink wrapper script # Author: Andres Roldan # Needed to avoid annoying message in coreutils >= 6.0 export LC_ALL='C' # Recommended minimun free space, 50MB min_size=50000 will_prelink="$(for i in $(awk '! /#/ && ! /^-b/ && NF >= 1 {print $NF}' < /etc/prelink.conf); do test -e "$i" && echo "$i"; done)" have_warn=0 df -P $will_prelink | sort | uniq | { have_warn=0 while read part x x size x mount_point; do if $(echo $part | grep -qv "^/"); then continue; fi if [ $size -le "$min_size" ]; then echo "Partition $part ($mount_point) has only $size KB free." >&2 have_warn=1 fi done exit $have_warn # Exit from piped subshell } if [ "$?" -eq "1" ]; then answer="No" if [ -t 1 ]; then echo echo "!! WARNING !!" echo "It's recommended to have at least $min_size KB of disk space." echo "Prelink would _really_ damage the ELF files on those partitions." read -t 20 -p "Do you really want to run prelink? (yes/No): " answer fi if [ "$answer" = "yes" ]; then echo "You were warned. Running prelink..." exec /usr/sbin/prelink.bin "$@" else echo echo "Aborting prelink." exit 1 fi fi >&2 exec /usr/sbin/prelink.bin "$@" debian/prelink.cron.daily0000644000000000000000000000451312142257236012625 0ustar #!/bin/bash . /etc/default/prelink renice +19 -p $$ >/dev/null 2>&1 # Default action. Won't do anything. Bug#231007. if [ "$PRELINKING" != yes ] && [ "$PRELINKING" != no ]; then echo "Default action. Modify /etc/default/prelink to change this." > /var/log/prelink.log exit 0 fi PRELINK_OPTS="$PRELINK_OPTS -T" if [ "$PRELINKING" = no ]; then if [ -f /etc/prelink.cache ]; then echo /usr/sbin/prelink -ua > /var/log/prelink.log /usr/sbin/prelink -ua >> /var/log/prelink.log 2>&1 \ || echo Prelink failed with return value $? >> /var/log/prelink.log rm -f /etc/prelink.cache # Restart init if needed [ -n "$(find `ldd /sbin/init | awk 'NF == 4 { print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u fi exit 0 fi if [ ! -f /etc/prelink.cache -o -f /var/lib/misc/prelink.force ] \ || grep -q '^prelink-ELF0.[0-2]' /etc/prelink.cache; then # If cache does not exist or is from older prelink versions or # if we were asked to explicitely, force full prelinking rm -f /etc/prelink.cache /var/lib/misc/prelink.force PRELINK_OPTS="$PRELINK_OPTS -f" date > /var/lib/misc/prelink.full cp -a /var/lib/misc/prelink.{full,quick} elif [ -n "$PRELINK_FULL_TIME_INTERVAL" \ -a "`find /var/lib/misc/prelink.full -mtime -${PRELINK_FULL_TIME_INTERVAL} 2>/dev/null`" \ = /var/lib/misc/prelink.full ]; then # If no more than PRELINK_NONRPM_CHECK_INTERVAL days elapsed from last prelink # (be it full or quick) and no packages have been upgraded via dpkg since then, # don't do anything. [ "`find /var/lib/misc/prelink.quick -mtime -${PRELINK_NONRPM_CHECK_INTERVAL:-7} 2>/dev/null`" \ -a -f /var/lib/dpkg/status \ -a /var/lib/dpkg/status -ot /var/lib/misc/prelink.quick ] && exit 0 date > /var/lib/misc/prelink.quick # If prelink without -q has been run in the last # PRELINK_FULL_TIME_INTERVAL days, just use quick mode PRELINK_OPTS="$PRELINK_OPTS -q" else date > /var/lib/misc/prelink.full cp -a /var/lib/misc/prelink.{full,quick} fi echo /usr/sbin/prelink -a $PRELINK_OPTS > /var/log/prelink.log /usr/sbin/prelink -a $PRELINK_OPTS >> /var/log/prelink.log 2>&1 \ || echo Prelink failed with return value $? >> /var/log/prelink.log # Restart init if needed [ -n "$(find `ldd /sbin/init | awk 'NF == 4 { print $3 }'` /sbin/init -ctime -1 2>/dev/null )" ] && /sbin/telinit u exit 0