Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-11961

Code built with -flto causes linker to fail with segmentation fault

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: High High

      The tiarmclang 4.0.0.LTS linker will experience a segmentation fault and emit an internal error diagnostic when building some applications with link-time optimization enabled. The issue is believed to be triggered by the use of location attributes in the application's source code.

      The issue can be reproduced by building examples from the Simplelink SDK (e.g. ti154stack examples) with link-time optimization enabled.

      The emitted internal error diagnostic looks like this:

      INTERNAL ERROR: C:\ti\compilers\ti-cgt-armllvm_4.0.0.LTS\bin\tiarmlnk experienced a segmentation fault

      This is caused by a defect in the TI Linker.
      TI Customer Support may be able to suggest a workaround to avoid this.

      Upgrading to the newest version of the compiler may fix this problem.

      Contact TI on the E2E support forums at http://e2e.ti.com

      We need to see this ENTIRE error message and a complete, reproducible
      test case including ALL of the command-line options.
      Include all of the object files, libraries, and linker command files
      used to link the program.

      tiarmclang: error: tiarmlnk command failed with exit code 2 (use -v to see invocation)

      
      

      To avoid this issue, link-time optimization can be disabled by removing the -flto from the tiarmclang command line.

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: