> On Mon, Dec 02, 2019 at 01:53:09PM +0100, Jan Hubicka wrote: > > > > It would be great to convert libstdc++ to the new infrastructure so it > > > > becomes LTO safe and gives some real world testing to this > > > > infrastructure. I tried that but found it is bit non-trivial since > > > > currently way we need to attach the attribute to definition itself, > > > > while current .symver output is done in separate C++ files. > > What is the reason for this limitation? I think that is pretty severe. > Wouldn't it be enough to accept symver attribute on any declaration, but at > the end verify that declarations that have that attribute have the > definition in the current TU? > > I mean, it is fairly common to: > void foo () > { > ... > } > > asm (".symver ..."); > where the foo definition comes from one source and symver from another one, > which includes the first source. > > So, the corresponding new rewrite for that might be: > void foo () > { > ... > } > > extern __typeof (foo) foo __attribute__((symver ("bar@@BAZ")));
Aha, this works :) I basically meant that I need the declaration which I found somewhat nontrivial to dig out of the libstdc++ headers. I did not think of typeof. I suppose I can add this as an example to the dcumentation (as an example convertion .symver assembly into attribute). Honza > > Jakub >