Bug 27546 - undefined reference error fix-hint suggestion
Summary: undefined reference error fix-hint suggestion
Status: UNCONFIRMED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.26
: P2 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-08 20:58 UTC by srbvsr
Modified: 2024-03-16 02:28 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description srbvsr 2021-03-08 20:58:56 UTC
I was trying to build a binary, invoking a C-function (fileA.c) within a C++ function (fileB.cpp). The build ended with a linker error: undefined reference error on the C-function. 

Going over the objdump i was able to narrow its due to C++ name mangling. 

Examaple symbol output:

0000000000000000         *UND*  0000000000000000 _Z14ns_test_customv
0000000000000000 g     F .text  00000000000001d9 ns_test_custom

The enhancement idea here is to provide a suggestion to the end-user a possibility of C++ name mangling scanning the symbol table. 

There are similar user-suggestions available in the gnu compilers and hope the same can be adopted in the linker.