Homebrew Would a .elf loader be possible?

  • Thread starter Thread starter 4gionz
  • Start date Start date
  • Views Views 2,232
  • Replies Replies 9

4gionz

Well-Known Member
Member
Joined
Aug 16, 2014
Messages
793
Reaction score
307
Trophies
0
Age
35
XP
508
Country
Canada
hey guys hoping not to look like a complete fool here so bear with me.

Right now we use .3dsx files to load homebrew, but would it be possible to make a cia app(basically an alternate homebrew menu) that launches elf files instead of 3dsx? As In not a modification but a whole "new menu"

The only reason I ask is because in emunand using smea homebrew launcher is...ok(and just ok) maybe I'm way off base here but building a homebrew launcher that loads elf files instead of .3dsx might even make homebrew easier to code (or make) since you wouldn't be relying on the homebrew menus privileges and would have the full privileges of the 3ds?

Anyways just a wild idea and wanted to see at least from some devs why it wouldn't be viable or if .3dsx is better.

Ps: this is not a demand thread it's just for discussion, also smea homebrew launcher will always be useful for people not on cfw so it'll never bad I just think maybe .elf loading in cfw may be a better option.
 
Isnt .elf a ps2 thing?

ELF is a pretty much universal executable format. Pretty much everything that's not Windows runs some form of ELF, whether it's custom or not. By universal I mean you can have it follow the same standard, regardless of ARM, x86, PowerPC, etc., not that you can compile it once and run it anywhere like a Java program.
 
  • Like
Reactions: 4gionz
Pretty sure I've seen a lot of home brews come with .3ds,.3dsx,.cia and .elf and pretty sure even the wii homebrew channel used boot.elf. Also that's why I said I might look like a fool and be way of base here
 
I think they primarily went with 3dsx because it's "easier" to deal with relocating things in memory, and given how crazy the hax payloads work, it was probably a necessity. In a CFW environment though, I don't see why an ELF loader wouldn't be possible (along with a 3dsx loader too). We have access to everything needed to create readable, writable, and executable memory wherever and whenever we want.
 
Homebrew channel uses boot.elf? All of the homebre i got on it uses boot.dol

@daxtsu you mean like a .jar is universal for all platforms?
Ah yes your right .dol was it, maybe the elf file was only for the homebrew channel itself or exploit but I remember there being at least one elf file when doing the initial install.
 
Homebrew channel uses boot.elf? All of the homebre i got on it uses boot.dol

@daxtsu you mean like a .jar is universal for all platforms?

The homebrew channel on the Wii could use either ELFs or DOLs (which were slightly modified ELFs), if I remember correctly. And yes, sort of. You won't really be running ELF files on Windows without special emulators/tools, though.

Also, regarding permissions/access to services, I think you'd still be limited to what the ELF loader could provide, however, since you can control the list of what services the loader CIA would have via the RSF file, you could just give access to almost everything (the current limit is 36 services I think, which is more than enough for just about everything on the entire system). I suppose you could also bypass it by using libkhax, but that wouldn't work well on newer emuNANDs since the exploits would be patched.
 
The homebrew channel on the Wii could use either ELFs or DOLs (which were slightly modified ELFs), if I remember correctly. And yes, sort of. You won't really be running ELF files on Windows without special emulators/tools, though.

Also, regarding permissions/access to services, I think you'd still be limited to what the ELF loader could provide, however, since you can control the list of what services the loader CIA would have via the RSF file, you could just give access to almost everything (the current limit is 36 services I think, which is more than enough for just about everything on the entire system). I suppose you could also bypass it by using libkhax, but that wouldn't work well on newer emuNANDs since the exploits would be patched.
Very interesting indeed, also ya no need for libkhax the "basic 36" services would be enough for most and would make it universally compatible along every emunand version since it's just using the cia permission without getting anymore through "hax"

Just wondering what kind of undertaking this would be. As in would this be a massive project?
 
I'm not an expert, but I don't think it'd be any more involved than doing the same thing for a 3dsx loader; you'd (you meaning a person in general) just have to parse the ELF format instead of the 3dsx format, allocate memory as appropriate, put the program where it expects to be, and then run it. I think it'd be better to make a 3dsx loader first before experimenting with ELFs, since 3dsx is more widely accepted at the moment. An ELF loader would be more of a novelty, since we can run 3dsx files and CIA files as homebrew already.

Edit: One other tidbit, CIA homebrew is actually made up of an ELF file, in addition to the banner/sound/etc. So in a way, each CIA homebrew you install is sort of a mini ELF loader, but the 3DS OS handles it instead of a custom loader.
 
Last edited by daxtsu,
  • Like
Reactions: 4gionz

Site & Scene News

Popular threads in this forum