Tarmik wrote:
Then I've managed to configure dehydra correctly:

$ ./configure --js-libs=../../mozilla/js/src/Linux_All_DBG.OBJ --js-
headers=/cy
gdrive/c/projects6/code_analysis/mozilla/js/src --gcc-build=/cygdrive/
c/project
s6/code_analysis/gcc-dehydra/gcc-build2

and build goes through compilation phase but fails on linking:

dehydra_plugin.o: In function `dfs_process_chain':
/cygdrive/c/projects6/code_analysis/dehydra_clean/dehydra-0.9/
dehydra_plugin.c:29: undefined reference to `_tree_code_type'
/cygdrive/c/projects6/code_analysis/dehydra_clean/dehydra-0.9/
dehydra_plugin.c:29: undefined reference to `_fancy_abort'
dehydra_plugin.o: In function `process_template_decl':
/cygdrive/c/projects6/code_analysis/dehydra_clean/dehydra-0.9/
dehydra_plugin.c:35: undefined reference to `_tree_contains_struct'
/cygdrive/c/projects6/code_analysis/dehydra_clean/dehydra-0.9/
dehydra_plugin.c:35: undefined reference to
`_tree_contains_struct_check_failed'

....
....

I've tried to apply patch similar to spider monkey - by replacing
-shared option with -r option (config.mk:
SHARED_LINK_FLAGS=-shared
=>
SHARED_LINK_FLAGS=-r
) - but without success. (Same error messages).

I'm not familiar with -r parameter - and could not locate it in
documentation
- I by myself has always used -shared parameter. So I've decided to go
deeper
into dehydra plugin source code. I need to study tree walking and tree
management anyway.
I believe -r is an option to tell 'ld' to make the output relocatable, so that it can be used as input to further invocations of 'ld'. I have no idea if it's required here. You may just need to do more research into building DLLs on Cygwin.

But with your output above, my first guess would be that the linker just isn't finding the gcc files to link against. It might help if you showed the command line that generated that output, or set a verbose option on it and see where it's looking.

I haven't found any declaration of global_namespace in dehydra. Have
you done
any updates on top of 0.9 version ?

I'm trying to pass global_namespace from gcc
(by altering tree-plugin-pass.c source code - see my previous posts)

May be I'll try to define it as weak symbol as well, if I'll find some
documentation
how it's done. (I'll do some googling).
I just have the hg tip of dehydra, and I just did 'grep global_namespace *.h *.c' in the dehydra source dir.
Google on "WPO" gives something like: World Packaging Organisation.
I guess it's not something you're telling me ? :)
"Whole program optimization", i.e., optimizations that look at more than one file at a time. But it is still being worked on, and also I think it is targeted to optimization and not so much for static analysis, so I don't know how useful it would be for that purpose.
When we do general interprocedural analyses, we use 2
phases: one with gcc plugins that extracts sufficient summary
information on each element in each file, then an aggregation phase that
puts it all together.

gcc perform some internal tuning of "code tree" -  so is this
something to do
phasing ?
I don't understand the question.
There exists 6 functions which are called between gcc and dehydra. Is
there any
description about these functions ? May be you can describe their call
order and parameters
shortly ?
See http://www.gccsummit.org/2008/gcc-2008-proceedings.pdf, page 30.

_______________________________________________
dev-static-analysis mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-static-analysis

Reply via email to