I already know which files define and reference my various symbols.
What I want to know is, why does the linker think that there is a
path from the entrypoint (main) to these functions? I am pretty
darn positive there isn't such a path, since like I said, I even
went so far as to comment out all references to these functions
from the main code. At that point, you can remove the cpp's in
question and the app compiles/links fine (of course, it doesn't run
since I've commented out crucial logic); if you put the cpp's back,
they start showing up in "nm" dumps, even though the app is still
not referencing the code.
I'm stumped; I'm pretty positive this is just a linker bug. It
would be great if there were an option to have the linker show a
debug log like this when it is dead stripping:
_start: entrypoint
_start: references main
main: references foo
foo: references bar
bar: references YOUR_SYMBOL_HERE