This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Name of indirect function evaluating to a hidden function?



Just so there is no confusion about the chronology here, the question on stackoverflow is mine, and I was kindly referred to this mailing list.

The underlying question is whether it is possible to pass an indirect function as argument by name instead of by pointer.

An example would be RPC: get function name from pointer with dladdr on local machine and restore pointer from name on remote machine with dlsym. Lookup of __sin_avx as function name on local machine would not suffice, as remote machine may have resolved sin to something other than __sin_avx.

Is "looking at dynamic relocation at the call site" parsing of the GOT as suggested by yugr on stackoverflow? It did seem like a radical solution, I'm looking for something more conventional.

Are there other mechanisms I'm not aware of or is the simple answer that lookup of the name of an indirect function just can not be guaranteed?


Hans Berghäll




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]