This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
How to instrument an initcall?
- From: "Haifeng He" <hehaifeng2nd at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 25 Feb 2008 20:08:07 -0700
- Subject: 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