Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Hacking 32-bit rebol for 64-bit ubuntu

From: tim-johnsons:web at: 26-May-2007 7:04

On Saturday 26 May 2007 03:25, Anton Rolls wrote:
> Hi Tim, good hack job!
:-) It's an Alaskan thing!
> I just would like to understand what you did here a little better. > What do you mean by "ported all to the ubuntu machine" ?
copied the files from the slackware machine
> Do I understand correctly that all that was necessary was: > 1) edit the rebol executable
In overstrike/binary mode, just changed the 'i' in each name of each shared object to a '1'. That was an arbitrary choice, because I didn't want overwrite anything on the ubuntu side.
> 2) copy some .so files
make copies of the so files, changing their names to match the edits in the binary.
> Or is there also a compiling step ?
No. I would have needed the source code. Are you familiar with the process and rules regarding editing a binary? There is little that can be done, because you can't *insert* a single byte, because to do so would throw off the alignment in the code sector and destroy all function. So one much operate in overstrike mode and only change what would appear to be a string embedded in the code. That is why I just changed the one character in each name. Had I attempted to put in a whole new path such as "/lib/32bit/libc.so.6", the binary would have been 'destroyed'. Where I write:
> > I then edited the paths to the binaries as follows:
Would have been better written as "I then edited the names of the shared objects as follows:" I hope that is clearer. tim
> Regards, > > Anton. > > > I made a copy of the rebol binary on opened with vim using the -b switch, > > thus putting vim in binary mode. > > > > ------------------------- > > I then edited the paths to the binaries as follows: > > libm.so.6 => l1bm.so.6 > > libc.so.6 => l1bc.so.6 > > ld-linux.so.2 => ld-l1nux.so.2 > > and made copies of the shared objects with those name changes, > > ported all to > > the ubuntu machine and I have rebol running. > > ------------------------------------------------------------------------ > > > > Tim
-- Tim Johnson <tim-johnsons-web.com> Palmer, Alaska, USA