diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-02-09 19:29:35 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2017-02-09 19:29:35 +0000 |
commit | 111cd669e90e5b2132187d36f8b141b11a671a8b (patch) | |
tree | c11634cdf8d5782173e9a22fe08146098febfd94 /llvm/test | |
parent | 2f1f1616ae47f32d66e6cf7238516db65ce6d8cc (diff) | |
download | bcm5719-llvm-111cd669e90e5b2132187d36f8b141b11a671a8b.tar.gz bcm5719-llvm-111cd669e90e5b2132187d36f8b141b11a671a8b.zip |
Object: pad out BSD archive members to 8-bytes
ld64 requires its archive members to be 8-byte aligned for 64-bit
content and 4-byte aligned for 32-bit content. Opt for the larger
alignment requirement. This ensures that ld64 can consume archives
generated by llvm-ar.
Thanks to Kevin Enderby for the hint about the ld64/cctools behaviours!
Resolves PR28361!
llvm-svn: 294615
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/Object/archive-format.test | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/test/Object/archive-format.test b/llvm/test/Object/archive-format.test index b9562a36d67..7505b1ffd5b 100644 --- a/llvm/test/Object/archive-format.test +++ b/llvm/test/Object/archive-format.test @@ -32,10 +32,12 @@ RUN: llvm-ar --format=bsd rc %t.a 0123456789abcde 0123456789abcdef RUN: cat %t.a | FileCheck -strict-whitespace --check-prefix=BSD %s BSD: !<arch> -BSD-NEXT: #1/20 0 0 0 644 24 ` -BSD-NEXT: 0123456789abcde{{.....}}bar. -BSD-SAME: #1/16 0 0 0 644 20 ` -BSD-NEXT: 0123456789abcdefzed. +BSD-NEXT: #1/20 0 0 0 644 28 ` +Each [[:space:]] matches a newline. We explicitly match 3 newlines, as the +fourth newline is implicitly consumed by FileCheck and cannot be matched. +BSD-NEXT: 0123456789abcde{{.....}}bar.{{[[:space:]][[:space:]][[:space:]]}} +BSD-NEXT: #1/20 0 0 0 644 28 ` +BSD-NEXT: 0123456789abcdef{{....}}zed. RUN: rm -f test.a RUN: llvm-ar --format=gnu rcT test.a 0123456789abcde 0123456789abcdef |