• <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.
            久久久久AV综合网成人 | 2021国产成人精品久久| 久久久精品免费国产四虎| 久久噜噜电影你懂的| 日本欧美国产精品第一页久久| 亚洲国产成人久久一区WWW| 久久人人爽人人爽人人AV东京热| 国产∨亚洲V天堂无码久久久| 欧美麻豆久久久久久中文| 久久久久人妻一区精品色| 国内精品久久久久久麻豆| 亚洲精品乱码久久久久久| 97精品伊人久久久大香线蕉| 思思久久99热只有频精品66| 国产精品久久久久久一区二区三区| 手机看片久久高清国产日韩| 色综合久久综精品| 伊人久久大香线蕉AV色婷婷色 | 伊人久久精品无码av一区| 99久久精品费精品国产| 无码精品久久久久久人妻中字| 久久久久亚洲AV成人网人人网站 | 亚洲国产精品嫩草影院久久| 99久久无色码中文字幕| 久久99精品久久久大学生| 久久亚洲av无码精品浪潮| 99久久免费只有精品国产| 狠狠狠色丁香婷婷综合久久俺| 日韩人妻无码精品久久久不卡 | 久久久久亚洲AV无码专区首JN| 国产日韩久久久精品影院首页| 精品久久人妻av中文字幕| 亚洲国产欧美国产综合久久| 99久久这里只精品国产免费| 久久久久久国产a免费观看黄色大片 | 精品多毛少妇人妻AV免费久久| 99久久99这里只有免费费精品| 欧美黑人激情性久久| 精品国产乱码久久久久久呢| 久久狠狠爱亚洲综合影院| 国产99久久久国产精品小说|