llvm-6502/test/MC/X86/expand-var.s
Rafael Espindola 9d2f0da138 Fix PR23025.
There is something in link.exe that requires a relocation to use a
global symbol. Not doing so breaks the chrome build on windows.

This patch sets isWeak for that to work. To compensate,
we then need to look past those symbols when not creating relocations.

This patch includes an ELF test that matches GNU as behaviour.

I am still reducing the chrome build issue and will add a test
once that is done.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233318 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-26 21:11:00 +00:00

19 lines
340 B
ArmAsm

// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux < %s | llvm-readobj -r | FileCheck %s
// CHECK: Section (2) .rela.text {
// CHECK-NEXT: 0x0 R_X86_64_32 d 0x0
// CHECK-NEXT: }
a:
b = a
c = a
d = a
.weak d
.long d + (b - c)
a2:
.weak b2
b2 = a2
c2 = b2 - a2