how to open elf file image from inside genode? libbacktrace question

Alexander Tormasov a.tormasov at innopolis.ru
Mon Apr 5 19:48:20 CEST 2021


Returning to my question, could I use posix open(«/test-go») to open my binary from which I run executable, if I have the following code in run file:

        <start name="test-go" caps="250">
            <resource name="RAM" quantum="20M"/>
            <config verbose="yes" ld_verbose="yes" >
                <vfs> <dir name="dev"> <log/> </dir> </vfs>
                <libc stdout="/dev/log" stderr="/dev/log"/>
            </config>
        </start>

or I need to modify it and add another «double» option, something like

        <start name="test-go" caps="250">
            <resource name="RAM" quantum="20M"/>
            <config verbose="yes" ld_verbose="yes" >
                <vfs> <dir name="dev"> <log/> </dir>
			<rom name="test-go"/>
		</vfs>
                                <libc stdout="/dev/log" stderr="/dev/log"/>
            </config>
        </start>

> 5 апр. 2021 г., в 14:36, ttcoder at netcourrier.com написал(а):
> 
>>> Your parent needs a ROMFile capability to run
>>> your program. Ask it for that capability to read
>>> your own file. You can call that RPC  getexecname
>>> or whatever strikes your fancy.
>> 
>> the question is what path for open() call I should use for ROMfile?
> 
> Not sure if that's relevant to the discussion as I'm jumping in mid-stream, but in my Genode run 
> scenarios I use the following, in order to access data files (not exe files) :
> 
> 	<start name="my_application"> 
> 		<config>
> 			<vfs>
> 				<rom name="background.jpeg"/>
>   ..etc

Sincerely,
	Alexander



More information about the users mailing list