-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Code Generation Tools
-
CODEGEN-15762
-
-
-
-
default
-
If the linker encounters two instances of same-name static variable that are in the same input section such that the linker collection generated for first instance has same name as second, then the linker may emit below error:
../../master/ELFLNK/collect.c:772:internal fatal error #10478: expected found collection '.TI.bound:array' to be empty
NOTE: below can also happen on lfu builds for the C28 compiler.
Details on how to reproduce:
// main.c
extern void foo1();
extern void foo2();
int main(){
foo1();
foo2();
return 0;
}
// test1.c
__attribute__((location(0x0160))) static int array[16];
void foo1()
{
volatile int x = array[10];
}
// test2.c
__attribute__((location(0x0120))) static int array[16];
void foo2()
{
volatile int y = array[2];
}
Compile and link to get the linker error:
cl2000 test2.c test1.c main.c --abi=eabi --cla_support=cla2 -pden -z -llnk.cmd
Above link will generate below error:
../../master/ELFLNK/collect.c:772:internal fatal error #10478: expected found collection '.TI.bound:array' to be empty