[EXT_EP-11837] Linker option --scan_libraries mistakenly complains about duplicate symbols when a library is supplied multiple times Created: 22/Jul/24 Updated: 19/Nov/24 Resolved: 19/Nov/24 |
|
Status: | Fixed |
Project: | Embedded Software & Tools |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Medium |
Reporter: | TI User | Assignee: | TI User |
Resolution: | Fixed | Votes: | 0 |
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Product: | Code Generation Tools |
Internal ID: | CODEGEN-12684 |
Forum URL: | https://e2e.ti.com/e2eprivate/bosch/bosch---ti-automotive-processors/f/1208/t/1388600 |
Found In Release: | ARMCLANG_4.0.0.LTS ARMCLANG_3.2.0.LTS |
Fix In Release: | ARMCLANG_3.2.3.LTS* ARMCLANG_4.0.2.LTS* |
Affected Platform/Device: | default |
Description |
This test case puts a simple function in a library, and calls it. Then it links it with a command that uses the library two times, and --scan_libraries. C:\examples>type inlib.c void inlib() {} C:\examples>tiarmclang -c inlib.c C:\examples>tiarmar -r t.lib inlib.o tiarmar.exe: warning: creating t.lib C:\examples>type main.c void inlib(); int main() { inlib(); return 0; } C:\examples>tiarmclang -c main.c C:\examples>tiarmclang -o test.out main.o t.lib t.lib -Wl,-c,--scan_libraries warning: Symbol "TI_memcpy_small" (pulled from "C:\ti\compilers\ti-cgt-armllvm_3.2.2.LTS\lib\armv7em-ti-none-eabihf/c/libc. a<memcpy_t2.S.obj>") defined in 2 places: C:\ti\compilers\ti-cgt-armllvm_3.2.2.LTS\lib\armv7em-ti-none-eabihf/c/libc.a <memcpy_t2.S.obj> C:\ti\compilers\ti-cgt-armllvm_3.2.2.LTS\lib\armv7em-ti-none-eabihf/c/libsys bm.a<memcpy_t2.S.obj> warning: Symbol "TI_memset_small" (pulled from "C:\ti\compilers\ti-cgt-armllvm_3.2.2.LTS\lib\armv7em-ti-none-eabihf/c/libc. a<memset_t2.S.obj>") defined in 2 places: C:\ti\compilers\ti-cgt-armllvm_3.2.2.LTS\lib\armv7em-ti-none-eabihf/c/libc.a <memset_t2.S.obj> C:\ti\compilers\ti-cgt-armllvm_3.2.2.LTS\lib\armv7em-ti-none-eabihf/c/libsys bm.a<memset_t2.S.obj> <Many similar warnings deleted> warning: Symbol "inlib" (pulled from "t.lib<inlib.o>") defined in 2 places: t.lib<inlib.o> t.lib<inlib.o> Notice the diagnostic about the symbol inlib. It should not be emitted, because it comes from the same library. Notice the diagnostics about symbols from the compiler RTS libraries. They should not be emitted, because the user cannot control that symbol duplication. |