[lld] r305452 - [ELF] Mark symbols referenced from linker script as live

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 15 11:20:58 PDT 2017


This is still missing the change I requested:

 Instead of checking that a particular error is not printed, check that
 the produced file has the expected content.

Please fix.

Cheers,
Rafael

> ==============================================================================
> --- lld/trunk/test/ELF/linkerscript/data-commands-gc.s (added)
> +++ lld/trunk/test/ELF/linkerscript/data-commands-gc.s Thu Jun 15 00:34:31 2017
> @@ -0,0 +1,16 @@
> +# REQUIRES: x86
> +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
> +# RUN: echo "SECTIONS { .text : { *(.text*) QUAD(bar) } }" > %t.script
> +# RUN: ld.lld --gc-sections -o %t %t.o --script %t.script | FileCheck -allow-empty %s
> +
> +# CHECK-NOT: unable to evaluate expression: input section .rodata.bar has no output section assigned
> +
> +.section .rodata.bar
> +.quad 0x1122334455667788
> +.global bar
> +bar:
> +
> +.section .text
> +.global _start
> +_start:
> +  nop
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list