On 04-Mar-2017 07:37 AM, Carlos O'Donell wrote:
On 03/03/2017 11:00 AM, H.J. Lu wrote:__gnu_mbind_setup is called from ld.so. Since there is only one ld.so, it needs to know what to pass to __gnu_mbind_setup. Not all arguments have to be used by all implementations nor all memory types.I think what Supra is suggesting is a pointer-to-implementation interface which would allow ld.so to pass completely different arguments to the library depending on what kind of memory is being defined by the sh_info value. It avoids needing to encode all the types in the API, and just uses an incomplete pointer to the type.
Thats absolutely right.However, I am not suggesting one is better over the other. I just want to get clarity on how the code looks like for different implementations.
On 03-Mar-2017 09:30 PM, H.J. Lu wrote:
__gnu_mbind_setup is called from ld.so. Since there is only one ld.so, it needs to know what to pass to __gnu_mbind_setup.
So I want to know what is that ONE-FIXED-FORM of __gnu_mbind_setup being called by ld.so.
Not all arguments have to be used by all implementations nor all memory types.
I think I am still not getting this. Really sorry for that. Would it be possible for you to write a small pseudo code that depicts how this design looks like for different implementations?
Thanks a lot -- Supra