Llinking @_Znam and @_Znwm

I am new to C ++ programming and am currently working on an llvm development project. When I link the object files created by llc, my linker cannot find the following functions. I know that these are standard C ++ library functions, but using -lstdc++ does not work. Now my question is where are these functions defined and how can I relate them to my object files, and in fact what do they do?

 declare noalias i8* @_Znam(i64) declare noalias i8* @_Znwm(i64) 
+2
source share
1 answer

These functions are standard C ++ library functions, in particular, operator new[](unsigned long) and operator new(unsigned long) . They should be provided by your C ++ runtime library. Depending on which compiler you use, there will be libsup ++ or lib ++ abi or libcxxrt.

+2
source

Source: https://habr.com/ru/post/1011626/


All Articles