From: Brian D. <bdo...@la...> - 2005-08-02 16:33:30
|
On Tue, Aug 02, 2005 at 09:15:19AM -0700, Dave Roberts wrote: > Actually, I'm suggesting more than just bundling the core in with the > executable. I'm suggesting going one step farther and having the link > loader perform all the address adjustments for us such that the core > file segment is actually relocatable. As I understand it (and again, I'm > no ELF expert by any means), the loader can adjust offsets in the file > to allow it to be repositioned. I believe this is done for standard > relocatable libraries, right? Executables are traditionally not > relocatable but even this is changing with memory randomization > techniques being used for security. Red Hat is now compiling various > standard daemons as "Position Independent Executables" (PIEs) so they > can randomize the addresses of all the code segments, too. > > Anyway, rather than writing our own relocating loader, I was just > wondering if we could harness the existing machinery, and also kill the > "can't I make a single executable?" FAQ as well. ;-) I'm no expert in linkers, but I think given that a Lisp core has on average two absolute pointers /per cons cell/, and that those pointers are tagged (and the tags must remain correct), that getting a standard C linker to relocate a Lisp core is just not going to happen. If the tagging issue could somehow be solved the relocation tables would be incredibly huge regardless. -bcd |