Artalus / odrey-clang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Detect collisions in user code linked against 3rd-party static lib

Artalus opened this issue · comments

class RealisationDetail {
  int x;
  void set(int v) { x = v; }
};

///lib.h
class TotallyOk {};
///lib.a
class ImplementationDetail {
  const char buffer[256];
  void set(const char *str) { ... }
}

...Is this even collision, or would linker be smart enough to separate those? And if it is, are there any options besides emitting ODR-1338: file.cpp: defining symbol X, while lib.a also has symbol X exported?
It also would need some crossplatform readelf or nm to work.