2009/3/17 Cristian Morales Vega
2009/3/17 Ludwig Nussel
: Michael Matz wrote:
[...] In any case, this would be _extremely_ fragile, and generally a terrible idea. The only way to sensibly generate such fake library is by parsing the original exported symbols from the .so file, generating a C source file from that info, implementing empty functions and defining data symbols (of the right size), of the right visibility and version info (the latter can be done by inline asm or by a linker version script).
This script basically uses that technique to create filter objects: http://xqf.svn.sourceforge.net/viewvc/xqf/trunk/xqf/src/gensyms.pl?revision=... It only handles functions. No data.
From the "I will need to learn perl" guy: http://rafb.net/p/5yePWB20.html That should add objects, but: - I don't know perl - There can be weak symbols that aren't functions? Anyway, I didn't though about weak symbols. - I don't know perl - secton number -> sections name is hardcoded. Something to improve. - I don't know perl - Symbol visibility is ignored, but libavcodec seems to use default visibility for everything. - I don't know perl - I don't know how that "__asm__(\".symver $vsym2,$sym$at$ver\");" thing works... it's the same for data than for functions? - I don't know perl - I'm not very sure about why the "$seen" variable is there. Could be two symbols for the same function?? Anyway, I suppose an OBJECT symbol can have the same name than a FUNC symbol, so even if a symbol has already been $seen perhaps shouldn't be ignored? - I don't know perl
After modifying it so it doesn't hardcodes section numbers, checks the symbol visibility, etc. I have modified home:RedDwarf:fakePackman to use it. And, without too much tests, it seems to work ok. And now I don't need to patch aegisub configure script. The two scripts are available at https://build.opensuse.org/package/show?package=ffmpeg&project=home:RedDwarf:fakePackman. Any comment is welcome. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org