On 2019.04.11 13:20, Jack wrote:
> On 2019.04.11 04:37, Peter Humphrey wrote:
>> On Wednesday, 10 April 2019 23:58:26 BST you wrote:
>>> A gkrellm_init_plugin() function is supposed to be in each plugin
>>> so something is wrong with the gkrellfire plugin. Maybe it is
>>> corrupted or the plugin has had symbols stripped.
[snip....]
Something is definitely strange. If I unpack the source, and do "grep
init gkrellfire.c" I get
// All GKrellM plugins must have one global routine named init_plugin()
__declspec(dllexport) GkrellmMonitor
*gkrellm_init_plugin(win32_plugin_callbacks* calls)
GkrellmMonitor *gkrellm_init_plugin()
so the call is present. Compiling is only two commands. After the
first, "x86_64-pc-linux-gnu-gcc -O2 -pipe -fPIC `pkg-config gtk+-2.0
--cflags` -c -o gkrellfire.o gkrellfire.c" if I do "objdump -t
gkrellfire.o I grep init" I get
00000000000018b0 g F .text 0000000000000089 gkrellm_init_plugin
so the function is compiled into the .o file. The second command is
"x86_64-pc-linux-gnu-gcc -O2 -pipe -fPIC `pkg-config gtk+-2.0
--cflags` -o gkrellfire.so -Wl,-O1 -Wl,--as-needed -shared `pkg-config
gtk+-2.0 --libs`" after which "objdump -t gkrellfire.so | grep init"
gives
0000000000001000 l d .init 0000000000000000 .init
0000000000003e30 l d .init_array 0000000000000000
.init_array
0000000000003e30 l O .init_array 0000000000000000
__frame_dummy_init_array_entry
0000000000001000 l F .init 0000000000000000 _init
It makes no sense to me.
If I do the same with gkrellm-volume, both volume.o and volume.so
contain gkrellm_init_plugin. The compiles seems pretty similar:
x86_64-pc-linux-gnu-gcc -O2 -pipe -DPACKAGE="\"gkrellm-volume\"" -fPIC
`pkg-config gtk+-2.0 --cflags` -I/usr/local/include -DALSA -c -o
volume.o volume.c
(same for mixer.c, oss_mixer.c, and alsa_mixer.c)
x86_64-pc-linux-gnu-gcc volume.o mixer.o oss_mixer.o alsa_mixer.o -o
volume.so `pkg-config gtk+-2.0 --libs` -lasound -shared -Wl,-O1
-Wl,--as-needed
Anything else I can check or try?
Jack |