brintos

brintos / llvm-project-archived public Read only

0
0
Text · 919 B · 99e9eeb Raw
38 lines · plain
1# REQUIRES: x862# RUN: rm -rf %t && split-file %s %t && cd %t3# RUN: llvm-mc -filetype=obj -triple=x86_64 a.s -o a.o4 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 converge7 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 converge10# CHECK2: warning: assignment to symbol a does not converge11 12#--- a.s13.globl _start14_start: .space 415.data; .byte 016 17#--- a.lds18SECTIONS {19  . = 0x1000;20  .text ADDR(.data) + 0x1000 : { *(.text) }21  .data : { *(.data) }22}23 24#--- b.lds25SECTIONS {26  . = 0x1000;27  .text text : { *(.text) }28  .data : {29    *(.data)30    x = ADDR(.text);31    a = b;32    b = c;33    ## Absolute symbol; not converging34    c = ABSOLUTE(ADDR(.text));35  }36  text = ADDR(.data) + 0x1000;37}38