> But if you emit the information anyway then it is (as even Alan admits) > useful for analysing tools. In this particular case knowing that a > symbol/address came from the .tm_clone_table seems useful to me.
Agreed. > > Unless I'm missing something, there are three sensible options. > > 1. A preserved symbol in a discarded section becomes SHN_ABS. > > 2. A discarded section is not actually discarded, but assigned to one of > > the adjacent output sections, so its symbols wind up in that section. > > 3. No orphan input section is discarded if it contains any symbols. > > There also is the option of just doing away with the section table > and just keep the program headers when producing an executable of > course. But that also isn't particularly useful. It's useful for some things, but only for things wherein you discard the entire symbol table, so this issue is moot. > > My impression is that gold just doesn't discard any sections at all, > > instead producing empty output sections. I don't see any harm in that. > > Yes, that (3) seems the best option. IMHO. Both 1 and 2 loose the original ^-o > information. Agreed. > But we need to have this discussion on the binutils list > if we want to advocate a change/patch for ld. Feel free to CC me if you take it up there. Thanks, Roland _______________________________________________ elfutils-devel mailing list elfutils-devel@lists.fedorahosted.org https://fedorahosted.org/mailman/listinfo/elfutils-devel