Michael Morrell wrote:
Luckily(?), this isn't a ccache issue. I was able to reproduce it with g++. We're using an ARM cross-compiler from CodeSourcery (Sourcery G++ 4.3-234). To reproduce what I'm seeing: % cat foo.cpp #include <cstdlib> void foo() {} % g++ -g -E foo.cpp > foo.ii % g++ -g -c foo.ii % readelf -wl foo.o | grep foo 1 0 0 0 foo.cpp 6 0 0 0 foo.ii There is something in <cstdlib> that is triggering this behavior, but I don't know if it is a cstdlib bug or a compiler bug. I'll file a bug report with CodeSourcery, but was curious if anyone here had any thoughts. I will also try to dig into <cstdlib> and see if I can isolate this further. Michael
doing: % cat foo.cpp using namespace bar; does include foo.ii. When you do readelf -wlLiaprmfFsoR foo.o (let's be a bit barbarian) in the .debug_info you see that std is seen as being declared in foo.ii (DW_AT_decl_file : 2) (where 2 points to foo.ii) instead of foo.cpp. Don't know if it's expected behavior but maybe your problem is this one.