I was trying to get symbol name info from dladdr inside my own program, and
noted the -rdynamic support was added to do so.

This works well. However, when using tcc shebang with -run, the request
fails to find symbol name information. I assumed adding -bt would resolve
the issue, but alas it does not.

I haven't been able to fully pick apart what tcc -run is actually doing,
aas it is diversely spread throughout the library, so please help me
understand what might be appropriate.

It is clear the effect of -rdynamic boils down to bind_libs_dynsyms() in
tccelf.c (and a nearly equivalent in tccpe.c but I'll ignore that for now).
This is only called inside elf_output_file(), which would prevent my use.

Does anybody have a good idea what footguns might exist in trying to put
the appropriate sections into the memory loaded file? Is it sufficient to
call bind_libs_dynsyms()? Am I missing a bigger picture here?
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to