zoukankan      html  css  js  c++  java
  • What is prelink?

    Prelink is a program, totally not the same thing with Linux's ld.so's LD_PRELOAD environment variable.

           prelink is a program which modifies ELF shared libraries and ELF dynam-
           ically linked binaries, so that the time which dynamic linker needs for
           their relocation at startup significantly decreases  and  also  due  to
           fewer  relocations the run-time memory consumption decreases too (espe-
           cially number of unshareable pages).  Such  prelinking  information  is
           only  used  if  all its dependant libraries have not changed since pre-
           linking, otherwise programs are relocated normally.

           prelink first collects ELF binaries which should be prelinked  and  all
           the  ELF shared libraries they depend on. Then it assigns a unique vir-
           tual address space slot for each library and relinks the shared library
           to  that base address.  When the dynamic linker attempts to load such a
           library, unless that virtual address space slot is already occupied, it
           will  map it into the given slot.  After this is done, prelink with the
           help of dynamic linker  resolves  all  relocations  in  the  binary  or
           library against its dependant libraries and stores the relocations into
           the ELF object.  It also stores  a  list  of  all  dependant  libraries
           together  with  their  checksums into the binary or library.  For bina-
           ries, it also computes a list of conflicts (relocations  which  resolve
           differently  in  the  binary’s  symbol search scope than in the smaller
           search scope in which the dependant library was resolved) and stores it
           into a special ELF section.
     

    For informations about LD_PRELOAD, refer to linker, load, library book P243.

  • 相关阅读:
    「题解」300iq Contest 2 B Bitwise Xor
    「题解」agc031_e Snuke the Phantom Thief
    「题解」agc031_c Differ by 1 Bit
    「题解」NWRRC2017 Joker
    「题解」NWRRC2017 Grand Test
    「题解」USACO15FEB Fencing the Herd G
    zsh: command not found:xxx 解决方法
    curl
    redis搭建
    http 缓存分为客户端缓存/服务端缓存/数据库缓存
  • 原文地址:https://www.cnblogs.com/super119/p/2257142.html
Copyright © 2011-2022 走看看