[PATCH] D30964: [ELF] Restore GC handling of LINK_ORDER, C-named sections
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 16 07:03:53 PDT 2017
> Index: test/ELF/gc-sections-metadata-startstop.s
> ===================================================================
> --- /dev/null
> +++ test/ELF/gc-sections-metadata-startstop.s
> @@ -0,0 +1,28 @@
> +# LINK_ORDER cnamed sections are not kept alive by the __start_* reference.
> +# REQUIRES: x86
> +
> +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
> +# RUN: ld.lld --gc-sections %t.o -o %t
> +# RUN: llvm-objdump -section-headers %t | FileCheck %s
> +
> +# CHECK-NOT: yy
> +# CHECK: xx
> +# CHECK-NOT: yy
> +
> +.weak __start_xx
> +.weak __start_yy
> +
> +.global _start
> +_start:
> +.quad __start_xx
> +.quad __start_yy
Please also test what value gets written for __start_yy.
LGTM with that.
Cheers,
Rafael
More information about the llvm-commits
mailing list