Conversation
Notices
-
Embed this notice
Lynne (lynne@pars.ee)'s status on Saturday, 20-Aug-2022 13:02:42 JST Lynne Suppose I'm using C and linking to an object file that happens to contain a symbol with a dot in its name.
Is there any way I could access that symbol's address in C (to call, or to read?) without using assembly.
I can access the symbol from an assembler easily, it's just that C doesn't let me access it because of the dot.-
Embed this notice
nya-a1ba (a1ba@expired.mentality.rip)'s status on Saturday, 20-Aug-2022 13:02:40 JST nya-a1ba @lynne
`void foo(void) __asm__(".foo");`
works for me. Of course it's not standard but enough for GCC to understand. -
Embed this notice
nya-a1ba (a1ba@expired.mentality.rip)'s status on Saturday, 20-Aug-2022 13:04:28 JST nya-a1ba @lynne worked for variable too...
`extern unsigned char g_var __asm__(".g_var");` -
Embed this notice
Efi (nap pet) 🦊💤 (efi@chitter.xyz)'s status on Saturday, 20-Aug-2022 13:18:40 JST Efi (nap pet) 🦊💤 @lynne I think this is what you're looking for, maybe
it seems you want \u2E
but I may be wrong, i don't use C muchnya-a1ba likes this. -
Embed this notice
nya-a1ba (a1ba@expired.mentality.rip)'s status on Saturday, 20-Aug-2022 13:23:02 JST nya-a1ba @lynne I don't think it's possible in standard C then :(
except maaaybe this unicode thing from C11 that was suggested above -
Embed this notice
Lynne (lynne@pars.ee)'s status on Saturday, 20-Aug-2022 13:23:03 JST Lynne @a1ba Unfortunately, not portable enough.
Has to work on everything ffmpeg supports. -
Embed this notice
nya-a1ba (a1ba@expired.mentality.rip)'s status on Saturday, 20-Aug-2022 13:33:09 JST nya-a1ba @lynne for MSVC you probably could use .def files. Though I'm not sure if it works on static libraries, but it allows renaming symbols.
What else ffmpeg supports other than typical three C compilers?
-
Embed this notice