2016-09-29 09:20:40 +08:00
|
|
|
# REQUIRES: x86
|
|
|
|
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=i386-unknown-linux %s -o %t.o
|
|
|
|
# RUN: ld.lld %t.o -o %t --gc-sections
|
2019-05-01 13:49:01 +08:00
|
|
|
# RUN: llvm-readobj -S %t | FileCheck %s
|
2016-09-29 09:20:40 +08:00
|
|
|
# RUN: llvm-objdump -d %t | FileCheck --check-prefix=DISASM %s
|
|
|
|
|
|
|
|
# CHECK: Name: .foo
|
|
|
|
# CHECK-NEXT: Type: SHT_PROGBITS
|
|
|
|
# CHECK-NEXT: Flags [
|
|
|
|
# CHECK-NEXT: SHF_ALLOC
|
|
|
|
# CHECK-NEXT: SHF_MERGE
|
|
|
|
# CHECK-NEXT: SHF_STRINGS
|
|
|
|
# CHECK-NEXT: ]
|
Align AArch64 and i386 image base to superpage
Summary:
As for x86_64, the default image base for AArch64 and i386 should be
aligned to a superpage appropriate for the architecture.
On AArch64, this is 2 MiB, on i386 it is 4 MiB.
Reviewers: emaste, grimar, javed.absar, espindola, ruiu, peter.smith, srhines, rprichard
Reviewed By: ruiu, peter.smith
Subscribers: jfb, markj, arichardson, krytarowski, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D50297
llvm-svn: 342746
2018-09-22 00:58:13 +08:00
|
|
|
# CHECK-NEXT: Address: 0x4000B4
|
2016-09-29 09:20:40 +08:00
|
|
|
|
Align AArch64 and i386 image base to superpage
Summary:
As for x86_64, the default image base for AArch64 and i386 should be
aligned to a superpage appropriate for the architecture.
On AArch64, this is 2 MiB, on i386 it is 4 MiB.
Reviewers: emaste, grimar, javed.absar, espindola, ruiu, peter.smith, srhines, rprichard
Reviewed By: ruiu, peter.smith
Subscribers: jfb, markj, arichardson, krytarowski, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D50297
llvm-svn: 342746
2018-09-22 00:58:13 +08:00
|
|
|
# 0x4000B4 == 4194484
|
|
|
|
# DISASM: leal 4194484, %eax
|
2016-09-29 09:20:40 +08:00
|
|
|
|
|
|
|
.section .foo,"aMS",@progbits,1
|
|
|
|
.byte 0
|
|
|
|
|
|
|
|
.text
|
|
|
|
.global _start
|
|
|
|
_start:
|
|
|
|
leal .foo, %eax
|