aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-10-28prelink: Add debugging to conflict resolution errorMark Hatle
2015-10-21 Mark Hatle <mark.hatle@windriver.com> * get.c, prelink.h: Add symname to conflict structure * conflict.c: Provide more debuggign on a conflict (symname) Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2015-10-28rtld: Update debugging to be more glibc-2.22 likeMark Hatle
2015-10-21 Mark Hatle <mark.hatle@windriver.com> * rtld/rtld.c: Update debug msg Fix missing dso_list->map = NULL * rtld/dl-lookupX.h: update debug msgs * rtld/dl-load.c: (create_map_object_from_dso_ent) Add ld.so like debug When an executable sets a load address use it Update the load address calculation, prevents visual overlaps * rtld/dl-version.c: update debug msgs * rtld/rtld.h: define _dl_debug_printf to act like ld.so debug define RTLD_DEBUG_PID to set the debug prefix Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2015-10-28rtld: Start sync to glibc 2.22Mark Hatle
2015-10-21 Mark Hatle <mark.hatle@windriver.com> * Resync src/rtld to glibc-2.22 * src/elf.h, src/rtld/*: Update elf.h to glibc 2.22 version 2015-10-21 Mark Hatle <mark.hatle@windriver.com> * rtld/: Resync to glibc-2.22 * rtld/*: Update copyright dates to match glibc-2.22 * rtld/rtld.c: Update the elf_machine_type class entries Add support for ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA via new extern_protected_data function. rename reloc_typeclass to elf_machine_type_class add machine_no_rela, machine_no_rel funcs * rtld/dl-tls.c: (rtld_determine_tlsoffsets) add NIOS2 definition * rtld/dl-lookup.c * rtld/dl-lookupX.h: Add EXTERN_PROTECTED_DATA support * glibc changes directly affecting the implementation: 2013-12-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com> Alan Modra <amodra@gmail.com> * libc/sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_type_class): Use SHN_UNDEF PLT handling for ELFv2 ABI. 2015-01-18 Chung-Lin Tang <cltang@codesourcery.com> Sandra Loosemore <sandra@codesourcery.com> Andrew Jenner <andrew@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * sysdeps/nios2/dl-machine.h: New file. 2015-03-31 H.J. Lu <hongjiu.lu@intel.com> * elf/dl-lookup.c (do_lookup_x): When UNDEF_MAP is NULL, which indicates it is called from do_lookup_x on relocation against protected data, skip the data definion in the executable from copy reloc. (_dl_lookup_symbol_x): Pass ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA, instead of ELF_RTYPE_CLASS_PLT, to do_lookup_x for EXTERN_PROTECTED_DATA relocation against STT_OBJECT symbol. * sysdeps/i386/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_386_GLOB_DAT. * sysdeps/x86_64/dl-machine.h (elf_machine_type_class): Set class to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA for R_X86_64_GLOB_DAT. 2015-07-24 Szabolcs Nagy <szabolcs.nagy@arm.com> * sysdeps/aarch64/dl-machine.h (elf_machine_type_class): Handle ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA. * sysdeps/arm/dl-machine.h (elf_machine_type_class): Handle ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2015-10-27Upstream prelink project appears abandoned, take over the projectMark Hatle
The upstream project appears to be dead now. So switch to a more git friendly directory, no reason to maintain the SVN trunk any longer. 2015-10-22 Mark Hatle <mark.hatle@windriver.com> * Upstream project appears to have been abandoned * Update the project to remove the SVN like 'trunk' dir * Adjust the AUTHORS file * Move the previous ChangeLog to ChangeLog.1 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2015-09-11prelink: --ld-preload= add man page entry and testsuiteMark Hatle
2015-09-11 Mark Hatle <mark.hatle@windriver.com> * doc/prelink.8: Add --ld-preload docs * testsuite/Maekfile.am, testsuite/preload1*: Add test Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2015-09-11src/main.c, rtld/rtld.c: Add --ld-preload optionManinder Singh
prelink fails if there are ld_preload libs present at target with below error. expect libsX.so.1, found /lib/libY.so in dependency order where libY.so.1 is ld_preload lib To use this feature : ./prelink --ld-preload=libpreload1.so:libpreload2.so:.... upto 20 libs Order of libraries to be preloaded is significant. Make sure sequence mentioned in prelink should be same as runtime sequence. 2015-09-11 Vaneet Narang <v.narang@samsung.com> * src/gather.c, src/get.c, src/main.c, src/prelink.h: Add ability to specify preloaded libraries that influence the prelinker. 2015-09-11 Vaneet Narang <v.narang@samsung.com> * rtld/rtld.c: Add ability to specify preloaded libraries Signed-off-by: Vaneet Narang <v.narang@samsung.com> Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Reviewed-by: Ajeet Yadav <ajeet.v@samsung.com> Reviewed-by: Geon-ho Kim <gh007.kim@samsung.com> Adjusted the --help in main.c and rtld/rtld.c slightly. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2015-09-09src/gather.c: cleanup codeManinder Singh
Remove dso NULL check because before calling this API already checking for dso NULL and also dso pointer is used before this check. 2015-09-09 Akhilesh Kumar <akhilesh.k@samsung.com> * src/gather.c: Remove unnecessary dso NULL check Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com> Reviewed-by: Ajeet Yadav <ajeet.y@samsung.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2015-09-09src/rtld/rtld.c: dso validation check fixManinder Singh
dso null pointer check is wrongly placed. 2015-09-09 Maninder Singh <maninder1.s@samsung.com> Mark Hatle <mark.hatle@windriver.com> * rtld/rtld.c: dso null pointer check fix Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Vaneet Narang <v.narang@samsung.com> Reviewed-by: Ajeet Yadav <ajeet.y@samsung.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2015-09-09src/*: realloc fix memory leakManinder Singh
Free previously allocated memory if realloc fails. 2015-09-09 Maninder Singh <maninder1.s@samsung.com> * src/doit.c, src/gather.c, src/undoall.c: Fix realloc memory leak Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Vaneet narang <v.narang@samsung.com> Reviewed-by: Akhilesh Kumar <akhilesh.k@samsung.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2015-09-08src/arch-arm.c: set max_page_size to match new ARM BDF defaultAndrew Stubbs
The maximum page size setting for ARM32 has been changed: https://sourceware.org/ml/binutils/2014-06/msg00228.html The attached patch updates prelink to match. It ought to be harmless when the default page size is smaller. Andrew 2015-09-07 Andrew Stubbs <ams@codesourcery.com> * src/arch-arm.c (PL_ARCH(arm)): Set max_page_size to match the new BFD default. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2015-04-07src/gather.c: Add debug messages for dependencies when not foundManinder Singh
2015-04-06 Mark Hatle <mark.hatle@windriver.com> Maninder Singh <maninder1.s@samsung.com> * src/gather.c: Return rtld error messages on failure prelink gives below error message for failure dependency: ./prelink: /test_binary: Could not find one of the dependencies This provides name of dependent library which is missing like below: ./prelink: /test_binary: Could not find one of the dependencies: ./prelink-rtld: error while loading shared libraries: libB.so: cannot open shared object file: No such file or directory where libB.so is missing dependecy Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Vaneet Narang <v.narang@samsung.com> Reviewed-by: Ajeet Yadav <ajeet.y@samsung.com> Reviewed-by: Geon-ho Kim <gh007.kim@samsung.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2015-04-06rtld/dl-version.c: Add debug for missing load and libcManinder Singh
2015-04-06 Mark Hatle <mark.hatle@windriver.com> Maninder Singh <maninder1.s@samsung.com> * src/rtld/dl-version.c: Add debug for mising ld-linux or libc During cross prelink if we miss out ld-linux.so.* or libc.so.* It prints below info: ./prelink: /test_binary: Could not parse `prelink-rtld: dl-version.c:219: rtld_check_map_versions: Assertion `needed != ((void *)0)' failed.' And thus we miss actual cause for this failure, by this patch we will know failure reason. ./prelink: /test_binary: Could not parse `./prelink-rtld: error while loading shared libraries: ld-linux.so.3' (In this case ld-linux.so.3 was missing) Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Vaneet Narang <v.narang@samsung.com> Reviewed-by: Ajeet Yadav <ajeet.v@samsung.com> Reviewed-by: Geon-ho Kim <gh007.kim@samsung.com> Changed the exit code to 1. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2015-04-06src/get.c: Remove extra check for ld-linux.so.3 in strcmpMark Hatle
2015-03-31 Mark Hatle <mark.hatle@windriver.com> * Based on submission by Maninder Singh <maninder1.s@samsung.com> src/get.c: Remove extra check for ld-linux.so.3 in strcmp (remove first entry, second is already in upstream code) The original submission removed the second entry, maintaining the first. I choose to remove the first entry, and maintain the second as that more closely matches the upstream prelink project and helps remove a minor difference. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
2014-12-10testsuite/Makefile.am: Fix tests for latest autotoolsMark Hatle
2014-12-10 Mark Hatle <mark.hatle@windriver.com> * testsuite/Makefile.am: latest autotools has changed the way TEST_ENVIRONMENT is defined. Remove the $(SHELL) Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2014-12-10.gitignore: Add common filesMark Hatle
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2014-12-10src/rtld: Sync to latest glibc-2.20 rtldMark Hatle
2014-12-10 Mark Hatle <mark.hatle@windriver.com> * Resync src/rtld to glibc-2.20 * src/elf.h, src/rtld/rtld.c, src/rtld/dl-tls.c: Update elf.h to glibc 2.20 version Add basic aarch64 support (do_relocs): fix comparison pltrel_end >= rel_end Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2014-12-10src/rtld: Setup to prepare for glibc-2.20 resyncMark Hatle
2014-12-10 Mark Hatle <mark.hatle@windriver.com> * src/rtld/COPYING, src/rtld/COPYING.LIB, src/rtld/ChangeLog, src/rtld/README-rtld: Add local history information to setup for a resync to glibc-2.20 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2014-12-10arm: Specifically switch the dynamic linker on hard float ABI ARM systemsJon Masters
Original patch is from Fedora: http://marc.info/?l=fedora-arm&m=135417053128837&w=2 The prelink utility currently has the notion that a given architecture will have only one possible dynamic_linker path. Unfortunately, on ARM, we have two ABIs that might be in use, depending upon hard or soft float ABI use. Fortunately, prelink is aware of the linker possibilities so will not fall over like on SPARC, since it will match on either of the linker paths when matching the linker, but when examining ELF headers, it throws a (harmless-ish) warning on ARMv7 that this patch removes. Signed-off-by: Jon Masters <jcm@jonmasters.org> cross-prelinker supports two dynamic linkers. I adjusted the patch to replace the old OABI linker, as it's no longer commonly used. 2014-12-09 Jon Masters <jcm@jonmasters.org> Mark Hatle <mark.hatle@windriver.com> * src/arch-arm.c: Remove support for OABI arm ld-linux.so.2 Add support for hard float ld-linux-armhf.so.3 * src/rtld/rtld.c: Add ld-linux-armhf.so.3 as a ldso name Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2014-08-25Implement IFUNC supportYasir-Khan
See: https://bugzilla.redhat.com/show_bug.cgi?id=1009601 2014-08-13 Kyle McMartin <kmcmartin@redhat.com> Jakub Jelinek <jakub@redhat.com> Julian Brown <julian@codesourcery.com> * testsuite/ifunc.h: Add ARM support. * src/prelink.h (R_ARM_IRELATIVE): Define. * src/arch-arm.c (arm_adjust_rel, arm_adjust_rela) (arm_prelink_rel, arm_prelink_rela, arm_apply_conflict_rela) (arm_rela_to_rel, arm_rel_to_rela, arm_undo_prelink_rel): Handle R_ARM_IRELATIVE. (arm_prelink_conflict_rel, arm_prelink_conflict_rela): Handle R_ARM_IRELATIVE, ifunc conflicts. Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Yasir-Khan <yasir_khan@mentor.com> (original patch modified to apply) Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2014-07-22Always create a conflict for R_ARM_TLS_DESC relocsMaciej W. Rozycki
This is a bit obscure. In my testing, for the purpose of upstreaming, of the glibc change to support ARM TLS descriptors in prelinked binaries (cf upstream BZ #17078, https://sourceware.org/bugzilla/show_bug.cgi?id=17078) I have come across a problem where all programs prelinked against glibc binaries using ARM TLS descriptors themselves segfaulted in the normal exit path, where libc.so's own TLS destructors are called. I have tracked it down to the GOT entry (pointed to by the DT_TLSDESC_GOT dynamic tag) meant to point to the lazy TLS descriptor resolver (pointed to by the DT_TLSDESC_PLT dynamic tag) being left uninitialised and therefore NULL. An attempt to call that resolver caused therefore a segfault. The cause of this lack of initialisation turned out to be an omission in the original fix (dated 2011-04-13 in ChangeLog.cross), that didn't ensure that a conflict entry is created even for these R_ARM_TLS_DESC relocations that refer to a local symbol. Somehow it didn't trigger in testing back when implemented, perhaps glibc didn't require or access the missing entry in code handling TLS destructors then. Such an entry is needed, because for prelinked binaries the DT_TLSDESC_GOT GOT entry is only initialised by the dynamic linker when a conflict is resolved. The change below enforces this conflict entry creation. This fix removes 33 failures in prelink testing with glibc built using ARM TLS descriptors, that is with the `-mtls-dialect=gnu2' GCC option in effect (that is not the default unless explicitly requested at GCC build time): FAIL -> PASS: default/prelink.sum:cxx1.sh FAIL -> PASS: default/prelink.sum:cxx2.sh FAIL -> PASS: default/prelink.sum:cxx3.sh FAIL -> PASS: default/prelink.sum:layout1.sh FAIL -> PASS: default/prelink.sum:layout2.sh FAIL -> PASS: default/prelink.sum:reloc1.sh FAIL -> PASS: default/prelink.sum:reloc10.sh FAIL -> PASS: default/prelink.sum:reloc11.sh FAIL -> PASS: default/prelink.sum:reloc2.sh FAIL -> PASS: default/prelink.sum:reloc3.sh FAIL -> PASS: default/prelink.sum:reloc4.sh FAIL -> PASS: default/prelink.sum:reloc5.sh FAIL -> PASS: default/prelink.sum:reloc6.sh FAIL -> PASS: default/prelink.sum:reloc7.sh FAIL -> PASS: default/prelink.sum:reloc8.sh FAIL -> PASS: default/prelink.sum:reloc9.sh FAIL -> PASS: default/prelink.sum:shuffle1.sh FAIL -> PASS: default/prelink.sum:shuffle2.sh FAIL -> PASS: default/prelink.sum:shuffle3.sh FAIL -> PASS: default/prelink.sum:shuffle4.sh FAIL -> PASS: default/prelink.sum:shuffle5.sh FAIL -> PASS: default/prelink.sum:shuffle6.sh FAIL -> PASS: default/prelink.sum:shuffle7.sh FAIL -> PASS: default/prelink.sum:shuffle8.sh FAIL -> PASS: default/prelink.sum:shuffle9.sh FAIL -> PASS: default/prelink.sum:tls1.sh FAIL -> PASS: default/prelink.sum:tls2.sh FAIL -> PASS: default/prelink.sum:tls3.sh FAIL -> PASS: default/prelink.sum:tls4.sh FAIL -> PASS: default/prelink.sum:tls5.sh FAIL -> PASS: default/prelink.sum:tls6.sh FAIL -> PASS: default/prelink.sum:tls7.sh FAIL -> PASS: default/prelink.sum:undo1.sh 2014-07-22 Maciej W. Rozycki <macro@codesourcery.com> * src/arch-arm.c (arm_prelink_conflict_rel): Always create a conflict for R_ARM_TLS_DESC relocs. (arm_prelink_conflict_rela): Likewise. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2013-10-15Merge to upstream r209Mark Hatle
2013-10-15 Mark Hatle <mark.hatle@windriver.com> * Merged to upstream r209 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2013-10-15 * src/arch-s390.c (s390_prelink_conflict_rela): For R_390_IRELATIVE,jakub
always use that relocation type in the conflict section. git-svn-id: http://sourceware.org/svn/prelink@209 94c539fb-cf18-0410-b60f-edeeb537fa16
2013-10-15 * testsuite/ifunc.h (IFUNC_ASM): Add s390x and s390 version.jakub
git-svn-id: http://sourceware.org/svn/prelink@208 94c539fb-cf18-0410-b60f-edeeb537fa16
2013-10-15 * src/arch-s390.c (s390_prelink_conflict_rela): Fix handling ofjakub
R_390_IRELATIVE. * src/arch-s390x.c (s390x_prelink_conflict_rela): Likewise. git-svn-id: http://sourceware.org/svn/prelink@207 94c539fb-cf18-0410-b60f-edeeb537fa16
2013-10-05 * src/arch-s390.c (s390_prelink_conflict_rela): For R_390_IRELATIVE,20131005upstream-svn-r209jakub
always use that relocation type in the conflict section. git-svn-id: http://sourceware.org/svn/prelink@209 94c539fb-cf18-0410-b60f-edeeb537fa16
2013-10-01 * testsuite/ifunc.h (IFUNC_ASM): Add s390x and s390 version.jakub
git-svn-id: http://sourceware.org/svn/prelink@208 94c539fb-cf18-0410-b60f-edeeb537fa16
2013-09-30 * src/arch-s390.c (s390_prelink_conflict_rela): Fix handling ofjakub
R_390_IRELATIVE. * src/arch-s390x.c (s390x_prelink_conflict_rela): Likewise. git-svn-id: http://sourceware.org/svn/prelink@207 94c539fb-cf18-0410-b60f-edeeb537fa16
2013-08-01 * doc/prelink.8 (--usage): Document it.jakub
(--layout-page-size=): Likewise. git-svn-id: http://sourceware.org/svn/prelink@206 94c539fb-cf18-0410-b60f-edeeb537fa16 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2013-08-01testsuite/unprel1.sh: Enable RUN_HOST for new test.Mark Hatle
2013-08-01 Mark Hatle <mark.hatle@windriver.com> * testsuite/unprel1.sh: Enable RUN_HOST for new test. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2013-08-01 * src/cache.c (prelink_save_cache_check): For ET_CACHE_DYN20130503jakub
or ET_UNPRELINKABLE dependencies, call prelink_save_cache_check recursively. * testsuite/Makefile.am (TESTS): Add unprel1.sh. * testsuite/Makefile.in: Regenerated. * testsuite/unprel1.sh: New test. * testsuite/unprel1.c: New file. * testsuite/unprel1lib1.c: New file. * testsuite/unprel1lib2.c: New file. git-svn-id: http://sourceware.org/svn/prelink@205 94c539fb-cf18-0410-b60f-edeeb537fa16 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2013-08-01 * src/prelink.h (R_390_IRELATIVE): Define if not defined.jakub
git-svn-id: http://sourceware.org/svn/prelink@204 94c539fb-cf18-0410-b60f-edeeb537fa16 Fix conflict Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2013-08-01 * src/arch-s390.c (s390_adjust_rela, s390_prelink_rela,jakub
s390_apply_conflict_rela, s390_prelink_conflict_rela, s390_undo_prelink_rela): Handle R_390_IRELATIVE. * src/arch-s390x.c (s390x_adjust_rela, s390x_prelink_rela, s390x_apply_conflict_rela, s390x_prelink_conflict_rela, s390x_undo_prelink_rela, s390x_reloc_size): Likewise. git-svn-id: http://sourceware.org/svn/prelink@203 94c539fb-cf18-0410-b60f-edeeb537fa16 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2013-07-19 * doc/prelink.8 (--usage): Document it. jakub
(--layout-page-size=): Likewise. git-svn-id: http://sourceware.org/svn/prelink@206 94c539fb-cf18-0410-b60f-edeeb537fa16
2013-05-03 * src/cache.c (prelink_save_cache_check): For ET_CACHE_DYNjakub
or ET_UNPRELINKABLE dependencies, call prelink_save_cache_check recursively. * testsuite/Makefile.am (TESTS): Add unprel1.sh. * testsuite/Makefile.in: Regenerated. * testsuite/unprel1.sh: New test. * testsuite/unprel1.c: New file. * testsuite/unprel1lib1.c: New file. * testsuite/unprel1lib2.c: New file. git-svn-id: http://sourceware.org/svn/prelink@205 94c539fb-cf18-0410-b60f-edeeb537fa16
2013-05-03 * src/prelink.h (R_390_IRELATIVE): Define if not defined.jakub
git-svn-id: http://sourceware.org/svn/prelink@204 94c539fb-cf18-0410-b60f-edeeb537fa16
2013-04-25 * src/arch-s390.c (s390_adjust_rela, s390_prelink_rela,jakub
s390_apply_conflict_rela, s390_prelink_conflict_rela, s390_undo_prelink_rela): Handle R_390_IRELATIVE. * src/arch-s390x.c (s390x_adjust_rela, s390x_prelink_rela, s390x_apply_conflict_rela, s390x_prelink_conflict_rela, s390x_undo_prelink_rela, s390x_reloc_size): Likewise. git-svn-id: http://sourceware.org/svn/prelink@203 94c539fb-cf18-0410-b60f-edeeb537fa16
2013-04-23README.cross: Add patch submission informationMark Hatle
2013-04-23 Mark Hatle <mark.hatle@windriver.com> * README.cross: Add patch submission information based on a suggestion from Tom de Vries. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2013-04-23README.cross: Fix typoTom de Vries
Signed-off-by: Tom de Vries <tom@codesourcery.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2013-04-23arch-mips.c: Add missing initialization of field in PL_ARCH(mips64)Tom de Vries
Add the missing initialization of the rtype_class_valid field in struct PL_ARCH(mips64) arch-mips.c. Without this patch, all but 5 prelink tests fail for mips64. With this patch, all pass. Signed-off-by: Tom de Vries <tom@codesourcery.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2013-04-23 * testsuite/reloc4.sh: Add libraries to link lines to makejakub
testsuite work both with --no-add-needed and with --add-needed, including latest ld.bfd. * testsuite/reloc5.sh: Likewise. * testsuite/reloc8.sh: Likewise. * testsuite/reloc9.sh: Likewise. git-svn-id: http://sourceware.org/svn/prelink@202 94c539fb-cf18-0410-b60f-edeeb537fa16 Fix numerous conflicts Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2013-04-23 * testsuite/ifunc.h (IFUNC_DECL): Fix up .size on ppc64.jakub
* testsuite/cxx1.sh: Add libraries to link lines to make testsuite work both with --no-add-needed and with --add-needed, including latest ld.bfd. * testsuite/cxx2.sh: Likewise. * testsuite/cxx3.sh: Likewise. * testsuite/deps1.sh: Likewise. * testsuite/deps2.sh: Likewise. * testsuite/ifunc1.sh: Likewise. * testsuite/ifunc2.sh: Likewise. * testsuite/ifunc3.sh: Likewise. * testsuite/quick1.sh: Likewise. * testsuite/quick2.sh: Likewise. * testsuite/quick3.sh: Likewise. * testsuite/reloc1.sh: Likewise. * testsuite/reloc10.sh: Likewise. * testsuite/reloc11.sh: Likewise. * testsuite/reloc3.sh: Likewise. * testsuite/reloc6.sh: Likewise. * testsuite/reloc7.sh: Likewise. * testsuite/shuffle1.sh: Likewise. * testsuite/shuffle2.sh: Likewise. * testsuite/shuffle3.sh: Likewise. * testsuite/shuffle4.sh: Likewise. * testsuite/shuffle5.sh: Likewise. * testsuite/shuffle6.sh: Likewise. * testsuite/shuffle7.sh: Likewise. * testsuite/shuffle8.sh: Likewise. * testsuite/shuffle9.sh: Likewise. * testsuite/tls1.sh: Likewise. * testsuite/tls2.sh: Likewise. * testsuite/tls3.sh: Likewise. * testsuite/tls4.sh: Likewise. * testsuite/tls5.sh: Likewise. * testsuite/tls6.sh: Likewise. * testsuite/undo1.sh: Likewise. git-svn-id: http://sourceware.org/svn/prelink@201 94c539fb-cf18-0410-b60f-edeeb537fa16 Fix numerous conflicts... Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2013-04-18 * testsuite/reloc4.sh: Add libraries to link lines to makejakub
testsuite work both with --no-add-needed and with --add-needed, including latest ld.bfd. * testsuite/reloc5.sh: Likewise. * testsuite/reloc8.sh: Likewise. * testsuite/reloc9.sh: Likewise. git-svn-id: http://sourceware.org/svn/prelink@202 94c539fb-cf18-0410-b60f-edeeb537fa16
2013-04-17 * testsuite/ifunc.h (IFUNC_DECL): Fix up .size on ppc64.jakub
* testsuite/cxx1.sh: Add libraries to link lines to make testsuite work both with --no-add-needed and with --add-needed, including latest ld.bfd. * testsuite/cxx2.sh: Likewise. * testsuite/cxx3.sh: Likewise. * testsuite/deps1.sh: Likewise. * testsuite/deps2.sh: Likewise. * testsuite/ifunc1.sh: Likewise. * testsuite/ifunc2.sh: Likewise. * testsuite/ifunc3.sh: Likewise. * testsuite/quick1.sh: Likewise. * testsuite/quick2.sh: Likewise. * testsuite/quick3.sh: Likewise. * testsuite/reloc1.sh: Likewise. * testsuite/reloc10.sh: Likewise. * testsuite/reloc11.sh: Likewise. * testsuite/reloc3.sh: Likewise. * testsuite/reloc6.sh: Likewise. * testsuite/reloc7.sh: Likewise. * testsuite/shuffle1.sh: Likewise. * testsuite/shuffle2.sh: Likewise. * testsuite/shuffle3.sh: Likewise. * testsuite/shuffle4.sh: Likewise. * testsuite/shuffle5.sh: Likewise. * testsuite/shuffle6.sh: Likewise. * testsuite/shuffle7.sh: Likewise. * testsuite/shuffle8.sh: Likewise. * testsuite/shuffle9.sh: Likewise. * testsuite/tls1.sh: Likewise. * testsuite/tls2.sh: Likewise. * testsuite/tls3.sh: Likewise. * testsuite/tls4.sh: Likewise. * testsuite/tls5.sh: Likewise. * testsuite/tls6.sh: Likewise. * testsuite/undo1.sh: Likewise. git-svn-id: http://sourceware.org/svn/prelink@201 94c539fb-cf18-0410-b60f-edeeb537fa16
2013-01-03fix build with automake-1.13.Marko Lindqvist
Rename autoconf input file from deprecated name configure.in to configure.ac Replace AM_CONFIG_HEADER obsoleted in automake-1.13 with AC_CONFIG_HEADERS. Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-09-12Fix for "Could not find variable copy reloc is against" for x86_64Joseph S. Myers
For certain random seeds, the error "Could not find variable copy reloc is against" on x86_64. The problem was use of host size_t in prelink-rtld when target size_t was needed, resulting in certain calculations of addresses in prelink being off by 0x100000000 forthe 32-bit host, 64-bit target combination. This patch arranges for the relevant code to use either uint32_t or uint64_t depending on the ELF file in question (since I'm not confident it would be safe to use a 64-bit type unconditionally). ------ 2012-09-12 Joseph Myers <joseph@codesourcery.com> * src/rtld/dl-lookup.c: Fix variable copy reloc when host/target byte size is different Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-09-08Prelink patch for address range handlingJoseph S. Myers
This patch addresses the problem that the same data address in .debug_loc can be referenced more than once in .debug_info, resulting in it being adjusted more than once - there is no guarantee about whether the adjusted address will be within the existing range of data addresses, and so pass addr_to_sec and be wrongly adjusted a second time, or not. This is fixed by using a hash to avoid adjusting the same bit of debug info more than once. ---- 2012-09-08 Joseph Myers <joseph@codesourcery.com> * src/dwarf2.c: Fix address range handling when dup data addr Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-09-08Prelink patch for address range handlingJoseph S. Myers
One of the differences causing the testsuite failures I described resulted from failure to adjust a DW_AT_high_pc address in debug info. As described in the DWARF4 specification, "The high PC value may be beyond the last valid instruction in the executable." - it describes "the address of the first location past the last instruction associated with the entity". So prelink needs to handle it pointing to the address just after the end of the valid text addresses, which this patch does by subtracting 1. The remaining differences appear to result from location list handling. If I comment out the addr_to_sec call in adjust_location_list (as well as applying the first two patches), that fixes all the testsuite failures, but that's certainly not a correct change; I think all the addr_to_sec calls from there should be passing and a bug elsewhere is causing some to fail. ---- 2012-09-08 Joseph Myers <joseph@codesourcery.com> * src/dwarf2.c: Fix address range handling related to DW_AT_high_pc Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-09-08Fix ARM_TLS_DTPOFF32 addendsJoseph S. Myers
The ARM EABI specifies how addends are handled for R_ARM_TLS_DTPOFF32 relocations, and I believe this makes the arm_need_rel_to_rela change (similar e.g. to MIPS) necessary. However, with this change I see test failures FAIL: quick1.sh FAIL: quick2.sh FAIL: quick3.sh FAIL: undosyslibs.sh that I haven't yet resolved. The other changes result from other places where it appeared to me that the handling of R_ARM_TLS_DTPOFF32 failed to handle addends as described in the EABI - but they make no difference to those test failures. --- 2012-09-08 Joseph Myers <joseph@codesourcery.com> * src/arch-arm.c: Fix ARM_TLS_DTPOFF32 addends Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-08-09src/exec.c: Fix for change to support zero-length PROGBITSJoseph S. Myers
From Joseph S. Myers <joseph@codesourcery.com>: The reloc3 binary for Power, attached, has .sbss (with no copy relocations against it) followed by .bss (with copy relocations against it). So the code decides to generate .dynbss but not .sdynbss. At the point where you inserted the conditional on sh_size > 0, sh_size for .dynbss is still set to 0 - it gets set to a real value later (in the block of code giving the "COPY relocs not present at start of first SHT_NOBITS section" error I see with your patch). The body of the first "if" to which you added the sh_size condition contains code checking "else if (j == new_dynbss || j == new_sdynbss)" - so that code is certainly expecting to handle the new_dynbss section (which has sh_size 0 here). This patch, checking for new_dynbss and new_sdynbss specially, fixes the five failures I saw for Power FAIL: reloc3.sh FAIL: reloc6.sh FAIL: reloc7.sh FAIL: reloc8.sh FAIL: reloc9.sh so getting me clean results there. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2012-07-06Merge branch 'master' into cross_prelinkMark Hatle