[Development] how to reduce the relocation <-- Use static qt libraries

Thiago Macieira thiago.macieira at intel.com
Tue Jul 24 12:20:21 CEST 2012


On terça-feira, 24 de julho de 2012 08.42.29, song.7.liu at nokia.com wrote:
> Thanks, but can you detail more about the ELF pre-linking ?

/sbin/prelink

Indeed, I think prelinking is the only solution for your case. Given the 
statistics I posted on another email, the merging of libraries will not help a 
lot since the number of relocations that disappear is small.

But note that ELF prelinking requires that the operating system supports it. 
We know that Linux does, but you mentioned that you're using something 
proprietary.

For me:
$ prelink -p | grep '^/.*Qt'
/home/thiago/obj/qt/qt-4.8-release/lib/libQt3Support.so.4.8.0 [0xdb627b48] 
0x0000003834800000-0x0000003834ce5bf8:
/home/thiago/obj/qt/qt-4.8-release/lib/libQtTest.so.4.8.0 [0x9d13ac84] 
0x000000381a600000-0x000000381a828af8:
/home/thiago/obj/qt/qt-4.8-release/lib/libQtGui.so.4.8.0 [0x978b2ec7] 
0x0000003819400000-0x000000381a189710:
/home/thiago/obj/qt/qt-4.8-release/lib/libQtSql.so.4.8.0 [0x4bc61e3d] 
0x0000003825e00000-0x0000003826042ac0:
/home/thiago/obj/qt/qt-4.8-release/lib/libQtWebKit.so.4.9.0 [0xfb691ee5] 
0x000000382de00000-0x000000382fac4bf8:
/home/thiago/obj/qt/qt-4.8-release/lib/libQtMultimedia.so.4.8.0 [0x71012a29] 
0x000000381fc00000-0x000000381fe2cd30:
/home/thiago/obj/qt/qt-4.8-release/lib/libQtNetwork.so.4.8.0 [0x2d86dad0] 
0x0000003817a00000-0x0000003817d6fd98:
/home/thiago/obj/qt/qt-4.8-release/lib/libQtCore.so.4.8.0 [0xaad2da54] 
0x0000003816000000-0x0000003816502e30:
/home/thiago/obj/qt/qt-4.8-release/lib/libQtXmlPatterns.so.4.8.0 [0xe849dcfd] 
0x0000003831800000-0x0000003831e75900:
/home/thiago/obj/qt/qt-4.8-release/lib/libQtSvg.so.4.8.0 [0x8f513e75] 
0x000000381ae00000-0x000000381b058d68:
/home/thiago/obj/qt/qt-4.8-release/lib/libQtDBus.so.4.8.0 [0x73fc0f52] 
0x0000003817200000-0x0000003817489eb0:
/home/thiago/obj/qt/qt-4.8-release/lib/libQtOpenGL.so.4.8.0 [0x170b3bfa] 
0x0000003830000000-0x00000038303098a0:
/home/thiago/obj/qt/qt-4.8-release/lib/libQtXml.so.4.8.0 [0xc9f92297] 
0x0000003817600000-0x0000003817844f28:

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120724/3cbc9acb/attachment.sig>


More information about the Development mailing list