summaryrefslogtreecommitdiffstats
path: root/trunk/src
AgeCommit message (Collapse)Author
2010-07-22Update load_dsos to avoid canonicalizing host filenames within the sysrootMark Hatle
2007-02-16 Daniel Jacobowitz <dan@codesourcery.com> * src/prelink.h (sysroot_file_name): Declare. * src/wrap-file.c (sysroot_file_name): match declaration * src/ld-libs.c (load_dsos): Take host_paths argument. Do not attempt to canonicalize host filenames within the sysroot. Always set canon_filename. (process_one_dso): Update call to load_dsos. Do not redo call to wrap_canonicalize_file_name.
2010-07-22Add configurable version and bug urlMark Hatle
2006-11-30 Mark Shinwell <shinwell@codesourcery.com> * configure.in: Recognize --with-pkgversion and ---with-bugurl. * src/Makefile.am: Pass package version and bug URL through AM_CFLAGS, together with the new EXECSTACK_PROG. * src/main.c: Use PKGVERSION and REPORT_BUGS_TO. * src/execstack.c: Likewise. Also use EXECSTACK_PROG. Mark Hatle <mark.hatle@windriver.com> * src/ld-libs.c: Use PRELINK_RTLD_PROG, PKGVERSION and REPORT_BUGS_TO * src/execstack.c: Use EXECSTACK_PROG in (argp_doc)
2010-07-22Cleanup wrap_statMark Hatle
2006-11-30 Mark Shinwell <shinwell@codesourcery.com> * wrap-file.c (wrap_stat_body): New. (wrap_lstat64, wrap_stat64): Use wrap_stat_body. * gather.c (add_to_blacklist): Add missing wrap_stat64
2010-07-22Determine machine type and add assert on buffer overflowMark Hatle
2006-11-28 Mark Shinwell <shinwell@codesourcery.com> * src/layout.c (layout_libs): Add assertion to check for buffer overflow. * src/ld-libs.c (find_lib_in_path): Add "machine" argument. Skip libraries whose ELF machine type field does not match that argument. (find_lib_by_soname): Add "machine" argument. Pass it to find_lib_in_path. (load_dsos): Determine machine type of input DSO. Pass it to find_lib_by_soname. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Conflicts: trunk/ChangeLog.csl
2010-07-22Add function to determine if it's PIEMark Hatle
2006-11-28 Mark Shinwell <shinwell@codesourcery.com> * src/gather.c (maybe_pie): New. (gather_func): Use it.
2010-07-22Merge to r150Mark Hatle
2006-11-28 Mark Shinwell <shinwell@codesourcery.com> * src/canonicalize.c: Add prelink.h include directive. Use wrap_readlink and wrap_lstat64. * src/prelink.h: Declare wrap_readlink. * src/wrap-file.c (wrap_readlink): New.
2010-07-22Add an error message if execve failsMark Hatle
2006-10-13 Daniel Jacobowitz <dan@codesourcery.com> * src/execle_open.c (execve_open): Add an error message if execve fails. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-07-22Add PRELINK_PROG and PRELINK_RTLD_PROGMark Hatle
2006-10-03 Richard Sandiford <richard@codesourcery.com> * configure.in (AC_CANONICAL_HOST): Remove in favour of... (AC_CANONICAL_SYSTEM): ...this new directive. (AC_ARG_PROGRAM): New directive. * src/Makefile.am (AM_CFLAGS): Define PRELINK_PROG, PRELINK_RTLD_PROG and EXEEXT. (execstack_LDADD): Add -liberty. * src/execstack.c (program_path, prelink_path): New variables. (execstack_make_rdwr): Initialize prelink_path if it has not been set yet. Use make_relative_prefix, PRELINK_PROG and EXEEXT to get the full pathname of the prelink executable. Pass this path to execl() as the name of executable file. (main): Initialize program_path. * src/main.c (argp_program_version, argp_doc): Use PRELINK_PROG as the program name. (main): Handle empty --rtld= arguments first. Always use make_relative_prefix to work out the path of the defalt rtld executable. Also use PRELINK_RTLD and EXEEXT for this purpose. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
2010-07-22Add switch to disable selinux when linkingMark Hatle
Add --disable-selinux. Also remove static linking as many modern components do not support static linking.
2010-07-22Import from: prelink-mips-n32.patchMark Hatle
* src/arch-mips.c: add /lib32/ld.so.1 as an alternative 32-bit linker * src/ld-libs.c: add a check for MIPS n32, and adjust ld_dirs as necessary
2010-07-22Reuse PT_NULL program headersRichard Sandiford
My original binutils patches for MIPS prelink support were against 2.17, and reserved room for a program header without actually creating one. The mainline (now 2.18) binutils patches ended up adding a PT_NULL header instead. This was needed because of mainline's SIZEOF_HEADER relaxation and was probably a better idea anyway. The patch below therefore teaches the prelinker to remove a PT_NULL header if it needs to find room for a PT_LOAD header. Tested on the MIPS port, where it allows a sysroot built with the mainline binutils to be fully prelinked. Also tested on x86. The patch involves a lot of reidentation, so for reference, I've attached two versions: first the real patch, then the -b form. Richard 200x-xx-xx Richard Sandiford <richard@codesourcery.com> * src/space.c (find_readonly_space): If a new PT_LOAD header is needed, first try removing a PT_NULL header.
2010-07-22Update ld-libs.c for the newer version of prelinkMark Hatle
2006-09-27 Richard Sandiford <richard@codesourcery.com> * src/ld-libs.c (reloc_type_class): Handle EM_MIPS. (do_mips_global_relocs): New function. (handle_relocs_in_entry): Call it. (determine_tlsoffsets): Handle EM_MIPS. 2006-09-27 Richard Sandiford <richard@codesourcery.com> * src/ld-libs.c (do_reloc): New function, split out from do_rel_section. Take the symbol and relocation type as arguments. (do_rel_section): Call it. (handle_relocs_in_entry): New function. (handle_relocs): Call it.
2010-07-22Update elf.h to latest versionMark Hatle
Update to the latest version of elf.h that includes MIPS prelink.
2010-07-22Merge branch 'prelink_20061201' into cross_prelinkMark Hatle
Conflicts: src/data.c trunk/src/dso.c trunk/src/prelink.h trunk/testsuite/reloc5.c trunk/testsuite/shuffle2.c Updated versioning in: trunk/src/execstack.c trunk/src/ld-libs.c trunk/src/main.c * src/arch-arm.c: remove read_une32, write_ne32, buf_write_ne32, buf_read_une32 * src/dso-readonly.c: sync to changes in src/dso.c
2006-12-01 * src/verify.c (prelink_verify): Unlink ent->filename in case ofprelink_20061201jakub
failures between closing the unprelinked dso and unlinking ent->filename. git-svn-id: http://sourceware.org/svn/prelink@151 94c539fb-cf18-0410-b60f-edeeb537fa16
2006-10-27 * src/prelink.h (READWRITEPROTOSIZE): Undef after use.jakub
git-svn-id: http://sourceware.org/svn/prelink@150 94c539fb-cf18-0410-b60f-edeeb537fa16
2006-10-27 * src/Makefile.am (arch_SOURCES): Add arch-mips.cjakub
* src/Makefile.in: Regenerate. * src/arch-mips.c: New file. git-svn-id: http://sourceware.org/svn/prelink@146 94c539fb-cf18-0410-b60f-edeeb537fa16
2006-10-27 * src/prelink.h (DT_MIPS_RLD_VERSION): Define.jakub
(DT_MIPS_TIME_STAMP): Likewise. (DT_MIPS_ICHECKSUM): Likewise. (DT_MIPS_IVERSION): Likewise. (DT_MIPS_FLAGS): Likewise. (DT_MIPS_BASE_ADDRESS): Likewise. (DT_MIPS_CONFLICT): Likewise. (DT_MIPS_LIBLIST): Likewise. (DT_MIPS_LOCAL_GOTNO): Likewise. (DT_MIPS_CONFLICTNO): Likewise. (DT_MIPS_LIBLISTNO): Likewise. (DT_MIPS_SYMTABNO): Likewise. (DT_MIPS_UNREFEXTNO): Likewise. (DT_MIPS_GOTSYM): Likewise. (DT_MIPS_HIPAGENO): Likewise. (DT_MIPS_RLD_MAP): Likewise. (R_MIPS_TLS_DTPMOD): Likewise. (R_MIPS_TLS_DTPREL): Likewise. (R_MIPS_TLS_TPREL): Likewise. (R_MIPS_GLOB_DAT): Likewise. (DSO): Add info_DT_MIPS_LOCAL_GOTNO, info_DT_MIPS_GOTSYM, and info_DT_MIPS_SYMTABNO. * src/dso.c (read_dynamic): Initialize the new DSO fields. (adjust_symbol_p): Handle stub values on MIPS. * src/prelink.c (prelink_prepare): Handle SHT_DYNAMIC and SHT_MIPS_REGINFO on MIPS. git-svn-id: http://sourceware.org/svn/prelink@145 94c539fb-cf18-0410-b60f-edeeb537fa16
2006-10-27 * src/space.c (find_readonly_space): Don't place the new sectionjakub
in the PT_PHDR segment. git-svn-id: http://sourceware.org/svn/prelink@144 94c539fb-cf18-0410-b60f-edeeb537fa16
2006-10-27 * src/prelink.h (data_iterator): New structure.jakub
(init_data_iterator): Declare. (get_data_from_iterator): Likewise. (get_sym_from_iterator): Likewise. * src/data.c (init_data_iterator): New function. (get_data_from_iterator): Likewise. (get_sym_from_iterator): Likewise. git-svn-id: http://sourceware.org/svn/prelink@143 94c539fb-cf18-0410-b60f-edeeb537fa16
2006-10-27 * src/prelink.h (READWRITEPROTOSIZE): New macro. Instantiatejakub
READWRITEPROTO for big and little endian. Add prototypes for native-endian functions (buf_read_uneNN, read_uneNN, buf_write_neNN and write_neNN). Replace uses of READWRITEPROTO with uses of this macro. * src/data.c (BUFREADUNE, READUNE, WRITENE, BUFWRITENE): New macros. (READWRITESIZE): New macro. Instantiate READWRITE for big and little endian. Instantiate BUFREADUNE, READUNE, WRITENE and BUFWRITENE. Replace uses of READWRITE with uses of this macro. * src/arch-sh.c (read_une32, write_ne32, buf_write_ne32): Delete. git-svn-id: http://sourceware.org/svn/prelink@142 94c539fb-cf18-0410-b60f-edeeb537fa16
2006-10-27 * src/prelink.h (PLArch): Add an arch_prelink_conflict callback.jakub
* src/conflict.c (prelink_build_conflicts): If defined, call it for each dependency. git-svn-id: http://sourceware.org/svn/prelink@141 94c539fb-cf18-0410-b60f-edeeb537fa16
2006-10-27 * src/prelink.h (PLArch): Make the arch_prelink callback takejakub
a "struct prelink_info *" argument, not a "DSO *" argument. * src/prelink.c (prelink): Adjust call accordingly. * src/arch-alpha.c (alpha_arch_prelink): Adjust definition accordingly. * src/arch-arm.c (arm_arch_prelink): Likewise. * src/arch-cris.c (cris_arch_prelink): Likewise. * src/arch-i386.c (i386_arch_prelink): Likewise. * src/arch-ia64.c (ia64_arch_prelink): Likewise. * src/arch-ppc.c (ppc_arch_prelink): Likewise. * src/arch-s390.c (s390_arch_prelink): Likewise * src/arch-s390x.c (s390x_arch_prelink): Likewise * src/arch-sh.c (sh_arch_prelink): Likewise. * src/arch-sparc64.c (sparc64_arch_prelink): Likewise. * src/arch-sparc.c (sparc_arch_prelink): Likewise * src/arch-x86_64.c (x86_64_arch_prelink): Likewise. git-svn-id: http://sourceware.org/svn/prelink@140 94c539fb-cf18-0410-b60f-edeeb537fa16
2006-10-27 * src/prelink.h (PLArch): Add an arch_adjust callback.jakub
* src/dso.c (adjust_dso): Use it, if defined. git-svn-id: http://sourceware.org/svn/prelink@139 94c539fb-cf18-0410-b60f-edeeb537fa16
2006-10-27 * src/prelink.h (adjust_symbol_p): Declare.jakub
* src/dso.c (adjust_symbol_p): New function, extracted from... (adjust_symtab): ...here. git-svn-id: http://sourceware.org/svn/prelink@138 94c539fb-cf18-0410-b60f-edeeb537fa16
2006-10-24Fix adjusting of .debug_ranges if high range is at the very end of a section.jakub
git-svn-id: http://sourceware.org/svn/prelink@136 94c539fb-cf18-0410-b60f-edeeb537fa16
2006-10-23Avoid SEGFAULT when sorting cache entries (rh#197451)jakub
git-svn-id: http://sourceware.org/svn/prelink@135 94c539fb-cf18-0410-b60f-edeeb537fa16
2006-07-21Move code into trunk subdirectory.drow
git-svn-id: http://sourceware.org/svn/prelink@134 94c539fb-cf18-0410-b60f-edeeb537fa16