tags:

views:

6

answers:

0

I have two binaries: js and firefox-bin. Both link with libjs_static.a. I have a symbol (javascript_execute__done_semaphore) in libjs_static.a that I want included in both binaries, but it is only appearing in js and not firefox-bin. How can I tell why it got included in js (so I can use that to figure out why it is NOT getting included in firefox-bin)?

The --trace-symbols=javascript_execute__done_semaphore only tells me that it is undefined in libjs_static.a(jsinvoke.o) and also defined in libjs_static.a. But it says that while linking both binaries, so apparently whatever is requiring it from jsinvoke.o is not needed for firefox-bin. I want to know what that thing is.

(I kind of know already, because I wrote the code that requires it, but I want to be able to walk back up the chain of dependencies because the problem is in the part that I don't know.)

Closely related, how does all this work? What granularity of "thing" requires a particular symbol? A symbol, a section, an object file? I'm trying to wade through all of Ian Lance Taylor's articles on linkers.

This is using g++ from gcc-c++-4.4.4-10.fc13.x86_64 and ld from binutils-2.20.51.0.2-20.fc13.x86_64 on Fedora 13 Linux.