[PATCH] Extend acceptable undefined symbol handling
Shankar Kalpathi Easwaran
shankarke at gmail.com
Tue Sep 3 16:15:43 PDT 2013
================
Comment at: include/lld/Core/LinkingContext.h:320
@@ +319,3 @@
+ /// Abstract method to return whether the output is shared for the purpose
+ /// of missing undefind symbols.
+ virtual bool outputIsSharedLibrary() const = 0;
----------------
minor not: still says undefind --> undefined.
================
Comment at: lib/Core/Resolver.cpp:342-344
@@ -341,6 +341,5 @@
- // If this is a library and undefined symbols are allowed on the
- // target platform, skip over it.
- if (isa<SharedLibraryFile>(f) && _context.allowShlibUndefines())
- continue;
+ // Ignore undefined symbols from other shared libraries.
+ if (isa<SharedLibraryFile>(f))
+ continue;
----------------
Why do we want to ignore undefined symbols from shared libraries with dynamic linking ?
The condition should include
if (isa<SharedLibraryFile>(f) && !_context.allowShlibUndefines())
continue
or try to combine these conditions in the below condition.
================
Comment at: include/lld/Core/LinkingContext.h:321
@@ -319,1 +320,3 @@
+ /// of missing undefind symbols.
+ virtual bool outputIsSharedLibrary() const = 0;
/// @}
----------------
minor nit :- Isnt SharedLibrary an ELF term ? If so, should that be changed to Dynamic library or so
http://llvm-reviews.chandlerc.com/D1582
More information about the llvm-commits
mailing list