Solved it. The problem was that I was using -lgcov with some of the libraries that I was linking to, but not all of them even though they had all been compiled with the --coverage option. I guess each individual library needs to be linked with -lgcov since it's a static library. Simply linking the final DSO won't work. Feel free to correct me if I've said something wrong, but that's what seemed to work to me. Thanks. - Daniel