1# REQUIRES: x86 2# RUN: rm -rf %t && split-file %s %t && cd %t 3# RUN: llvm-mc -filetype=obj -triple=x86_64 a.s -o a.o 4 5# RUN: not ld.lld a.o -T a.lds 2>&1 | FileCheck %s --implicit-check-not=error: 6# CHECK: error: address (0x6014) of section '.text' does not converge 7 8# RUN: ld.lld a.o -T b.lds --noinhibit-exec 2>&1 | FileCheck %s --check-prefix=CHECK2 --implicit-check-not=warning: 9# CHECK2: warning: address (0x5014) of section '.text' does not converge 10# CHECK2: warning: assignment to symbol a does not converge 11 12#--- a.s 13.globl _start 14_start: .space 4 15.data; .byte 0 16 17#--- a.lds 18SECTIONS { 19 . = 0x1000; 20 .text ADDR(.data) + 0x1000 : { *(.text) } 21 .data : { *(.data) } 22} 23 24#--- b.lds 25SECTIONS { 26 . = 0x1000; 27 .text text : { *(.text) } 28 .data : { 29 *(.data) 30 x = ADDR(.text); 31 a = b; 32 b = c; 33 ## Absolute symbol; not converging 34 c = ABSOLUTE(ADDR(.text)); 35 } 36 text = ADDR(.data) + 0x1000; 37} 38