Ian Lance Taylor wrote: > Why do you need the double scan? Why can't you just consistently > ignore the frame tables?
Because we need the tables associated with every "useful" object to be registered for exception handling to work, and what is registered is currently what collect2 finds while it scans. It turns out the double scan actually doesn't work because the eh tables of the "useful" object linked in are garbage collected by the native linker when they are not referenced, so they are just not there when the second scan proceeds :(