<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body smarttemplateinserted="true">
    <div id="smartTemplate4-template">Hallo,<br>
    </div>
    <div><br>
    </div>
    <div>I tried to use the LLVM Link-Time-Optimization, -Clflto<br>
    </div>
    <div><br>
    </div>
    <div>I compiled/installed fpc llvm with a separate prefix, which was
      already difficult to set up</div>
    <div><br>
    </div>
    <div>Then the default linker did not want to link it.<br>
    </div>
    <div><br>
    </div>
    <div>The wiki says to use the gold linker. I do not know how to
      change the linker in fpc.cfg. If I use -XP, it changes the prefix.
      But the gold linker is named ld.gold, so one would need an option
      to change the suffix.<br>
    </div>
    <div><br>
    </div>
    <div>But I called it directly with ld.gold -T link43117.res. <br>
    </div>
    <div><br>
    </div>
    <div>It says <br>
    </div>
    <div><br>
    </div>
    <div>><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">ld.gold:
          error: link43117.res:372:8: syntax error, unexpected STRING</span><br>
        <br>
      </span></div>
    <div><br>
    </div>
    <div>I deleted the last line INSERT AFTER .data;. Then it says</div>
    <div><br>
    </div>
    <div>><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">ld.gold:
          internal error in read_script_file, at
          ../../gold/script.cc:1638</span><br>
        <br>
      </span></div>
    <div><span style="font-family:monospace"><br>
      </span></div>
    <div>around here:
<a class="moz-txt-link-freetext" href="https://sourceware.org/git/?p=binutils-gdb.git;a=blame;f=gold/script.cc;h=d30a4d73991f083f3a1459db06ded4234959fe91;hb=HEAD#l1638">https://sourceware.org/git/?p=binutils-gdb.git;a=blame;f=gold/script.cc;h=d30a4d73991f083f3a1459db06ded4234959fe91;hb=HEAD#l1638</a><br>
    </div>
    <div><br>
    </div>
    <div><br>
    </div>
    <div>So I gave up on that and tried the llvm linker. <span
        style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">ld.lld -T
          link43117.res</span><br>
        <br>
        <br>
      </span></div>
    <div>It links, but when I start the program, it gives</div>
    <div><br>
    </div>
    <div><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">Starting
          program: </span><span
          style="color:#18b218;background-color:#ffffff;">/home/benito/tmp/a.out</span><span
          style="color:#000000;background-color:#ffffff;">  </span><br>
        <br>
        Program received signal SIGSEGV, Segmentation fault.
        <br>
        <span style="color:#1818b2;background-color:#ffffff;">0x0000000000000000</span><span
          style="color:#000000;background-color:#ffffff;"> in </span><span
          style="color:#b26818;background-color:#ffffff;">??</span><span
          style="color:#000000;background-color:#ffffff;"> ()
        </span><br>
        (gdb) bt
        <br>
        #0  <span style="color:#1818b2;background-color:#ffffff;">0x0000000000000000</span><span
          style="color:#000000;background-color:#ffffff;"> in </span><span
          style="color:#b26818;background-color:#ffffff;">??</span><span
          style="color:#000000;background-color:#ffffff;"> ()
        </span><br>
        #1  <span style="color:#1818b2;background-color:#ffffff;">0x0000000000000000</span><span
          style="color:#000000;background-color:#ffffff;"> in </span><span
          style="color:#b26818;background-color:#ffffff;">??</span><span
          style="color:#000000;background-color:#ffffff;"> ()</span><br>
        <br>
        <br>
      </span></div>
    <div><br>
    </div>
    <div><br>
      Viele Grüße,<br>
      <p>Benito </p>
    </div>
    <p><br>
    </p>
  </body>
</html>