{"id":18813,"date":"2025-06-16T08:55:17","date_gmt":"2025-06-16T08:55:17","guid":{"rendered":"http:\/\/www.max-sperling.bplaced.net\/?p=18813"},"modified":"2025-06-16T10:50:43","modified_gmt":"2025-06-16T10:50:43","slug":"plt-and-got-for-shared-libs-elf","status":"publish","type":"post","link":"http:\/\/www.max-sperling.bplaced.net\/?p=18813","title":{"rendered":"PLT and GOT for shared libs (ELF)"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>With static linking, the position of the code of the static libs are exactly known during compile time. This isn&#8217;t true for shared linking, and PLT and GOT are necessary to call to the right addresses in the shared libs.<\/p>\n<hr>\n<h2>Procedure<\/h2>\n<ol>\n<li>To call a shared lib function, your app is requesting the PLT.<\/li>\n<li>The PLT then requests the actual address from the GOT.\n<ul>\n<li>First time: The address has to be calculated and stored in the GOT.<\/li>\n<li>Next time: The address can directly be read from the GOT.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<hr>\n<h2>Terminology<\/h2>\n<ul>\n<li>PLT (Procedure Linkage Table)<\/li>\n<li>GOT (Global Offset Table)<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Introduction With static linking, the position of the code of the static libs are exactly known during compile time. This<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false},"categories":[28],"tags":[],"_links":{"self":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/18813"}],"collection":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18813"}],"version-history":[{"count":18,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/18813\/revisions"}],"predecessor-version":[{"id":18891,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=\/wp\/v2\/posts\/18813\/revisions\/18891"}],"wp:attachment":[{"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18813"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18813"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.max-sperling.bplaced.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18813"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}