From: Edward Peschko <horos11@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: linker bug in gcc
Date: Fri, 03 Jun 2011 04:30:00 -0000 [thread overview]
Message-ID: <BANLkTin92=PNM+ZAKiDfqqgw7E28XSPa4Q@mail.gmail.com> (raw)
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
next reply other threads:[~2011-06-03 4:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-03 4:30 Edward Peschko [this message]
2011-06-03 5:53 ` Ian Lance Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTin92=PNM+ZAKiDfqqgw7E28XSPa4Q@mail.gmail.com' \
--to=horos11@gmail.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).