-
Bug
-
Resolution: Fixed
-
Medium
-
Code Generation Tools
-
CODEGEN-11329
-
-
-
default
-
None
When using the lfu feature (--lfu_reference_elf=ref.out) with an application that has the same global-static variable name in multiple object files, and all are marked as preserved (either explicitly or as default preserve setting when not using --lfu_default=none), may result in either of below linker errors:
error #10099-D: program will not fit into available memory, or the
section contains a call site that requires a trampoline that can't
be generated for this section. placement with alignment/blocking
fails for section:
".TI.bound:PMBusStack_commandTransactionMap" size 0x43 page 0,
overlaps with:
".TI.bound:PMBusStack_commandTransactionMap", size 0x40 (page 0)
or:
../../master/ELFLNK/collect.c:778:internal fatal error #10478:
(.TI.bound:PMBusStack_commandTransactionMap)
INTERNAL ERROR: lnk2000 had an internal inconsistency and aborted
The issue is due to lfu preserve behavior where preserved variables are placed in .TI.bound sections at the same address as in the reference executable provided using --lfu_reference_elf=ref.out. Multiple consecutive .TI.bound sections are combined to reduce the number of cinit records, however, the address retreival from ref.out has a bug where it obtains the same address for all instances of the same global-static variable with same name.