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

tiarmclang linker emits inadvertent but harmless warning when LTO is enabled

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • Code Generation Tools
    • CODEGEN-11043
    • Hide
      ARMCLANG_2.1.0.LTS
      ARMCLANG_3.1.0.STS
      Show
      ARMCLANG_2.1.0.LTS ARMCLANG_3.1.0.STS
    • Hide
      ARMCLANG_3.2.3.LTS*
      ARMCLANG_2.1.4.LTS*
      Show
      ARMCLANG_3.2.3.LTS* ARMCLANG_2.1.4.LTS*
    • default
    • As the warning is benign, you can safely suppress this warning diagnostic from the tiarmclang command line that invokes the linker using the option ā€œ-Xlinker --diag_suppress=10230-Dā€.

      When LTO is enabled during an application build using the tiarmclang compiler toolchain, the linker can potentially emit the following warning:

      warning #10230-D: Linking in section my_archive.a<my_file.o>(.myscn), which does not
          contain program data
      

      This issue is created internally in the linker when the ELF_SECTION representing .myscn is first created while LTO is enabled. The .myscn section from the original object file contains a section type of SHT_PROGBITS, but when the ELF_SECTION representation of .myscn is constructed during the load phase of the link, the SHT_PROGBITS section type information does not get represented in the ELF_SECTION for .myscn.

      Thus, the check for metadata in the .myscn (that also happens during the registration part of the load phase of the link) fails because its section type does not reflect the actual content of the section.

      Please note, however, that the SHT_PROGBITS section type is properly restored during the build phase of the link. So the fact that the warning is inadvertently emitted does not affect the success of the link.

      If LTO is not enabled, the issue is not encountered because the ELF_SECTION for .myscn is not created until after registration is completed.

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

              Created:
              Updated: