1

For simplicity, I have a dynamic library that contains 2 functions:

#mylibrary.h
void foo1();
void foo2();

Then I have an app that uses only one of this functions:

#include "mylibrary.h"
int maint(){
   foo1();
   return 0;
}   

Is there a way (maybe similar to this, but for clang+ld) to figure out what functions are never called by my app?

Remark: function foo2() is used by library itself internally, so -Wunused does not help.

0 Answers0