This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

linker bug in gcc


All,

I was trying to compile a new version of libselinux, and ran across a
weird error (attached). I tried a bunch of stuff, and finally searched
all the libraries on the system for that symbol, which was found in
/lib/ld-2.3.4.so.

In desperation I added it explicitly on the command line, and it
compiled. So. Is this just a bug in gcc and the linker chain?
Shouldn't the linker itself handle linking in symbols found in the
linker itself? Or perhaps its a bug.

I'm somewhat perplexed about this..

Ed

cc  -shared -o libselinux.so.1 avc.lo avc_internal.lo avc_sidtab.lo
booleans.lo canonicalize_context.lo checkAccess.lo check_context.lo
compute_av.lo compute_create.lo compute_member.lo compute_relabel.lo
compute_user.lo context.lo disable.lo enabled.lo fgetfilecon.lo
freeconary.lo freecon.lo fsetfilecon.lo get_context_list.lo
get_default_type.lo getenforce.lo getfilecon.lo getpeercon.lo init.lo
is_customizable_type.lo lgetfilecon.lo load_policy.lo lsetfilecon.lo
matchmediacon.lo matchpathcon.lo policyvers.lo procattr.lo
query_user_context.lo rpm.lo selinux_check_securetty_context.lo
selinux_config.lo setenforce.lo setfilecon.lo setrans_client.lo
seusers.lo -ldl -lsepol -L/usr/lib
-Wl,-soname,libselinux.so.1,-z,defs,-z,relro
matchpathcon.lo(.text+0x166): In function `set_matchpathcon_flags':
/usr/src/redhat/BUILD/libselinux-1.33.4/src/matchpathcon.c:84:
undefined reference to `___tls_get_addr'
matchpathcon.lo(.text+0xa29): In function `process_line':
/usr/src/redhat/BUILD/libselinux-1.33.4/src/matchpathcon.c:564:
undefined reference to `___tls_get_addr'
matchpathcon.lo(.text+0xde3): In function `*matchpathcon_init_prefix_internal':
/usr/src/redhat/BUILD/libselinux-1.33.4/src/matchpathcon.c:623:
undefined reference to `___tls_get_addr'
matchpathcon.lo(.text+0x183b): In function `matchpathcon':
/usr/src/redhat/BUILD/libselinux-1.33.4/src/matchpathcon.c:845:
undefined reference to `___tls_get_addr'
matchpathcon.lo(.text+0x1ac3): In function `selinux_file_context_verify':
/usr/src/redhat/BUILD/libselinux-1.33.4/src/matchpathcon.c:926:
undefined reference to `___tls_get_addr'
matchpathcon.lo(.text+0x1bad):/usr/src/redhat/BUILD/libselinux-1.33.4/src/matchpathcon.c:956:
more undefined references to `___tls_get_addr' follow
collect2: ld returned 1 exit status


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]