Many tests specify -Ttext, -Tdata, or --section-start without SECTIONS commands. When the specified address is lower than the image base, * In the default --ro-segment case, there will be a read-only PT_LOAD segment covering ELF header/program headers, which may cover no section (as many tests omit .rodata). This appears unusual and has non-ascending p_vaddr. * In the --no-rosegment case, an `error: output file too large` occurs. We will add a diagnostic (#140187) and possibly change layout. Add --image-base to make these tests less sensitive.
18 lines
470 B
ArmAsm
18 lines
470 B
ArmAsm
# REQUIRES: x86
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
|
|
|
|
# RUN: ld.lld -N --image-base=0x100 -Ttext 0x100 -o %t.out %t --oformat binary
|
|
# RUN: od -t x1 -v %t.out | FileCheck %s --check-prefix=BIN
|
|
|
|
# BIN: 0000000 90
|
|
# BIN-NEXT: 0000001
|
|
|
|
## The same but without OMAGIC.
|
|
# RUN: ld.lld --image-base=0x100 -Ttext 0x100 -o %t.out %t --oformat binary
|
|
# RUN: od -t x1 -v %t.out | FileCheck %s --check-prefix=BIN
|
|
|
|
.text
|
|
.globl _start
|
|
_start:
|
|
nop
|