<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>geckoloader / Loading and run the stub</title>
<description> Hello everyone,

I&amp;#039;m currently examining the source of geckoloader. (I want to learn how create a stub and a loader.)

So I examined the stub code and quickly the loader code.
All this code make sense for me

However regarding the boot code, I see these global variables at the beginning of the code :

extern u8 stub_bin[];
extern u32 stub_bin_size;
extern u8 loader_dol[];
extern u32 loader_dol_size;

But, I did not find where are defined these variables on the other source files.

In fact, I want to know how to load the stub code in the stub_bin[] array.
Because I have a stub.dol but this is a file, this is not in memory.

I assume that there&amp;#039;s a way to push the stub code in a special section of the dol file.

How to do it ? And then how to use it ?

Could someone give me some clues ?

I hope that my question is making sense.
Maybe I&amp;#039;m totally wrong, (programming is just a hobby for me).

Regards,
ShovAge

Please ignore my poor english.</description><link>http://forum.wiibrew.org/read.php?11,8000,8000#msg-8000</link><lastBuildDate>Wed, 19 Aug 2026 02:02:24 +0200</lastBuildDate>
<generator>Phorum 5.2.23</generator>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8000,8034#msg-8034</guid>
<title>Re: geckoloader / Loading and run the stub</title><link>http://forum.wiibrew.org/read.php?11,8000,8034#msg-8034</link><description><![CDATA[ Great !<br />That&#039;s working !<br /><br />Happy to play with this new tool ! :)<br /><br />Thanks for your help !]]></description>
<dc:creator>ShovAge</dc:creator>
<category>Coding</category><pubDate>Thu, 15 Jan 2009 22:51:42 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8000,8028#msg-8028</guid>
<title>Re: geckoloader / Loading and run the stub</title><link>http://forum.wiibrew.org/read.php?11,8000,8028#msg-8028</link><description><![CDATA[ Uh-oh, my bad, its objcopy not objdump. For this toolchain you use powerpc-gekko-objcopy with the arguments "-O binary <infile> <outfile>", see stub/Makefile.<br />bin2s is included in devkitPPC, thats the tool you want to use to turn blobs into a .S to integrate it into another project.]]></description>
<dc:creator>dhewg</dc:creator>
<category>Coding</category><pubDate>Thu, 15 Jan 2009 22:23:02 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8000,8024#msg-8024</guid>
<title>Re: geckoloader / Loading and run the stub</title><link>http://forum.wiibrew.org/read.php?11,8000,8024#msg-8024</link><description><![CDATA[ Thanks a lot for your help.<br />Your answer really helps.<br /><br />If I&#039;m right, the executable sections from stub and loader are extracted to a bin file.<br />Then this bin file is converted to an ASM source file.<br />Then these files are compiled in the same time than geckoloader and included in geckoloder.elf<br />That&#039;s it ?<br /><br />I tried objdump on my linux box.<br />It seems that the original objdump is only used for the IA32 architecture.<br /><br />So, I found the executable powerpc-gekko-objdump.<br />I do not really know how to use it.<br /><br />I tried it:<br />powerpc-gekko-objdump --target=binary -d geckoloader.elf<br /><br />I used -d because we have the following description in the help page:<br />-d, --disassemble Display assembler contents of executable sections<br /><br />I assume that we have to set an architecture. The command give me these choices:<br />supported architectures: rs6000:6000 rs6000:rs1 rs6000:rsc rs6000:rs2 powerpc:common powerpc:common64 powerpc:603 powerpc:EC603e powerpc:604 powerpc:403 powerpc:601 powerpc:620 powerpc:630 powerpc:a35 powerpc:rs64ii powerpc:rs64iii powerpc:7400 powerpc:e500 powerpc:e500mc powerpc:MPC8XX powerpc:750<br /><br />I did not suceed to extract the executable section. :/<br /><br />And, I had a look on Makefiles to see when objdump is used without success.<br />Where can I found the comands on the Makefiles ?<br />And, withotu the Makefiles, how can I manually extract executable section and compile an other program with included .S files ?<br /><br />Thanks again.<br /><br />Rgds,<br />ShovAge]]></description>
<dc:creator>ShovAge</dc:creator>
<category>Coding</category><pubDate>Thu, 15 Jan 2009 22:08:38 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8000,8001#msg-8001</guid>
<title>Re: geckoloader / Loading and run the stub</title><link>http://forum.wiibrew.org/read.php?11,8000,8001#msg-8001</link><description><![CDATA[ The stub and loader parts get compiled to .elf and objdump is used to extract the blobs to .bin. The toplevel Makefile then uses bin2s to make a compilable .S out of the .bins. Those get compiled by the boot part, it&#039;s just a way to include the blob in the resulting geckoloader.elf.<br /><br />The externs you mentioned are in those .S files.]]></description>
<dc:creator>dhewg</dc:creator>
<category>Coding</category><pubDate>Thu, 15 Jan 2009 19:10:04 +0100</pubDate></item>
<item>
<guid>http://forum.wiibrew.org/read.php?11,8000,8000#msg-8000</guid>
<title>geckoloader / Loading and run the stub</title><link>http://forum.wiibrew.org/read.php?11,8000,8000#msg-8000</link><description><![CDATA[ Hello everyone,<br /><br />I&#039;m currently examining the source of geckoloader. (I want to learn how create a stub and a loader.)<br /><br />So I examined the stub code and quickly the loader code.<br />All this code make sense for me<br /><br />However regarding the boot code, I see these global variables at the beginning of the code :<br /><br />extern u8 stub_bin[];<br />extern u32 stub_bin_size;<br />extern u8 loader_dol[];<br />extern u32 loader_dol_size;<br /><br />But, I did not find where are defined these variables on the other source files.<br /><br />In fact, I want to know how to load the stub code in the stub_bin[] array.<br />Because I have a stub.dol but this is a file, this is not in memory.<br /><br />I assume that there&#039;s a way to push the stub code in a special section of the dol file.<br /><br />How to do it ? And then how to use it ?<br /><br />Could someone give me some clues ?<br /><br />I hope that my question is making sense.<br />Maybe I&#039;m totally wrong, (programming is just a hobby for me).<br /><br />Regards,<br />ShovAge<br /><br />Please ignore my poor english.]]></description>
<dc:creator>ShovAge</dc:creator>
<category>Coding</category><pubDate>Thu, 15 Jan 2009 18:55:26 +0100</pubDate></item>
</channel>
</rss>