mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
The previous logic was to first try without relocations at all and failing that stop on the first defined symbol. That was inefficient and incorrect in the case part of the expression could be simplified and another part could not (see included test). We now stop the evaluation when we get to a variable whose value can change (i.e. is weak). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233187 91177308-0d34-0410-b5e6-96231b3b80d8
13 lines
280 B
ArmAsm
13 lines
280 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)
|