public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "mimamer at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/61395] New: Linker cannot find symbols in object files compiled with recent GCC Date: Mon, 02 Jun 2014 21:16:00 -0000 [thread overview] Message-ID: <bug-61395-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61395 Bug ID: 61395 Summary: Linker cannot find symbols in object files compiled with recent GCC Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: mimamer at gmail dot com Apologies in advance for any mistakes in posting this bug report. If what I am describing is not a bug in GCC please direct me to a place where I can ask for help on this issue -- thanks! I recently upgraded from GCC 4.3.4 to 4.9.0, which I set up as a cross compiler from i686-pc-cygwin to i686-pc-elf together with static and shared libgcc support. I created a shared libgcc.so version from libgcc.a using 'ld' and specifying --whole-archive (as well as the other usual flags). Now, when I try to link even a very simple test program that emits a symbol defined in a shared library such as libgcc.so the link step fails with GCC/ld complaining that the symbol (e.g., __divdi3) cannot be found. I can verify that the symbol is available in libgcc.so's .symtab (as FUNC LOCAL DEFAULT 12) and specified in main.o's .symtab (as NOTYPE GLOBAL DEFAULT UND), yet when I try to link main.o with -lgcc (or libgcc.so) I get "Undefined reference to `__divdi3'". Upgrading the linker did not have any effect. I can also verify that the linker finds all input files in the right places, so I am completely at lost what is going wrong here, and though I suspect a compiler bug (since this did work for me with GCC 4.3.4) I may easily be wrong. Apologies again!
next reply other threads:[~2014-06-02 21:16 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-06-02 21:16 mimamer at gmail dot com [this message] 2014-06-02 21:19 ` [Bug c/61395] " pinskia at gcc dot gnu.org 2014-06-02 21:24 ` mimamer at gmail dot com 2014-06-02 21:26 ` pinskia at gcc dot gnu.org 2014-06-02 23:02 ` mimamer at gmail dot com 2014-06-02 23:20 ` mimamer at gmail dot com
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-61395-4@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).