> Wow! Any chance you can blog about this somewhere? If you don't, I will based > on your data.
No, I don't have a public blog. So please go ahead, thanks ! -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of ext Thiago Macieira Sent: Sunday, July 29, 2012 9:10 PM To: [email protected] Subject: Re: [Development] how to reduce the relocation <-- Use static qt libraries On domingo, 29 de julho de 2012 08.13.20, [email protected] wrote: > - actually for loading time, the bottleneck is the R_ARM_ABS32 > relocation, which is reduced around 97% now ! > > Finally the overall loading time is reduced from ~10-20s to ~1s... Wow! Any chance you can blog about this somewhere? If you don't, I will based on your data. > But I still have some question about the R_ARM_ABS32 relocation. > > It seems if the function is virtual (with "default" visibility), then > it will be added into .rel.dyn as the R_ARM_ABS32 type, for example: 007b0124 > 0011a802 R_ARM_ABS32 00311e4b > _ZN20QEventDispatcherUNIX13processEventsE6QFlagsIN10QEventLoop17Proces > sEven > tsFlagEE > > Could someone help with below: > 1. why the virtual function with "default" visibility needs relocation > even if it's implemented inside ? That's what "default" means: the symbol can be interposed by another, from a different library. It is possible that another library implements a different version of this function. If it weren't like that, if it resolved to the local library, it would be behaviour of "protected" visibility. That is: > 2. when changed to "protected" visibility, I guess it's optimized to > add a GOT.PLT entry as a R_ARM_RELATIVE relocation, is that true ? The virtual table gets a relative relocation, true. Virtual calls don't need PLT entries since they're always indirect. The PLT for a virtual function only shows up if that function is called non-virtually: that is, from the constructor, when the full class name was specified or when the compiler could prove what class the object is. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center Intel Sweden AB - Registration Number: 556189-6027 Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
