[PATCH] D43658: Make undefined symbol in DSO to pull out object files from archive files.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 17:08:30 PST 2018


Rui Ueyama via Phabricator <reviews at reviews.llvm.org> writes:
>
> Index: lld/test/ELF/shlib-undefined-archive.s
> ===================================================================
> --- /dev/null
> +++ lld/test/ELF/shlib-undefined-archive.s
> @@ -0,0 +1,18 @@
> +# REQUIRES: x86
> +
> +# Undefined symbols in a DSO should pull out object files from archives
> +# to resolve them.
> +
> +# RUN: echo '.globl foo' | llvm-mc -filetype=obj -triple=x86_64-linux-gnu -o %t1.o -
> +# RUN: ld.lld -shared -o %t.so %t1.o
> +
> +# RUN: llvm-mc -filetype=obj -triple=x86_64-linux-gnu -o %t2.o %s
> +# RUN: llvm-ar cru %t.a %t2.o
> +# RUN: ld.lld -o %t.exe %t.a %t.so

Please flip %t.a and %t.so so that this also works with ld.bfd and
ld.gold.

LGTM with that.

Cheers,
Rafael


More information about the llvm-commits mailing list