3 ms·
They're (a) in no way connected to the .so files, (b) not necessarily available, (c) incomplete information since build information (e.g. compiler, command l
by Firadeoclus 8y ago
They're
(a) in no way connected to the .so files,
(b) not necessarily available,
(c) incomplete information since build information (e.g. compiler, command line options) is missing, and
(d) much harder to parse than necessary.
- kazinator 8y agoYou don't need special compiler options to use a shared object. If you got it as a binary, there is nothing to compile. The incomplete information in header files isn't the compiler command line options, but the nuances of the API semantics. Like if a structure is passed and the structure contains pointers. Who owns the structure and must free it? Who owns the pointers inside it? Oooh, here is a functional argument: what parts of the API can be safely invoked from that callback? That size argument, is that bytes or array elements? And so on.
- Firadeoclus 8y ago> You don't need special compiler options to use a shared object. If you got it as a binary, there is nothing to compile. I was referring to the header file. Unfortunately, with C/C++ you need compile options to fully interpret source code. > The incomplete information in header files isn't the compiler command line options, but the nuances of the API semantics. No doubt there's much more to API semantics than basic type information. But the latter is still valuable.
- avodonosov 8y agoThere are shortcomings, but they do exist, and if you have a practical goal, may provide a descent and easy enough solution.
- Firadeoclus 8y agoThat is true, but I don't think cturner was unaware that source code can be perused where available.
- cturner 8y agoThanks. Yes, I was after an experience along the lines of python's inspect module, or Java reflection, but against native code shard objects. And feeling incredulous that it had not been standardised decades ago in major tool chains. Another poster highlighted Stephen Kell's work, and this is exactly what I had in mind. He highlights obstacles with mmap in one video. I did not recognise these issues until I had watched his presentation, but now see that they are difficult hurdles that are inherent to the problem.