llvm-mos / llvm-mos-sdk

SDK for developing with the llvm-mos compiler

Home Page:https://www.llvm-mos.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

atari8-stdcard "--whole-archive linking" regression

cwedgwood opened this issue · comments

There is a regression trying to link with --whole-archive.

We get duplicate symbols:

$ mos-atari8-stdcart-clang -Wall -Werror -Os -DROMSIZE=8 -DBUILDTIME="\"$(date)\"" -Wl,--whole-archive test-cart.cc
ld.lld: error: duplicate symbol: __do_copy_zp_data
>>> defined at copy-zp-data.c
>>>            copy-zp-data.c.obj:(.init.200+0x0) in archive /store0/opt/llvm-mos/bin/../mos-platform/atari8-stdcart/lib/libcrt0.a
>>> defined at copy-zp-data.c
>>>            copy-zp-data.c.obj:(.init.200+0x0) in archive /store0/opt/llvm-mos/bin/../mos-platform/atari8-stdcart/lib/libcrt0.a

ld.lld: error: duplicate symbol: __copy_zp_data
>>> defined at copy-zp-data.c
>>>            copy-zp-data.c.obj:(__copy_zp_data) in archive /store0/opt/llvm-mos/bin/../mos-platform/atari8-stdcart/lib/libcrt0.a
>>> defined at copy-zp-data.c
>>>            copy-zp-data.c.obj:(.text+0x0) in archive /store0/opt/llvm-mos/bin/../mos-platform/atari8-stdcart/lib/libcrt0.a
mos-atari8-stdcart-clang: error: ld.lld command failed with exit code 1 (use -v to see invocation)