From: Sandeep K Chaudhary <babbusandy2006@gmail.com>
To: gcc-help@gcc.gnu.org
Subject: Help needed with loading a gcc plugin
Date: Sat, 22 Jun 2013 07:31:00 -0000 [thread overview]
Message-ID: <CAEEAEzW3MEAn9e3BMOELajmeE2uH4ngHKN9E-KpH_WxoR5VQYg@mail.gmail.com> (raw)
Hi guys,
I am trying to run a gcc plugin that I created. I have followed the
steps mentioned in the followiing tutorial to create the plugin
http://lwn.net/Articles/457543/
I am able to successfully build the plugin shared object. However, I
can not run the plugin. It gives errors related to undefined symbols.
Below is the terminal snippet.
sandeep@ubuntu:~/myplugin$ /usr/bin/gcc
-fplugin=/home/sandeep/myplugin/speller.so -c test.c
cc1: error: cannot load plugin /home/sandeep/myplugin/speller.so
/home/sandeep/myplugin/speller.so: undefined symbol: warning_at
I can see that the mentioned symbol is indeed undefined using following
sandeep@ubuntu:~/myplugin$ nm -D -C speller.so | grep warning_at
U warning_at
And I see that
sandeep@ubuntu:/usr/lib/gcc/x86_64-linux-gnu/4.7.2$ pwd
/usr/lib/gcc/x86_64-linux-gnu/4.7.2
sandeep@ubuntu:/usr/lib/gcc/x86_64-linux-gnu/4.7.2$ nm -D -C $(gcc
-print-file-name=cc1) | grep "warning_"
0000000000c1e5a0 T warning_at(unsigned int, int, char const*, ...)
What am I missing? How should I link the libraries correctly?
Please help.
Thanks,
Sandeep.
next reply other threads:[~2013-06-22 7:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-22 7:31 Sandeep K Chaudhary [this message]
2013-06-22 22:02 ` Ian Lance Taylor
2013-06-23 4:11 ` Sandeep K Chaudhary
2013-06-25 6:00 ` Sandeep K Chaudhary
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=CAEEAEzW3MEAn9e3BMOELajmeE2uH4ngHKN9E-KpH_WxoR5VQYg@mail.gmail.com \
--to=babbusandy2006@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).