79149830

Date: 2024-11-02 02:28:02
Score: 0.5
Natty:
Report link

A weak symbol will yield "Missing ELF symbol" in gdb. In my case, I linked a binary A against a shared lib B, in which A references weak symbol g_var which defined in B. The unexpected behavior is: the linker auto removed B from the linking libs.

My solution was to add -Wl,--no-as-needed to link options.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: rockeet