[PATCH] Fix unresolved symbols when loading gold plugin

Rafael Avila de Espindola rafael.espindola at gmail.com
Tue Jun 24 11:00:55 PDT 2014


Lgtm. Thanks and sorry!

Sent from my iPhone

> On Jun 24, 2014, at 10:43, Alexey Volkov <avolkov.intel at gmail.com> wrote:
> 
> Hi rafael,
> 
> Gold plugin is missed some symbols when built using configure and make.
> LLVMgold.so: could not load plugin library: LLVMgold.so: undefined symbol: LLVMInitializeSparcTarget
> 
> When using cmake I don't see these errors.
> This error was introduced with changes to plugin on revision 211315.
> 
> http://reviews.llvm.org/D4275
> 
> Files:
>  tools/gold/Makefile
> 
> Index: tools/gold/Makefile
> ===================================================================
> --- tools/gold/Makefile
> +++ tools/gold/Makefile
> @@ -9,7 +9,6 @@
> 
> LEVEL := ../..
> LIBRARYNAME := LLVMgold
> -LINK_COMPONENTS := support
> LINK_LIBS_IN_SHARED := 1
> SHARED_LIBRARY := 1
> LOADABLE_MODULE := 1
> @@ -21,11 +20,11 @@
> # early so we can set up LINK_COMPONENTS before including Makefile.rules
> include $(LEVEL)/Makefile.config
> 
> +LINK_COMPONENTS := $(TARGETS_TO_BUILD) LTO
> +
> # Because off_t is used in the public API, the largefile parts are required for
> # ABI compatibility.
> CXXFLAGS += -I$(BINUTILS_INCDIR) -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> LDFLAGS += -L$(SharedLibDir)/$(SharedPrefix)
> 
> include $(LEVEL)/Makefile.common
> -
> -LIBS += -lLTO
> <D4275.10788.patch>




More information about the llvm-commits mailing list