Jump to content











Photo
- - - - -

Actually portable binary (run same file on Linux, Windows without emulator)


  • Please log in to reply
1 reply to this topic

#1 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 24 August 2020 - 11:19 AM

There is a nice project that attaches the binaries for each type of operating system, making possible to run the same file wherever desired: https://justine.stor...is.com/ape.html
 

One day, while studying old code, I found out that it's possible to encode Windows Portable Executable files as a UNIX Sixth Edition shell script, due to the fact that the Thompson Shell didn't use a shebang line. Once I realized it's possible to create a synthesis of the binary formats being used by Unix, Windows, and MacOS, I couldn't resist the temptation of making it a reality, since it means that high-performance native code can be almost as pain-free as web apps. Here's how it works:

MZqFpD='
BIOS BOOT SECTOR'
exec 7<> $(command -v $0)
printf '\177ELF...LINKER-ENCODED-FREEBSD-HEADER' >&7
exec "$0" "$@"
exec qemu-x86_64 "$0" "$@"
exit 1
REAL MODE...
ELF SEGMENTS...
OPENBSD NOTE...
MACHO HEADERS...
CODE AND DATA...
ZIP DIRECTORY...


Curious way how he packed the executables.

I hope all is going well with you all!
:cheers:
  • Blackcrack likes this

#2 PTAHDEL0H0

PTAHDEL0H0

    Newbie

  • Members
  • 11 posts
  • Location:NEUR0PA==1..123PSUz[i)0NESSAY81 QPC sagt: R&B=:RÆliTERRAISALAND
  • Interests:1PTz[i)TR!ADÆYBFF's_(y]uAH45FConY0H0{~~?

Posted 12 September 2020 - 05:10 AM

Hey Nuno, long time no see, an interesting project yet for as I understand in itself limited to the C-instructionset as common denominator, running the platform-complient executable from embedded zip container...but I might be wrong..just looked briefly..

 

do not know if it can be used, for instance, to create a universal bootable entity which starts a full blown emulation environment "bare bone" like UAE and alike, emulating an Amiga (which is still main motivation for my "Salvation Platform" saving "ways of working' ... so much fun brainstormin' at bootland back in the day)

 

btw spoken of "Amiga" now you see where "too many beers" can lead to 'cuz I guess IT´s a she, a developing lady supporting all kinds of activism...who sells a 1yr code license for 1K for commercial deployment...clever girl..

 

cheers smiley_ptah.gif






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users