mold icon indicating copy to clipboard operation
mold copied to clipboard

[arm32] error: duplicate symbol

Open lancethepants opened this issue 3 years ago • 1 comments

While cross-compiling gcc for armv7 I get the following linking error.

mold: error: duplicate symbol: /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/sysroot/usr/lib/uclibc_nonshared.a(aeabi_unwind_cpp_pr1.o): /opt/tomatoware/arm-soft-mmc/lib/gcc/arm-tomatoware-linux-uclibcgnueabi/12.1.0/libgcc_eh.a(unwind-arm.o): __aeabi_unwind_cpp_pr0

The two libraries (libgcc_eh.a & uclibc_nonshared.a) come from the toolchain. I don't experience this issue with bfd, gold, or lld https://github.com/lancethepants/tomatoware is the project.

I've attached the two libraries if that's helpful at all.

https://github.com/rui314/mold/commit/52943009b7dce4a0ebb5943092d47e6e33625401 fixed all other issues I was experiencing.

libs.zip

lancethepants avatar Jun 20 '22 17:06 lancethepants

I have difficulty reproducing the issue as your project is huge. I wonder if you could reduce it to a smaller test case, like just cross-compiling gcc on a generic Ubuntu machine.

rui314 avatar Sep 01 '22 05:09 rui314