From: Ian Lance Taylor <iant@google.com>
To: "Abhijit Nandy" <abhijit.nandy@gmail.com>
Cc: "gcc" <gcc-help@gcc.gnu.org>
Subject: Re: How to insert external global variable declarations and pointer assignment statements through GCC plugin GIMPLE pass
Date: Tue, 14 Jun 2011 17:39:00 -0000 [thread overview]
Message-ID: <mcrhb7spc02.fsf@coign.corp.google.com> (raw)
In-Reply-To: <F619BDBA45C7469FB092874D6CC9C6BB@abhiPC> (Abhijit Nandy's message of "Tue, 14 Jun 2011 19:05:45 +0200")
"Abhijit Nandy" <abhijit.nandy@gmail.com> writes:
> I get the following output from it :
>
> ;; Function main (main)
>
> main ()
> {
> char * p.1;
>
> <bb 2>:
> .....
> p.1 = &_binary_ccu_start;
> molen_elfset (p.1);
> ....
> }
> ------------------------------------------------------------------------------------
>
> To recall I am trying to insert the following in a C program :
>
> extern char _binary_ccu_start;
>
> int main (int argc, char **argv)
> {
> ....
> char *p = &_binary_ccu_start;
> molen_elfset(p);
> ...
> }
If you are looking at a dump file, then it seems to me that you are
getting what you want. A dump file is not a C file; it doesn't list the
extern declarations explicitly.
Let me know if I'm missing something.
Ian
next prev parent reply other threads:[~2011-06-14 17:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-25 0:41 Abhijit Nandy
2011-05-25 8:20 ` Ian Lance Taylor
2011-05-31 12:47 ` Abhijit Nandy
2011-05-31 19:40 ` Ian Lance Taylor
2011-06-14 17:29 ` Abhijit Nandy
2011-06-14 17:39 ` Ian Lance Taylor [this message]
2011-06-14 18:36 ` Abhijit Nandy
2011-06-14 20:03 ` Ian Lance Taylor
2011-06-15 7:25 ` Abhijit Nandy
2011-06-15 9:14 ` Ian Lance Taylor
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=mcrhb7spc02.fsf@coign.corp.google.com \
--to=iant@google.com \
--cc=abhijit.nandy@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).