reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
# REQUIRES: x86
# RUN: echo ".section .text,\"ax\"; nop; .section .data,\"aw\"; nop;" \
# RUN:   | llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %t.o
# RUN: ld.lld -o %t.so --script %s %t.o
# RUN: llvm-objdump -section-headers %t.so | FileCheck %s

# CHECK:      1 .text         00000001 0000000000042000
# CHECK-NEXT: 2 .data         00000001 0000000000042400

## Test that address expressions changes the position in a memory region.

MEMORY {
  ram (wxa) : ORIGIN = 0x42000, LENGTH = 0x100000
}
SECTIONS {
  .text : { *(.text*) }
  data_addr = ALIGN(1024); 
  .data data_addr : { *(.data*) }
}