This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to instrument an initcall?


Hi,

I want to insert an initcall in a given program. The initcall should be executed
before any real computation starts. For example, given program as
main () {
  ...
}

I would like to transform to
main () {
  my_initcall();
}

I know how to add a call instruction in gimple tree but I am not sure
how to insert
the call inst into the right place. Any suggestion?

Thank

Haifeng


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]