http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55309



--- Comment #32 from Kostya Serebryany <kcc at gcc dot gnu.org> 2013-02-12 
06:47:56 UTC ---

Good news, 0x7fff8000 seems great: 



t0: orig

t1: short offset (0x7fff8000)

t2: zero offset + pie



                  t0       t1     t1/t0   t2    t2/t0  t2/t1

-----------------------------------------------------------

 400.perlbench, 1206.00, 1151.00, 0.95, 1192.00, 0.99, 1.04

     401.bzip2,  884.00,  842.00, 0.95,  821.00, 0.93, 0.98

       403.gcc,  738.00,  722.00, 0.98,  716.00, 0.97, 0.99

       429.mcf,  609.00,  596.00, 0.98,  586.00, 0.96, 0.98

     445.gobmk,  844.00,  804.00, 0.95,  809.00, 0.96, 1.01

     456.hmmer, 1304.00, 1223.00, 0.94, 1235.00, 0.95, 1.01

     458.sjeng,  916.00,  868.00, 0.95,  897.00, 0.98, 1.03

462.libquantum,  547.00,  535.00, 0.98,  534.00, 0.98, 1.00

   464.h264ref, 1328.00, 1313.00, 0.99, 1265.00, 0.95, 0.96

   471.omnetpp,  628.00,  601.00, 0.96,  596.00, 0.95, 0.99

     473.astar,  665.00,  646.00, 0.97,  657.00, 0.99, 1.02

 483.xalancbmk,  480.00,  449.00, 0.94,  445.00, 0.93, 0.99

      433.milc,  709.00,  655.00, 0.92,  656.00, 0.93, 1.00

      444.namd,  636.00,  594.00, 0.93,  593.00, 0.93, 1.00

    447.dealII,  649.00,  615.00, 0.95,  637.00, 0.98, 1.04

    450.soplex,  390.00,  374.00, 0.96,  370.00, 0.95, 0.99

    453.povray,  452.00,  402.00, 0.89,  421.00, 0.93, 1.05

       470.lbm,  389.00,  378.00, 0.97,  387.00, 0.99, 1.02

   482.sphinx3,  980.00,  930.00, 0.95,  926.00, 0.94, 1.00



So, 0x7fff8000 seems to be a win, even compared to pie+zerobase. 

We'll do some more testing a flip the switch in clang. 



There is another suggestion (from dvyukov) to use -Wl,-Ttext-segment=0x40000000

together with zerobase (pie is not required) which is worth investigating.

Reply via email to