-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Medium
-
Code Generation Tools
-
CODEGEN-8786
-
C6000_8.3.9
-
default
The following commands show a simple C++ program, builds it twice with different ways of using --retain, then shows one way to compare the result.
C:\working_directory>type a.cpp
int main()
{
return 0;
}
C:\working_directory>cl6x a.cpp -mv6600 -O3 -z --map_file=fails.map -l=rts6600_elf.lib --unused_section_elimination=on --retain="rts6600_elf.lib<strcmp.c.obj>(.text)"
<Linking>
C:\working_directory>cl6x a.cpp -mv6600 -O3 -z --map_file=works.map -l=rts6600_elf.lib --unused_section_elimination=on --retain="*.lib<strcmp.c.obj>(.text)"
<Linking>
C:\working_directory>findstr strcmp fails.map works.map
works.map: 00008560 00000060 : strcmp.c.obj (.text:strcmp)
works.map: strcmp.c.obj 96 0 0
works.map:00008560 strcmp
works.map:00008560 strcmp
The first build completely spells out the library name rts6600_elf.lib, and names the map file fails.map. The second build uses *.lib instead, and names the map file works.map. The last command shows that fails.map does not have strcmp, but works.map does.