Harvard vs. vonNeuman

From: Sean 'Captain Napalm' Conner <spc_at_conman.org>
Date: Wed Sep 29 01:54:33 2004

It was thus said that the Great Michael Sokolov once stated:
> spc_at_conman.org (Sean 'Captain Napalm' Conner) wrote:
> > Okay, figured out why my code didn't work, and it's not due to writing to
> > the wrong location (although I suspect that still is a problem) but that
> > under Unix the code pages are marked read-only so of course it core dumped.
> You do know about -N option to ld, right? That would make an OMAGIC
> executable whose code is not protected.

  No, I did not know about the -N option. Tried that (once I found the
correct location) and it worked. Even more surprising was when I upped the
optimization level---the compiler (in this case, GCC *inlined* the
sort routine in sort_ascending() and sort_descending(), so even if I got the
right instruction changed, it wouldn't work because the code that was
modified was never called.

  Not that I would do this, even for throw away stuff, but it's nice to know
it's there if needed.

  -spc (Curious ... )
Received on Wed Sep 29 2004 - 01:54:33 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:37:32 BST