add find global variable dependencies

Signed-off-by: xiehuc <xiehuc@gmail.com>