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

Using --opt_level=4 with inconsistent --near_data can cause relocation overflow error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • Code Generation Tools
    • CODEGEN-6135
    • Hide
      MSP430_18.1.0.LTS
       MSP430_18.12.0.LTS
      Show
      MSP430_18.1.0.LTS  MSP430_18.12.0.LTS
    • Hide
      MSP430_19.6.0.STS
       MSP430_18.1.6.LTS
      Show
      MSP430_19.6.0.STS  MSP430_18.1.6.LTS
    • Make sure that all files are compiled with --near_data=none when making a global variable that must use large data pointers, or else use -O3 instead of -O4.
    • Hide
      This test case has a large global array, which requires --near_data=none, and indeed the files that reference it have that option. However, another file (mpu_init.c) was compiled with --near_data=globals. Due to a bug in the compiler, all the --near_data options are merged at -O4 into a single --near_data that applies to all the recompiled files, and the merged value is "globals."

      With --near_data=globals, short pointers are used for the large global array, which can't work and causes a relocation-overflow error. The solution to the compiler bug is to stick with the original --near_data for each file. The workaround for this case is to make sure all files are compiled with --near_data=none, or else to use -O3 instead of -O4.
      Show
      This test case has a large global array, which requires --near_data=none, and indeed the files that reference it have that option. However, another file (mpu_init.c) was compiled with --near_data=globals. Due to a bug in the compiler, all the --near_data options are merged at -O4 into a single --near_data that applies to all the recompiled files, and the merged value is "globals." With --near_data=globals, short pointers are used for the large global array, which can't work and causes a relocation-overflow error. The solution to the compiler bug is to stick with the original --near_data for each file. The workaround for this case is to make sure all files are compiled with --near_data=none, or else to use -O3 instead of -O4.

      Using --opt_level=4 with inconsistent --near_data can cause relocation overflow error

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

              Created:
              Updated:
              Resolved: