56 lines · plain
1# REQUIRES: x862# RUN: rm -rf %t; split-file %s %t3## Verify that we preserve alignment when merging sections.4# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin -o %t/foo.o5# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin -o %t/bar.o6# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin -o %t/baz.o7# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin -o %t/qux.o8# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t/main.o9# RUN: %lld -o %t/output %t/foo.o %t/bar.o %t/baz.o %t/qux.o %t/main.o10 11# RUN: llvm-objdump --syms --section=__data --full-contents %t/output | FileCheck %s12# CHECK: SYMBOL TABLE:13# CHECK-DAG: [[#%x, ADDR:]] g O __DATA,__data _foo14# CHECK-DAG: {{0*}}[[#ADDR+0x4]] g O __DATA,__data _bar15# CHECK-DAG: {{0*}}[[#ADDR+0x8]] g O __DATA,__data _baz16# CHECK-DAG: {{0*}}[[#ADDR+0x9]] g O __DATA,__data _qux17 18# CHECK: Contents of section __DATA,__data:19# CHECK-NEXT: {{0*}}[[#ADDR]] ca000000 fe000000 baefbead de00000020 21#--- foo.s22.globl _foo23.data24.p2align 025_foo:26 .byte 0xca27 28#--- bar.s29.globl _bar30.data31.p2align 232_bar:33 .byte 0xfe34 35#--- baz.s36.globl _baz37.data38.p2align 339_baz:40 .byte 0xba41 42#--- qux.s43.globl _qux44.data45.p2align 046_qux:47 .quad 0xdeadbeef48 49#--- main.s50.section __TEXT,__text51.globl _main52 53_main:54 mov $0, %rax55 ret56