Post AMhvCB7Rf6DPoj3HEW by twinkle_mouse@snowdin.town
(DIR) More posts by twinkle_mouse@snowdin.town
(DIR) Post #AMhuCtyCo6WcxwVktk by lynne@pars.ee
2022-08-20T03:45:31.602379Z
0 likes, 3 repeats
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.
(DIR) Post #AMhuCytQVIfoEZJVdw by wowaname@anime.website
2022-08-20T03:51:20.382994Z
0 likes, 0 repeats
@lynne web search shows dladdr(3)
(DIR) Post #AMhuEAbESs5apZN1Ye by wowaname@anime.website
2022-08-20T03:51:34.834645Z
0 likes, 0 repeats
@lynne gnu c
(DIR) Post #AMhuLaF9WHkeOIZt0S by wowaname@anime.website
2022-08-20T03:52:54.577583Z
0 likes, 0 repeats
@lynne no idea if this is even the right thing looking at the man page and im too tired to decipher guhnoo right now
(DIR) Post #AMhuwdFFK5fCPlHtYW by shironeko@fedi.tesaguri.club
2022-08-20T03:59:39.416627Z
0 likes, 0 repeats
@lynne maybe preprocess it and turn it into _ or something?
(DIR) Post #AMhuxvdSQuZ5k1EMOu by lynne@pars.ee
2022-08-20T03:54:38.046478Z
0 likes, 0 repeats
@ben Nope, dlopen is very off. I'm linking to the object statically.
(DIR) Post #AMhuy0QWcQBubMDbRA by wowaname@anime.website
2022-08-20T03:59:49.197681Z
0 likes, 0 repeats
@lynne @ben i was waiting for some retard to suggest dlopen honestly
(DIR) Post #AMhvCB7Rf6DPoj3HEW by twinkle_mouse@snowdin.town
2022-08-20T03:55:49.771319Z
0 likes, 0 repeats
@lynne im not into those parts of C myself but escape the dot maybe?
(DIR) Post #AMhvCFxhekOSpxX4F6 by wowaname@anime.website
2022-08-20T04:02:24.999523Z
0 likes, 0 repeats
@twinkle_mouse>im not into those parts of C myselfretweet button is there instead of you having to guess and look stupid
(DIR) Post #AMhvDJSS8yc1y9Q2hE by a1ba@expired.mentality.rip
2022-08-20T04:02:33.463680Z
0 likes, 0 repeats
@lynne `void foo(void) __asm__(".foo");`works for me. Of course it's not standard but enough for GCC to understand.
(DIR) Post #AMhvN7t41DA4ykXsaO by twinkle_mouse@snowdin.town
2022-08-20T04:02:48.678647Z
0 likes, 0 repeats
@wowaname and?
(DIR) Post #AMhvNCPTCfSb0PjoeW by wowaname@anime.website
2022-08-20T04:04:23.574188Z
1 likes, 0 repeats
@twinkle_mouse get off social media until you know how to talk around people
(DIR) Post #AMhvNFrwLH13ja55we by a1ba@expired.mentality.rip
2022-08-20T04:04:27.089984Z
0 likes, 0 repeats
@lynne worked for variable too...`extern unsigned char g_var __asm__(".g_var");`
(DIR) Post #AMhwdFgosPaTlW4V16 by efi@chitter.xyz
2022-08-20T04:02:55Z
1 likes, 0 repeats
@lynne I think this is what you're looking for, maybeit seems you want \u2Ebut I may be wrong, i don't use C much
(DIR) Post #AMhx23mKIbqS3yTc80 by lynne@pars.ee
2022-08-20T04:21:35.129333Z
0 likes, 0 repeats
@a1ba Unfortunately, not portable enough.Has to work on everything ffmpeg supports.
(DIR) Post #AMhx24HsPJ59dpEoIy by a1ba@expired.mentality.rip
2022-08-20T04:23:01.151832Z
0 likes, 0 repeats
@lynne I don't think it's possible in standard C then :(except maaaybe this unicode thing from C11 that was suggested above
(DIR) Post #AMhxvxzH19dcJpBtVg by a1ba@expired.mentality.rip
2022-08-20T04:33:07.904380Z
0 likes, 0 repeats
@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?
(DIR) Post #AMiJ5kJCpKRdpS1D0q by T045T@scl.zmb.cm
2022-08-20T08:30:10Z
0 likes, 0 repeats
@lynne can you get a pointer to it with dlsym? (https://stackoverflow.com/a/27523461 suggests you might need additional compiler options to make that work)