summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2011-12-21Merge branch 'prelink-x32' into cross_prelink-x32cross_prelink-x32Mark Hatle
Conflicts: trunk/src/arch-x86_64.c
2011-12-21Add support for new X86_64 - x32 ABI.prelink-x32Mark Hatle
Experimental support for x32, based on the existing X86_64 support. While this has been tested, I consider it experimental, like the x32 ABI. See https://sites.google.com/site/x32abi/home for the ABI document. All work based on version 0.6 -- August 13, 2011 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-12-21Merge branch 'cross_prelink' into cross_prelink-x32Mark Hatle
Conflicts: trunk/ChangeLog.cross trunk/src/rtld/rtld.c
2011-12-21Implement PL_ARCH(arch)Mark Hatle
In order to allow for multiple (related) architectures to be defined in the same file, we allow an arch setting for each PL_ARCH string. The code is based on work originally done by Code Sourcery, LLC. (Now part of Mentor Graphics.) Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-12-15Add support for RPATH/RUN_PATH $ORIGIN, $PLATFORM and $LIBMark Hatle
2011-12-08 Mark Hatle <mark.hatle@windriver.com> * rtld/rtld.c: Add support for $ORIGIN, $PLATFORM and $LIB. Note: $PLATFORM = "" Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-12-15rtld/rtld.c: Fix an assert in dl-version.c when objects couldn't be foundMark Hatle
2011-12-08 Mark Hatle <mark.hatle@windriver.com> * rtld/rtld.c: Fix an issue where missing objects would trigger an assert in dl-version.c * rtld/rtld.h: Add _dl_new_object prototype Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-11-01Add support for new X86_64 - x32 ABI.Mark Hatle
Experimental support for x32, based on the existing X86_64 support. 2011-11-01 Mark Hatle <mark.hatle@windriver.com> * Add experimental support for the new x86_64 x32 ABI * See https://sites.google.com/site/x32abi/home for the ABI document. All work based on version 0.6 -- August 13, 2011 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-10-26Disable AMD Bulldozer runtime detectionMark Hatle
2011-10-26 Mark Hatle <mark.hatle@windriver.com> * Disable automatic detection of AMD Bulldozer for layout page size Unclear why the default size is 32768 on AMD Bulldozer, assume this is a performance issue. I suggest if you are targeting that platform, you manually pass: --layout-page-size=32768 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-10-26Merge remote branch 'remotes/git-svn' into cross_prelinkMark Hatle
2011-10-26 Mark Hatle <mark.hatle@windriver.com> * Merge to upstream r196 * Resolve merge conflicts with src/main.c Conflicts: trunk/src/main.c Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-10-12 * src/main.c (layout_page_size): New variable.jakub
(OPT_LAYOUT_PAGE_SIZE): Define. (options): Add --layout-page-size option. (set_default_layout_page_size): New function in i?86/x86_64 resp. empty macro on other architectures. (main): Call it. * src/arch-i386.c (i386_layout_libs_init): Fail if l->max_page_size is larger than 2MB and exec_shield is true. Compute reg0s as REG0S rounded up to l->max_page_size boundary and use it instead of REG0S. (i386_layout_libs_pre): Compute reg0s as REG0S rounded up to l->max_page_size boundary and use it instead of REG0S. Fix up a pasto in computation of virt parameter for third i386_find_free_addr call. * src/prelink.h (layout_page_size): New decl. * src/layout.c (layout_libs): Set max_page_size and l.max_page_size to maximum of plarch->max_page_size and layout_page_size. Fail if mmap_base or mmap_end aren't max_page_size aligned. * src/arch-ppc.c (ppc_layout_libs_pre): Give up if l->max_page_size is larger than 64KB. git-svn-id: http://sourceware.org/svn/prelink@196 94c539fb-cf18-0410-b60f-edeeb537fa16
2011-09-13Fix printf typecast problemMark Hatle
See http://bugzilla.pokylinux.org/show_bug.cgi?id=1473 Without this fix the printed TLS(...) information is incorrect, which causes the core prelinker code to incorrectly prelink. This bug triggers primarily on x86 (32-bit) hosts, targeting x86 (32-bit) targets and arm targets. 2011-09-13 Mark Hatle <mark.hatle@windriver.com> * Fix printf problem causing prelink-rtld issues on x86 (32-bit) and arm Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-09-01Fix merge (gather.c)Mark Hatle
The merge in gather.c was incorrect. Revert to the previous version of the file. The upstream change was not necessary as the "maybe_pie" function is more robust then the revised PIE detection code. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-08-31Fix tests for direct link of intermediate objects/librariesMark Hatle
2011-08-30 Mark Hatle <mark.hatle@windriver.com> * Update testsuite to work with explicit intermedite objects Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-08-31Merge remote branch 'remotes/git-svn' into cross_prelinkMark Hatle
Conflicts: trunk/src/arch-arm.c trunk/src/gather.c trunk/testsuite/Makefile.in trunk/testsuite/cxx1.sh trunk/testsuite/reloc5.c trunk/testsuite/shuffle2.c 2011-08-30 Mark Hatle <mark.hatle@windriver.com> * Merge to upstream r195 Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-08-31Check for an invalid GNU_HASH entryMark Hatle
We added an assert to check for an invalid GNU_HASH entry. See Yocto bug #1331. On a PPC64 image the GNU_HASH table become corrupt, causing the prelink-rtld to access invalid memory. We want to detect and avoid this in the future. 2011-08-26 Mark Hatle <mark.hatle@windriver.com> * Add a special check for invalid GNU_HASH entries Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-08-31Update reloc_type_classMark Hatle
2011-08-26 Mark Hatle <mark.hatle@windriver.com> * Sync to eglibc 2.13 ld.so code * sync elf_machine_type_class macros for supports archs Signed-off-by: Mark Hatle <mark.hatle@windriver.com
2011-08-31Merge in MIPS supportMark Hatle
Merge MIPS support from ports/mips/.../dl-lookup.c 2011-08-26 Mark Hatle <mark.hatle@windriver.com> * Sync to eglibc 2.13 ld.so code * mips specific items from ports Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-08-31Rework the prelink-rtldMark Hatle
Modernize and rework the prelink-rtld 2011-08-26 Mark Hatle <mark.hatle@windriver.com> * Rename ld-libs.c to rtld.c * Sync to eglibc 2.13 ld.so code Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-08-31Move rtld components into new rtld subdirectoryMark Hatle
2011-08-18 Mark Hatle <mark.hatle@windriver.com> * Move prelink-rtld specific components to src/rtld Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-08-26 * src/arch-arm.c (PL_ARCH): Change .dynamic_linker tojakub
/lib/ld-linux.so.3. git-svn-id: http://sourceware.org/svn/prelink@195 94c539fb-cf18-0410-b60f-edeeb537fa16
2011-08-26 * src/arch-arm.c (PL_ARCH): Change .dynamic_linker tojakub
/lib/ld-linux.so.3. git-svn-id: http://sourceware.org/svn/prelink@194 94c539fb-cf18-0410-b60f-edeeb537fa16
2011-08-25 * src/gather.c (gather_func): When looking for PT_PHDR header,jakub
skip any PT_LOPROC ... PR_HIPROC phdrs. git-svn-id: http://sourceware.org/svn/prelink@193 94c539fb-cf18-0410-b60f-edeeb537fa16
2011-08-25 * testsuite/cxx1.sh: Don't check for any "Removing C++ conflict"jakub
messages on arm. * testsuite/cxx2.sh: Likewise. * testsuite/cxx3.sh: New test. * testsuite/cxx3.C: New file. * testsuite/cxx3.h: New file. * testsuite/cxx3lib1.C: New file. * testsuite/cxx3lib2.C: New file. * testsuite/Makefile.am (TESTS): Add cxx3.sh. * testsuite/Makefile.in: Regenerated. git-svn-id: http://sourceware.org/svn/prelink@192 94c539fb-cf18-0410-b60f-edeeb537fa16
2011-08-25 * testsuite/shuffle2.c: Use %nobits instead of @nobitsjakub
to be arm assembler friendly. * testsuite/shuffle9.c: Likewise. * testsuite/reloc5.c (main): Likewise. git-svn-id: http://sourceware.org/svn/prelink@191 94c539fb-cf18-0410-b60f-edeeb537fa16
2011-08-18Resync elf.h to eglibc 2.13Mark Hatle
2011-06-24Merge branch 'master' into cross_prelinkMark Hatle
Conflicts: trunk/ChangeLog trunk/src/dwarf2.h Add ChangeLog.cross to indicate merge to r190. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-06-22 * src/dwarf2.h (DW_OP_GNU_parameter_ref): Define.jakub
* src/dwarf2.c (adjust_location_list): Handle DW_OP_GNU_parameter_ref. git-svn-id: http://sourceware.org/svn/prelink@190 94c539fb-cf18-0410-b60f-edeeb537fa16
2011-06-15Add missing ChangeLog.cross entryMark Hatle
Add the missing entry for the last change.
2011-05-16Fix xattr and glob issues with sysroot wrapperAkos PASZTORY
2011-05-16 Akos PASZTORY <akos.pasztory@gmail.com> * wrap-file.c (wrap_setxattr, wrap_getxattr, wrap_listxattr): New. (wrap_glob): Likewise new. * dso.c (copy_xattrs): use wrap_*xattr * gather.c (read_config, gather_config, blacklist_from_config): use wrap_glob Merged patch that was emailed to me directly. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-05-16Merge to upstream r189Mark Hatle
2011-05-16 Mark Hatle <mark.hatle@windriver.com> * Merge to upstream r189 (no conflicts) Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-05-16 * src/dwarf2.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,jakub
DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret): Define. * src/dwarf2.c (adjust_location_list): Handle DW_OP_GNU_const_type, DW_OP_GNU_retval_type, DW_OP_GNU_defer_type, DW_OP_GNU_convert and DW_OP_GNU_reinterpret. git-svn-id: http://sourceware.org/svn/prelink@189 94c539fb-cf18-0410-b60f-edeeb537fa16
2011-05-11 * src/dwarf2.h (DW_OP_GNU_const_type, DW_OP_GNU_regval_type,jakub
DW_OP_GNU_deref_type, DW_OP_GNU_convert, DW_OP_GNU_reinterpret): Define. * src/dwarf2.c (adjust_location_list): Handle DW_OP_GNU_const_type, DW_OP_GNU_retval_type, DW_OP_GNU_defer_type, DW_OP_GNU_convert and DW_OP_GNU_reinterpret. git-svn-id: http://sourceware.org/svn/prelink@189 94c539fb-cf18-0410-b60f-edeeb537fa16
2011-04-04Add check for text relocationsMark Hatle
2011-04-04 Mark Hatle <mark.hatle@windriver.com> Integrate patch from: 2011-03-24 Joseph Myers <joseph@codesourcery.com> * src/dso.c (allow_bad_textrel, dso_has_bad_textrel): New. (check_dso): Check for text relocations. * src/gather.c (gather_exec): Check for text relocations. * src/main.c (options): Add --allow-textrel. (parse_opt): Handle --allow-textrel. * src/prelink.h (dso_has_bad_textrel, allow_bad_textrel): Declare. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-04-04Merge to upstream r188Mark Hatle
2011-04-01 Mark Hatle <mark.hatle@windriver.com> * Merge to upstream r188 (no conflicts) Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2011-04-04 * src/dwarf2.h (DW_TAG_GNU_template_template_param,jakub
DW_TAG_GNU_template_parameter_pack, DW_TAG_GNU_formal_parameter_pack, DW_TAG_GNU_call_site, DW_TAG_GNU_call_site_parameter, DW_AT_GNU_vector, DW_AT_GNU_guarded_by, DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded, DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required, DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature, DW_AT_GNU_template_name, DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value, DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered, DW_AT_GNU_tail_call, DW_AT_GNU_all_tail_call_sites, DW_AT_GNU_all_call_sites, DW_AT_GNU_all_source_call_sites, DW_OP_GNU_entry_value): Define. * src/dwarf2.c (adjust_location_list): Handle DW_OP_GNU_entry_value. (adjust_attributes): Handle DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value, DW_AT_GNU_call_site_target and DW_AT_GNU_call_site_target_clobbered. git-svn-id: http://sourceware.org/svn/prelink@188 94c539fb-cf18-0410-b60f-edeeb537fa16
2011-04-01 * src/dwarf2.h (DW_TAG_GNU_template_template_param,jakub
DW_TAG_GNU_template_parameter_pack, DW_TAG_GNU_formal_parameter_pack, DW_TAG_GNU_call_site, DW_TAG_GNU_call_site_parameter, DW_AT_GNU_vector, DW_AT_GNU_guarded_by, DW_AT_GNU_pt_guarded_by, DW_AT_GNU_guarded, DW_AT_GNU_pt_guarded, DW_AT_GNU_locks_excluded, DW_AT_GNU_exclusive_locks_required, DW_AT_GNU_shared_locks_required, DW_AT_GNU_odr_signature, DW_AT_GNU_template_name, DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value, DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered, DW_AT_GNU_tail_call, DW_AT_GNU_all_tail_call_sites, DW_AT_GNU_all_call_sites, DW_AT_GNU_all_source_call_sites, DW_OP_GNU_entry_value): Define. * src/dwarf2.c (adjust_location_list): Handle DW_OP_GNU_entry_value. (adjust_attributes): Handle DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value, DW_AT_GNU_call_site_target and DW_AT_GNU_call_site_target_clobbered. git-svn-id: http://sourceware.org/svn/prelink@188 94c539fb-cf18-0410-b60f-edeeb537fa16
2011-01-12Add missing changelog entryMark Hatle
2011-01-12 Mark Hatle <mark.hatle@wwindriver.com> * Merge to upstream r187 * Resolve merge conflict
2011-01-12Merge branch 'master' into cross_prelinkMark Hatle
Conflicts: trunk/src/dso.c
2010-11-23 * src/dwarf2.h (DW_OP_GNU_implicit_pointer): Define.jakub
* src/dwarf2.c (adjust_location_list): Add CU argument, fix handling of DW_OP_call_ref, handle DW_OP_GNU_implicit_pointer. (adjust_dwarf2_loc): Add CU argument, adjust adjust_location_list caller. (adjust_attributes): Adjust adjust_location_list and adjust_dwarf2_loc callers. (adjust_dwarf2_frame): Likewise. git-svn-id: http://sourceware.org/svn/prelink@187 94c539fb-cf18-0410-b60f-edeeb537fa16
2010-11-22 * src/dso.c: Include sys/xattr.h.jakub
(copy_xattrs): New function. (set_security_context): Call it. git-svn-id: http://sourceware.org/svn/prelink@186 94c539fb-cf18-0410-b60f-edeeb537fa16
2010-07-23MIPS64 TLS PLT relocs don't appear to be handled in the rtldcross_prelink_r185Mark Hatle
Found during code inspection, other paths check for both 32 and 64 bit TLS PLT relocs on EM_MIPS, except this path. So it should be reasonable to make this change, even without a reproducer... 2010-07-23 Mark Hatle <mark.hatle@windriver.com> * src/ld-libs.c: (reloc_type_class) Handle MIPS64 TLS PLT relocs
2010-07-22Remove generated files...Mark Hatle
2010-07-22Simplify dso.c maintenanceMark Hatle
Get rid of the dso-readonly.c by adding the conditional to dso.c. 2010-07-22 Mark Hatle <mark.hatle@windriver.com> * src/dso.c: Add DSO_READONLY conditionals * src/dso-readonly.c: remove * src/Makefile.am: switch RTLD dep to dso.c, pass DSO_READONLY * configure.in: Add AM_PROG_CC_C_O
2010-07-22Sync to upstream r185Mark Hatle
2010-07-22 Mark Hatle <mark.hatle@windriver.com> * Merge to upstream r185 * Resync dso-readonly.c from dso.c
2010-07-22Merge branch 'master' into cross_prelinkMark Hatle
Conflicts: trunk/src/dso.c
2010-07-22Add initial README.crosscross_prelink_r184Mark Hatle
2010-07-22Fix dwarf symbol table when prelinking on MIPSMark Hatle
2010-06-18 Mark Hatle <mark.hatle@windriver.com> * Sync src/dso-readonly.c and ... * Integrate patch from 2010-05-06 Andrew Stubbs <ams@codesourcery.com> * src/dso.c (adjust_dso): Support MIPS debug sections. * src/prelink.h (SHT_MIPS_DWARF): New define.
2010-07-22Fix MIPS debug info prelinkingAndrew Stubbs
Hi all, Prelink currently fails to relocate the debug info in MIPS libraries because they use a custom section type. Here is an example section from PPC: [29] .debug_frame PROGBITS 00000000 0021b0 00002c 00 0 0 4 The type is "PROGBITS", which is what prelink likes, so it works correctly. Now, here is an example from an equivalent MIPS binary: [28] .debug_frame MIPS_DWARF 00000000 000ee8 00002c 00 0 0 4 Here the type is "MIPS_DWARF", a type not handled by prelink. Please accept the attached patch to fix this. Thanks Andrew 2010-05-06 Andrew Stubbs <ams@codesourcery.com> * src/dso.c (adjust_dso): Support MIPS debug sections. * src/prelink.h (SHT_MIPS_DWARF): New define.
2010-07-22Merge to upstream r184Mark Hatle
2009-06-15 Mark Hatle <mark.hatle@windriver.com> * Merge to upstream r184 * Resync dso-readonly.c from dso.c * Cleanup ChangeLog.cross
2010-07-22Merge commit 'ac2eeba55196424954b58cf540c44e42bc2774dc' into cross_prelinkMark Hatle
Conflicts: trunk/src/dso.c trunk/testsuite/reloc8.sh trunk/testsuite/reloc9.sh