{"id":96156,"date":"2017-05-15T07:00:00","date_gmt":"2017-05-15T21:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/?p=96156"},"modified":"2019-03-13T01:11:27","modified_gmt":"2019-03-13T08:11:27","slug":"20170515-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20170515-00\/?p=96156","title":{"rendered":"At least it wasn&#8217;t on a Web page with the warning &#8220;Beware of the leopard&#8221;"},"content":{"rendered":"<p>In my discussion of the effect of ASLR on DLL rebasing, I wondered how vtables and other function pointers were handled in position-independent code. Commenter kantos replied, &#8220;<a HREF=\"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/20170120-00\/?p=95225#comment-1281115\">It appears from a cursory google search that<\/a>&hellip;&#8221; <\/p>\n<p>I wanted to find out more, so I did some searching but couldn&#8217;t find anything, so I asked for help with that cursory search. <\/p>\n<p>&#8220;It was GCC PIC C++ which didn&#8217;t get me to the answer directly, I had to go through <a HREF=\"http:\/\/stackoverflow.com\/a\/967055\/332733\">the SO question that was the second result<\/a> to get to <a HREF=\"https:\/\/www.akkadia.org\/drepper\/dsohowto.pdf\">this document<\/a> by Ulrich Drepper, and then skim through until page 29 where it describes what&#8217;s done in the virtual table case.&#8221; <\/p>\n<p>Okay, so I had to issue a Google search, click the <i>second<\/i> result, then go to the <i>second answer<\/i> (not the accepted answer), click a link enigmatically called &#8220;the document referenced by 0x6adb015&#8221;, download the resulting 45-page PDF, and read through to page 29. <\/p>\n<p>This doesn&#8217;t strike me as a &#8220;cursory search&#8221;. <\/p>\n<p>Related: <a HREF=\"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/20150310-00\/?p=44503\">The more times you use the word &#8220;simply&#8221; in your instructions, the more I suspect you don&#8217;t know what that word means<\/a>. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>But it was simple.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[103],"class_list":["post-96156","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-non-computer"],"acf":[],"blog_post_summary":"<p>But it was simple.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/96156","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=96156"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/96156\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=96156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=96156"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=96156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}