[Freemint-list] Interesting talk about non-mmu stuff

Ryan Daum ryan.daum at gmail.com
Thu Jan 26 00:43:51 MSK 2017


It's the same set of options needed in order to get the 'brownout' binary
to work to convert from ELF to GEMDOS's format, which makes sense that
utility basically does what I'm trying to do but as a separate step run on
the host.

This is what I have for my LDFLAGS: -Wl,--gc-sections -Wl,--emit-relocs
-Wl,-e__start -Ttext=0 -static -fleading-underscore

No guarantee that's 100% correct. But for my simple hello world binary I
get reloc sections and a lot of relocations. I think I finally am
interpreted the relocation records correctly, but maybe not all of them. My
binary crashes a few instructions after it jumps in, I believe there's
still some relocations not done, just walking through the disassembly
trying to figure it out but my 68k is rusty.

Actually doing the relocs takes a big chunk of time tho and really blows up
the binary size. It's not ideal. MMU-less ELF is not a great idea.

Ryan



On 25 January 2017 at 16:14, Vincent Rivière <vincent.riviere at freesbee.fr>
wrote:

> On 25/01/2017 à 22:04, Ryan Daum wrote:
> > Interesting talk, but one thing he doesn't mention is that it's possible
> to
> > load plain ELF binaries with a non-MMU system as long as you link them
> with
> > relocation sections baked in.
>
> Good!
>
> When I looked at that long ago, it seemed that indeed classic ELF
> executables didn't have relocation information by default. On the contrary,
> ELF object files contain full-featured relocation information.
>
> How did you manage to put relocation information in ELF executables? Did
> you
> use a custom section (and how?), or did you manage to tell the linker to
> add
> a classic ELF object-file relocation section into executables?
>
> --
> Vincent Rivière
> _______________________________________________
> Freemint-list mailing list
> Freemint-list at mail.atariforge.org
> http://mail.atariforge.org/mailman/listinfo/freemint-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.atariforge.org/pipermail/freemint-list/attachments/20170125/bc115738/attachment.html 


More information about the Freemint-list mailing list