• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Prayer

            在一般中尋求卓越
            posts - 1256, comments - 190, trackbacks - 0, articles - 0
              C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理
            https://blog.csdn.net/giantpoplar/article/details/46485649


            首先,原文地址如下:

            http://www.quora.com/Systems-Programming/What-is-the-exact-difference-between-Dynamic-loading-and-dynamic-linking

            翻譯內容如下:

            動態裝入(Dynamic loading) 指的是當一個進程啟動后,將一個可執行的文件(原文是executable,我理解為磁盤上的文件 或者駐留在內存中的例程)或庫映射到(或者不常發生的復制)到進程內存空間。動態鏈接 (dynamic linking)指的是在編譯(匯編)之后,分解字符(resolving symbols)——把名字和地址或者偏移量聯系起來。這兩者難以區分的原因是,大約在進程啟動后,編譯(匯編)之后這兩個過程,通常對二者的微妙區別不加區分地一起完成。大概最清晰的方式來解釋這二者的區別就是分別展示二者的各種組合在實踐中意味著什么。

            動態裝入,靜態鏈接。

            可執行的文件擁有一個在編譯時生成的 地址/偏移量表,但是實際的代碼/數據在進程剛啟動時沒有裝到內存中。這并不是大多數現在的操作系統的處理方式,但是它可能描述了一些老式的overlay systems.如果現在的嵌入式系統也使用這種方式,我一點也不感覺到奇怪。無論是哪種情況,其目的都是給予程序員內存控制的自由同時避免運行時的鏈接花費。

            靜態裝入,動態鏈接

            這通常是在編譯時確定動態庫的工作方式。可執行文件包含動態/共享庫的引用,但是字符表(symbol table)沒有或者不完整。裝入和鏈接都在進程啟動時進行,被認為是“動態的”鏈接但不是“動態的”裝入。

            動態裝入,動態鏈接

            這是你調用dlopen或其他系統里的等價調用的時候發生的事情。object(.obj)文件在程序的控制下動態裝入(也就是開始之后),包括調用程序和庫里的字符都根據那個時刻進程的可能獨一無二的內存布局進行解析(把名字和地址/偏移量聯系起來).

            靜態裝入,靜態鏈接

            所有的東西都在編譯時解析完成。進程開始的時候所有東西都立即加載到內存中,不需要其他的解析(鏈接linking)。概括地說,加載發生自單個文件是不必要的,但是我認為實際的格式或者實現并不能夠在不使用動態鏈接的情況下實現多文件的裝入。


            原文內容如下

            Dynamic loading refers to mapping (or less often copying) an executable or library into a process's memory after is has started.  Dynamic linking refers to resolving symbols - associating their names with addresses or offsets - after compile time.  The reason it's hard to make a distinction is that the two are often done together without recognizing the subtle distinctions around the parts I put in bold.  Perhaps the clearest way to explain is to go through what the different combinations would mean in practice.

            • Dynamic loading, static linking.  The executable has an address/offset table generated at compile time, but the actual code/data aren't loaded into memory at process start.  This is not the way things tend to work in most systems nowadays, but it would describe some old-fashioned overlay systems.  I'd also be utterly unsurprised if some current embedded systems work this way too.  In either case, the goal is to give the programmer control over memory use while also avoiding the overhead of linking at runtime.
            • Static loading, dynamic linking.  This is how dynamic libraries specified at compile time usually work.  The executable contains a reference to the dynamic/shared library, but the symbol table is missing or incomplete.  Both loading and linking occur at process start, which is considered "dynamic" for linking but not for loading.
            • Dynamic loading, dynamic linking.  This is what happens when you calldlopen or its equivalent on other systems.  The object file is loaded dynamically under program control (i.e. after start), and symbols both in the calling program and in the library are resolved based on the process's possibly-unique memory layout at that time.
            • Static loading, static linking.  Everything is resolved at compile time.  At process start everything is loaded into memory immediately and no extra resolution (linking) is necessary.  In the abstract it's not necessary for the loading to occur from a single file, but I don't think the actual formats or implementations (at least those I'm familiar with) can do multi-file loading without dynamic linking.
            伊人伊成久久人综合网777| 97精品伊人久久大香线蕉| 久久99热只有频精品8| 色综合久久综合中文综合网| 99久久精品国产高清一区二区| 久久久免费精品re6| 99久久伊人精品综合观看| 久久久艹| 欧美亚洲色综久久精品国产| 亚洲国产精品一区二区久久| 伊人久久一区二区三区无码| 一本一本久久a久久综合精品蜜桃 一本一道久久综合狠狠老 | 久久久久久久免费视频| 亚洲色大成网站WWW久久九九| 青草影院天堂男人久久| 精产国品久久一二三产区区别| 国产精品久久久久久久久| 午夜福利91久久福利| 精品久久久久久| 久久精品国产日本波多野结衣| 一本伊大人香蕉久久网手机| 亚洲乱码精品久久久久..| 亚洲第一永久AV网站久久精品男人的天堂AV | 天天爽天天爽天天片a久久网| 亚洲人AV永久一区二区三区久久| 久久无码人妻一区二区三区午夜| 久久久久久av无码免费看大片| 欧美va久久久噜噜噜久久| 一级做a爰片久久毛片免费陪| 18岁日韩内射颜射午夜久久成人| 看久久久久久a级毛片| 成人久久免费网站| 久久久久亚洲AV片无码下载蜜桃| 久久无码国产| 四虎影视久久久免费| 久久综合五月丁香久久激情| 国产2021久久精品| 亚洲国产成人久久综合碰碰动漫3d| 国产精品久久自在自线观看| 国产精品久久久久影视不卡 | 久久精品人人做人人爽电影|