public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Help needed with loading a gcc plugin
@ 2013-06-22  7:31 Sandeep K Chaudhary
  2013-06-22 22:02 ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: Sandeep K Chaudhary @ 2013-06-22  7:31 UTC (permalink / raw)
  To: gcc-help

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-25  6:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-22  7:31 Help needed with loading a gcc plugin Sandeep K Chaudhary
2013-06-22 22:02 ` Ian Lance Taylor
2013-06-23  4:11   ` Sandeep K Chaudhary
2013-06-25  6:00   ` Sandeep K Chaudhary

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).