{"id":445,"date":"2016-05-12T11:16:43","date_gmt":"2016-05-12T09:16:43","guid":{"rendered":"http:\/\/paguilar.org\/?p=445"},"modified":"2016-05-12T11:16:43","modified_gmt":"2016-05-12T09:16:43","slug":"failed-to-map-segment-from-shared-object","status":"publish","type":"post","link":"https:\/\/paguilar.org\/?p=445","title":{"rendered":"Failed to map segment from shared object"},"content":{"rendered":"<p>Recently, I was working with an AMD Geode LX800 with Debian 7.2 installed on it. I had a small CF and was running out of space, so I used an USB stick where I copied the binary to test (a Qt5 app) and when executing it as a normal user <strong>and<\/strong> as root I was getting the following error:<\/p>\n<pre lang=\"bash\">\r\nmy_app: error while loading shared libraries: my_lib.so.5 :Failed to map segment from shared object: Operation not permitted...\r\n<\/pre>\n<p>I play around with file ownership (chown) and access permissions (chmod), but nothing changed.<\/p>\n<p>Later I realized that the problem was that the USB stick was mounted with the <strong>noexec<\/strong> flag.<br \/>\nMounting it without this flag allows the shared library to be properly loaded.<\/p>\n<p>Searching around I found that this issue can happen under other similar scenarios like network mounted drives that contain shared libraries that were mounted with the <strong>noexec<\/strong> option or simply the \/tmp partition that is normally mounted in memory but without execution permissions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, I was working with an AMD Geode LX800 with Debian 7.2 installed on it. I had a small CF and was running out of space, so I used an USB stick where I copied the binary to test (a Qt5 app) and when executing it as a normal user and as root I was\u2026 <span class=\"read-more\"><a href=\"https:\/\/paguilar.org\/?p=445\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,6,45],"tags":[],"class_list":["post-445","post","type-post","status-publish","format-standard","hentry","category-command-line-interface","category-compiling","category-linux"],"_links":{"self":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts\/445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=445"}],"version-history":[{"count":2,"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts\/445\/revisions"}],"predecessor-version":[{"id":447,"href":"https:\/\/paguilar.org\/index.php?rest_route=\/wp\/v2\/posts\/445\/revisions\/447"}],"wp:attachment":[{"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/paguilar.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}