how to open elf file image from inside genode? libbacktrace question
Alexander Tormasov
a.tormasov at innopolis.ru
Mon Apr 5 22:05:21 CEST 2021
>> or I need to modify it and add another «double» option, something like
>>
> You need this configuration. But why do you want to use a way that
> is dependent upon config, when you need it for a language detail. That is why make
> something compiled in depend on something configured. And why has it to be POSIX
> open ()? Alternatively you can store that capability on startup in a static var in
> open () where it is returned from upon encountering a special parameter combination
> for instance an empty string as filename.
of course, I would prefer to be able to use posix open (or even just obtain a dup() of handle for my own executable file) to use it for read()/write() operations later.
This is not mine code (libbacktrace is a part of original gcc), and I just want to be able to run it maximally smoothly inside genode.
In this moment it try to call posix open() for some names like /proc/self/exe or similar, and later returned handle used deeply inside code.
I will be happy to find ANY smooth way to have a handle for myself…
and, I am not so sure that loaded into ram current executable is suitable for such operations like read of elf header… probably I need to open it explicitly, but to do so I need to find it inside genode file system mounted name space (/vfs?)
More information about the users
mailing list