On 05/26/2013 11:08 AM, gcc frickler wrote:
Good point, but i think that is dangerous.
I have >5k source-Files and need to have this fixed in a semi-automatic
way (ctags did not find all of them).
I need a compiler warning on non-static/non-const globals because
sometimes (< 2 %) they are meant to be as global as it gets. I am trying
to build up a cross compilation unit database from the warnings to see
where are unintended clashes and what was intended (imported elsewhere
via the extern keyword).
It's probably easier if you look at the generated DSOs, extract the
symbol list, and join the result with itself to detecting collisions.
Something like that:
<https://github.com/fweimer/symboldb/blob/master/doc/examples/library-symbol-collisions.txt>
I think you can cut down the number of false positives by taking ELF
binding types into account (which I have not investigated yet).
--
Florian Weimer / Red Hat Product Security Team