[lld] r276398 - [ELF] Support PROVIDE and PROVIDE_HIDDEN inside SECTIONS

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 08:02:33 PDT 2016


> +# Provide existing symbol. The value should be 0, even though we
> +# have value of 1 in PROVIDE()
> +# RUN: echo "SECTIONS { PROVIDE(somesym = 1);}" > %t.script
> +# RUN: ld.lld -o %t1 --script %t.script %t
> +# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=PROVIDE2 %s
> +# PROVIDE2: 0000000000000000         *ABS*    00000000 somesym
> +
> +# Provide existing symbol. The value should be 0, even though we
> +# have value of 1 in PROVIDE(). Visibility should not change
> +# RUN: echo "SECTIONS { PROVIDE(somesym = 1);}" > %t.script
> +# RUN: ld.lld -o %t1 --script %t.script %t
> +# RUN: llvm-objdump -t %t1 | FileCheck --check-prefix=HIDDEN2 %s
> +# HIDDEN2: 0000000000000000         *ABS*    00000000 somesym

Was the intention to use PROVIDE_HIDDEN in the last test?

Cheers,
Rafael


More information about the llvm-commits mailing list