public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "rep dot nop at aon dot at" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/24395] New: -funit-at-a-time drops used functions (IMA mode) Date: Sat, 15 Oct 2005 23:41:00 -0000 [thread overview] Message-ID: <bug-24395-11122@http.gcc.gnu.org/bugzilla/> (raw) When building a library in IMA mode, several used functions are optimized away: gcc-4.1-HEAD -W -Wall -pedantic -funit-at-a-time -DPIC -fPIC -o liblib.o -c lib.c lib1.c lib2.c strip -x -R .note -R .comment liblib.o ar cr liblib.a liblib.o ld -shared --warn-common --warn-once -z combreloc -z defs -s -rpath . \ -soname=liblib.so -o liblib.so --whole-archive liblib.a --no-whole-archive -lc Do we have all of libmain, __func1, __func2 ? nm -D --defined-only liblib.so 00001260 A __bss_start 000011e4 A _DYNAMIC 00001260 A _edata 00001260 A _end 000001bc T __func2 gcc-4.1-HEAD -W -Wall -pedantic -I. test.c -o libtest -L. -llib /tmp/ccsGhigf.o: In function `main': test.c:(.text+0x43): undefined reference to `libmain' collect2: ld returned 1 exit status make: *** [libtest] Error 1 This would be the expected result: nm -D --defined-only liblib.so 0000138c A __bss_start 000012e8 A _DYNAMIC 0000138c A _edata 0000138c A _end 00000234 T __func1 0000025b T __func2 00000282 T libmain -- Summary: -funit-at-a-time drops used functions (IMA mode) Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: critical Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rep dot nop at aon dot at GCC build triplet: i686-linux-gnu GCC host triplet: i686-linux-gnu GCC target triplet: i686-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24395
next reply other threads:[~2005-10-15 23:41 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-10-15 23:41 rep dot nop at aon dot at [this message] 2005-10-15 23:43 ` [Bug c/24395] " rep dot nop at aon dot at 2005-10-16 0:22 ` pinskia at gcc dot gnu dot org
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=bug-24395-11122@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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: linkBe 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).