public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Li junsong <ljs.darkfish@gmail.com>
To: java@gcc.gnu.org
Subject: Why GCJ won't load my plugin when compiling bytecode?
Date: Fri, 09 Sep 2011 20:57:00 -0000	[thread overview]
Message-ID: <CA+kGxtNEF1jL0LO+F8cy+QAear_HFjzngia0BcQOL+QrxWEsBQ@mail.gmail.com> (raw)

Hi there,

I have a java source code Welcome.java, and my plugin's name is findvar.so.
To avoid things getting complex, I write a very simple plugin,
printing out Hello
when loaded(printing hello in initial function).

My plugin can be loaded if GCJ compiles source code to native machine code,
that is if I type:
                   gcj-4.6 -fplugin=findvar.so Welcome.java --main=Welcome
Hello is then output to screen, and a.out is produced.

But it won't work if GCJ compiles source code to java bytecode
                   gcj-4.6 -fplugin=findvar.so -C Welcome.java --main=Welcome
Nothing is promoted, only Welcome.class is produced.


Does that mean that GCJ doesn't support -C and -fplugin at the same time?

I really appreciate your answer.

J. Li

             reply	other threads:[~2011-09-09 20:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-09 20:57 Li junsong [this message]
2011-09-09 21:03 ` Andrew Pinski
2011-09-09 21:57   ` Li junsong
2011-09-09 22:24     ` Bryce McKinlay
2011-09-09 23:03       ` Li junsong
2011-09-12  0:49       ` Alan Eliasen
2011-09-12  0:54         ` Mark Mielke
2011-09-12  9:32         ` Bryce McKinlay

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=CA+kGxtNEF1jL0LO+F8cy+QAear_HFjzngia0BcQOL+QrxWEsBQ@mail.gmail.com \
    --to=ljs.darkfish@gmail.com \
    --cc=java@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).