[LLVMbugs] [Bug 1611] New: llvm-ld cannot link when compiled with -fvisibility-hidden
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu Aug 16 03:42:17 PDT 2007
http://llvm.org/bugs/show_bug.cgi?id=1611
Summary: llvm-ld cannot link when compiled with -fvisibility-
hidden
Product: tools
Version: trunk
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: llvm-ld
AssignedTo: unassignedbugs at nondot.org
ReportedBy: hs4233 at mail.mn-solutions.de
CC: llvmbugs at cs.uiuc.edu
I compiled two files like this:
$ /usr/src/llvm/dist/bin/llvm-gcc -c -pipe --emit-llvm -fvisibility=hidden \
-Wall -W -Wno-pointer-sign -Wextra -Wno-sign-compare -O2 \
-D_REENTRANT -DNDEBUG -DLITTLE_ENDIAN=1 -DQT_NO_DEBUG \
-DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT \
-I/usr/share/qt3/mkspecs/default -I. -I.. -I../../../include/qt3 -I.obj/ \
-o .obj/conf.o ../lib5250/conf.c
$ /usr/src/llvm/dist/bin/llvm-g++ -c -pipe --emit-llvm -fvisibility=hidden \
-Wall -W -Wextra -Wno-sign-compare -O2 \
-D_REENTRANT -DNDEBUG -DLITTLE_ENDIAN=1 -DQT_NO_DEBUG \
-DQT_THREAD_SUPPORT -DQT_SHARED -DQT_TABLET_SUPPORT \
-I/usr/share/qt3/mkspecs/default -I. -I.. -I../../../include/qt3 -I.obj/ \
-o .obj/configwriter.o ../configwriter.cpp
and linked the resulting files with this:
$ /usr/src/llvm/dist/bin/llvm-ld -v -stats -native -O1 -strip-all \
-o main .obj/conf.o .obj/configwriter.o \
-L/usr/share/qt3/lib -L/usr/X11R6/lib \
-lcrypto -lusb -lutil -lqt-mt -lXext -lX11 -lm -lpthread
Linking bitcode file '.obj/conf.o'
Linked in file '.obj/conf.o'
Linking bitcode file '.obj/configwriter.o'
llvm-ld: error: Cannot link file '.obj/configwriter.o': Linking functions
named 'strcmp': symbols have different visibilities!
The same error doesn't happen when I omit the -fvisibility-hidden compiler
command switch.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list