[Libre-soc-bugs] [Bug 1169] Add ELF and mmap support to ISACaller -- no dynamic linking

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Fri Sep 22 04:32:54 BST 2023


https://bugs.libre-soc.org/show_bug.cgi?id=1169

--- Comment #10 from Jacob Lifshay <programmerjake at gmail.com> ---
(In reply to Luke Kenneth Casson Leighton from comment #9)
> (In reply to Jacob Lifshay from comment #8)
> 
> > lifting, basically all we have to do is read the path to the interpreter
> > (ld.so) and load that instead of the main program and pass the file handle
> > in.
> 
> if it's really that easy then go for it.

that was one of two options in the ELF spec, I can't find where it says how the
kernel chooses between those two options...

the other option is read the path to the interpreter, load that and the main
program, and pass the pointer to the main program in the aux vector.

I did some more testing and it seems like linux uses the second option on the
talos server. no relocations seem to be performed by the kernel when loading
/usr/bin/echo -- I tested by running gdb /usr/bin/echo and then running
`starti` and dumping all the file mappings, comparing them to the file they
were loaded from.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list