How to insert external global variable declarations and pointer assignment statements through GCC plugin GIMPLE pass
Ian Lance Taylor
iant@google.com
Tue Jun 14 17:39:00 GMT 2011
"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
More information about the Gcc-help
mailing list