Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / global-offset-table-position-redef-err.s
blob65d58c580e24e270ae30825b9eed7942ba2637cf
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 # RUN: not ld.lld -shared %t.o -o /dev/null 2>&1 | FileCheck %s
5 # On some targets the location of the _GLOBAL_OFFSET_TABLE_ symbol table can
6 # matter for the correctness of some relocations. Follow the example of ld.gold
7 # and give a multiple definition error if input objects attempt to redefine it.
9 # CHECK: ld.lld: error: {{.*o}} cannot redefine linker defined symbol '_GLOBAL_OFFSET_TABLE_'
11 .data
12 .global _GLOBAL_OFFSET_TABLE_
13 _GLOBAL_OFFSET_TABLE_:
14 .word 0