Re: dlsym question
Re: dlsym question
- Subject: Re: dlsym question
- From: Vladimir Zidar <email@hidden>
- Date: Sun, 10 Apr 2011 21:48:57 +0200
As the comment says above, this refers to symbol names generated by C (or optionally C++ compiler, given proper (de)mangling).
For anything other than this, you are on your own best guess what would the symbol name be (applies for ObjC, asm, etc...).
On 10 Apr 2011, at 21:38, Nat! wrote:
> Am 09.04.2011 um 23:46 schrieb Nat!:
>>
>> // dlsym() assumes symbolName passed in is same as in C source code
>> // dyld assumes all symbol names have an underscore prefix
>> char underscoredName[strlen(symbolName)+2];
>> underscoredName[0] = '_';
>> strcpy(&underscoredName[1], symbolName);
>
> It occured to me, that it won't be able to find symbols a la
>
> extern void some_non_underscore_prefixed_routine( void) asm("some_non_underscore_prefixed_routine");
>
> either. This automatic prefixing of '_' is clearly not optimal...
>
> Ciao
> Nat!
> ---------------------------------------------------
> Vom Reden wird die Kuh nicht gemolken. -- K. Immler
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden