zoukankan      html  css  js  c++  java
  • linker and loader

    LD.SO(8)                                                              LD.SO(8)

    NAME
           ld.so/ld-linux.so - dynamic linker/loader

    DESCRIPTION
           ld.so loads the shared libraries needed by a program, prepares the pro‐
           gram to run, and then runs it.  Unless  explicitly  specified  via  the
           -static  option to ld during compilation, all Linux programs are incom‐
           plete and require further linking at run time.

           The necessary shared libraries needed by the program are  searched  for
           in the following order

           o      Using      the      environment     variable     LD_LIBRARY_PATH
                  (LD_AOUT_LIBRARY_PATH for a.out programs).  Except if  the  exe‐
                  cutable is a setuid/setgid binary, in which case it is ignored.

           o      From  the  cache file /etc/ld.so.cache which contains a compiled
                  list of candidate libraries previously found  in  the  augmented
                  library path.

           o      In the default path /lib, and then /usr/lib.

     

    动态链接,加载

    (This library component is not itself a library. Instead, ld.so is an executable invoked by the ELF binary format loader to load the dynamically linked libraries into an application’s memory space.)

     

    -------------------------------------------------------------------------------

    LDD(1)                                                                  LDD(1)

    NAME
           ldd - print shared library dependencies

    -------------------------------------------------------------------------------

    LD(1)                        GNU Development Tools                       LD(1)

    NAME
           ld - The GNU linker

    SYNOPSIS
           ld [options] objfile ...

    DESCRIPTION
           ld combines a number of object and archive files, relocates their data
           and ties up symbol references. Usually the last step in compiling a
           program is to run ld.

           ld accepts Linker Command Language files written in a superset of
           AT&T's Link Editor Command Language syntax, to provide explicit and
           total control over the linking process.

     

    链接器,编译最后一步:

    ld other-command-line-options /tmp/a.o /tmp/b.o -o a.out
     
     
    参考:
    http://en.wikipedia.org/wiki/Linker_(computing)
    Linkers and Loaders by Sandeep Grover
     
     
    http://en.wikipedia.org/wiki/Loader_(computing)#cite_note-0
  • 相关阅读:
    Data Lake_理解数据湖
    spire.Doc -Index was out of the range
    R6_ES在互联网公司应用案例汇总参考
    R5_ES读写流程
    R4_Elasticsearch Mapping parameters
    华强北二代悦虎1562M升级固件图文教程(详细多图文)
    MMI_UT洛达检测1562A软件使用,Airoha_SDK_UT使用(多图)
    悦虎144固件,151固件,华强北二代悦虎144固件,151固件,1562M芯片144固件,151固件
    CentOS7安装redis并配置外网可访问(局域网可参考)
    CentOS离线安装gcc环境(附安装包+图文并茂)
  • 原文地址:https://www.cnblogs.com/cute/p/2152086.html
Copyright © 2011-2022 走看看