"Abhijit Nandy" <abhijit.nandy@xxxxxxxxx> writes: > This is ok but I am unable to figure out how to insert a statement > like the following in global scope: > extern char _binary_ccu_start; > > or to make an assigment like the following inside main : > char *p = &_binary_ccu_start; > > Is this possible to do using a plugin ? You need to create a VAR_DECL with TREE_STATIC set to 1 and pass it to rest_of_decl_compilation. Then you can get an expression which takes it address by passing the decl to build_fold_addr_expr. Ian