Re: [Development] Enabling -fPIE globally
I think feedback from KDAB and FrogLogic about this change would also be valuable, to discuss the changes required to their tools for automated testing of Qt applications. My understanding is that they now would need a code injector on Linux (like on Windows), instead of simply LD_PRELOADing their libs, right? -- .marius On 1/29/12 2:15 PM, ext Thiago Macieira thiago.macie...@intel.com wrote: Hello Olivier has just uploaded a change ( http://codereview.qt-project.org/14528 ) that enabled -fPIE in all application builds and I support him. He also added a static assertion check for ELF builds without position-independent code, so that people using other buildsystems are reminded to turn -fPIE on too. If you have a problem with this, speak up. Linux distributors, especially, let us know what you think. For more background, please read my blogs on the sorry state of libraries on Linux. But the summary is: function pointer comparison is broken with current versions of gcc and the -Bsymbolic-functions option we've made the default. See also: http://macieira.org/blog/2012/01/sorry-state-of-dynamic-libraries-on-linux / http://macieira.org/blog/2012/01/update-and-benchmark-on-the-dynamic-libra ry- proposals/ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19520 http://sourceware.org/bugzilla/show_bug.cgi?id=13600 -- 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 Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Enabling -fPIE globally
On Sunday, 29 de January de 2012 15.02.01, marius.storm-ol...@nokia.com wrote: I think feedback from KDAB and FrogLogic about this change would also be valuable, to discuss the changes required to their tools for automated testing of Qt applications. My understanding is that they now would need a code injector on Linux (like on Windows), instead of simply LD_PRELOADing their libs, right? Not exactly. In fact, without -Bsymbolic-functions, we don't add the -- dynamic-list option, which is what enables the symbol hijacking they need. The option is still there, so the hijacking will still work. And I've already asked Stephen to create a proper callback mechanism, instead of relying on hijacking (which I proved not to work in my blog). -- 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 signature.asc Description: This is a digitally signed message part. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Enabling -fPIE globally
On Sunday, January 29, 2012 16:47:43 Thiago Macieira wrote: On Sunday, 29 de January de 2012 15.02.01, marius.storm-ol...@nokia.com wrote: I think feedback from KDAB and FrogLogic about this change would also be valuable, to discuss the changes required to their tools for automated testing of Qt applications. My understanding is that they now would need a code injector on Linux (like on Windows), instead of simply LD_PRELOADing their libs, right? Not exactly. In fact, without -Bsymbolic-functions, we don't add the -- dynamic-list option, which is what enables the symbol hijacking they need. ... but unfortunately not with gold: http://sourceware.org/bugzilla/show_bug.cgi?id=13577 The option is still there, so the hijacking will still work. I can't seem to make my system behave sanely if I don't use gold. I'm building my Qt 5 with -no-reduce-relocations now. Anyone who wants to can try GammaRay with Qt5 already though. I ported it in early January (using some ifdefs): https://github.com/KDAB/GammaRay And I've already asked Stephen to create a proper callback mechanism, instead of relying on hijacking (which I proved not to work in my blog). The creation of a callback mechanism sounds like a good idea, but will require a lot of thought, coordination and work which is currently unscheduled. Thanks, -- Stephen Kelly stephen.ke...@kdab.com | Software Engineer KDAB (Deutschland) GmbH Co.KG, a KDAB Group Company www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090 KDAB - Qt Experts - Platform-Independent Software Solutions signature.asc Description: This is a digitally signed message part. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Enabling -fPIE globally
On Sunday, January 29, 2012 14:15:43 Thiago Macieira wrote: Hello Olivier has just uploaded a change ( http://codereview.qt-project.org/14528 ) that enabled -fPIE in all application builds and I support him. He also added a static assertion check for ELF builds without position-independent code, so that people using other buildsystems are reminded to turn -fPIE on too. If qmake can tell us (at building-Qt-time) that this is needed, I'm sure we can add something to the Qt CMake files to make this easier. If you have a problem with this, speak up. Linux distributors, especially, let us know what you think. Are you sure they're on this mailing list? For more background, please read my blogs on the sorry state of libraries on Linux. But the summary is: function pointer comparison is broken with current versions of gcc and the -Bsymbolic-functions option we've made the default. I have to admit that I don't know what effect this change would have on preloading. Thanks, -- Stephen Kelly stephen.ke...@kdab.com | Software Engineer KDAB (Deutschland) GmbH Co.KG, a KDAB Group Company www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090 KDAB - Qt Experts - Platform-Independent Software Solutions signature.asc Description: This is a digitally signed message part. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] Enabling -fPIE globally
On Sunday, 29 de January de 2012 18.25.10, Stephen Kelly wrote: If qmake can tell us (at building-Qt-time) that this is needed, I'm sure we can add something to the Qt CMake files to make this easier. contains(QT_CONFIG, reduce_relocations):message(Use -fPIE) If you have a problem with this, speak up. Linux distributors, especially, let us know what you think. Are you sure they're on this mailing list? No. I expect we'll get more feedback after the alpha release. For more background, please read my blogs on the sorry state of libraries on Linux. But the summary is: function pointer comparison is broken with current versions of gcc and the -Bsymbolic-functions option we've made the default. I have to admit that I don't know what effect this change would have on preloading. None. This changes *applications*, not the libraries. -- 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 signature.asc Description: This is a digitally signed message part. ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development