diff options
author | Jim Grosbach <grosbach@apple.com> | 2012-10-04 21:33:24 +0000 |
---|---|---|
committer | Jim Grosbach <grosbach@apple.com> | 2012-10-04 21:33:24 +0000 |
commit | 837c28a84076e1cd63bbf29057b791ebe6b03de0 (patch) | |
tree | 372856dea1ad4db093d739d08cbdb63fde273360 /test/CodeGen | |
parent | a36091abcfdd2d41b589bab7b82abafe991f104d (diff) | |
download | external_llvm-837c28a84076e1cd63bbf29057b791ebe6b03de0.zip external_llvm-837c28a84076e1cd63bbf29057b791ebe6b03de0.tar.gz external_llvm-837c28a84076e1cd63bbf29057b791ebe6b03de0.tar.bz2 |
ARM: locate user-defined text sections next to default text.
Make sure functions located in user specified text sections (via the
section attribute) are located together with the default text sections.
Otherwise, for large object files, the relocations for call instructions
are more likely to be out of range. This becomes even more likely in the
presence of LTO.
rdar://12402636
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165254 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/ARM/darwin-section-order.ll | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/darwin-section-order.ll b/test/CodeGen/ARM/darwin-section-order.ll new file mode 100644 index 0000000..701028c --- /dev/null +++ b/test/CodeGen/ARM/darwin-section-order.ll @@ -0,0 +1,21 @@ +; RUN: llc < %s -mtriple=armv7-apple-darwin | FileCheck %s + +; CHECK: .section __TEXT,__text,regular,pure_instructions +; CHECK: .section __TEXT,myprecious +; CHECK: .section __TEXT,__textcoal_nt,coalesced,pure_instructions +; CHECK: .section __TEXT,__const_coal,coalesced +; CHECK: .section __TEXT,__picsymbolstub4,symbol_stubs,none,16 +; CHECK: .section __TEXT,__StaticInit,regular,pure_instructions + + +define void @normal() nounwind readnone { +; CHECK: .section __TEXT,__text,regular,pure_instructions +; CHECK: _normal: + ret void +} + +define void @special() nounwind readnone section "__TEXT,myprecious" { +; CHECK: .section __TEXT,myprecious +; CHECK: _special: + ret void +} |