{"id":55,"date":"2010-07-08T15:22:20","date_gmt":"2010-07-08T15:22:20","guid":{"rendered":"https:\/\/blogs.scummvm.org\/toneman\/?p=55"},"modified":"2022-05-21T21:57:43","modified_gmt":"2022-05-21T21:57:43","slug":"plugins-linking-on-ds","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/toneman\/2010\/07\/08\/plugins-linking-on-ds\/","title":{"rendered":"plugins linking on DS"},"content":{"rendered":"<p>I worked through some build errors, switched my plugin.ld to use a modified version of the correct linker script and added a number of PLUGIN_LD_FLAGS (including &#8220;-mno-crt0 $(DEVKITPRO)\/devkitARM\/arm-<wbr \/>eabi\/lib\/ds_arm9_crt0.o&#8221;), and plugins started linking. I had some trouble with\u00a0plugin.ld syntax errors, but figured it out (I was doing things in SECTIONS like &#8220;{ <var>contents<\/var> } &gt;<var>region<\/var> =<var>fill :phdr&#8221; <\/var>when it needed to be &#8220;{ <var>contents<\/var> } &gt;<var>region<\/var> :phdr =<var>fill&#8221;). <\/var>Using objdump on the plugins, it seems most only have one relocation type to worry about (R_ARM_ABS32), but the cine and cruise engines also use R_ARM_THM_CALL and R_ARM_TARGET1. I&#8217;ll be working on completing dsloader.cpp (including the ARM-specific relocations) now, my first milestone being getting one of the engines that uses just R_ARM_ABS32 working.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I worked through some build errors, switched my plugin.ld to use a modified version of the correct linker script and added a number of PLUGIN_LD_FLAGS (including &#8220;-mno-crt0 $(DEVKITPRO)\/devkitARM\/arm-eabi\/lib\/ds_arm9_crt0.o&#8221;), and plugins started linking. I had some trouble with\u00a0plugin.ld syntax errors, but figured it out (I was doing things in SECTIONS like &#8220;{ contents } &gt;region =fill [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-55","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/toneman\/wp-json\/wp\/v2\/posts\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/toneman\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/toneman\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/toneman\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/toneman\/wp-json\/wp\/v2\/comments?post=55"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/toneman\/wp-json\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":56,"href":"https:\/\/blogs.scummvm.org\/toneman\/wp-json\/wp\/v2\/posts\/55\/revisions\/56"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/toneman\/wp-json\/wp\/v2\/media?parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/toneman\/wp-json\/wp\/v2\/categories?post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/toneman\/wp-json\/wp\/v2\/tags?post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}