diff options
| author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-09-10 10:30:12 +0000 |
|---|---|---|
| committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2012-09-10 10:30:12 +0000 |
| commit | c9cde48f3a22572d292f6bbe47b52c2521244b59 (patch) | |
| tree | bce7f666c306778a1108f5ee6911a2601c7d9106 /clang/test/Driver/linux-ld.c | |
| parent | 6f66ed1329bfa215e24169add3f23a032e9aadfd (diff) | |
| download | bcm5719-llvm-c9cde48f3a22572d292f6bbe47b52c2521244b59.tar.gz bcm5719-llvm-c9cde48f3a22572d292f6bbe47b52c2521244b59.zip | |
Wrong crtbegin/crtend pair used for PIE on Android.
Android uses the same flavour of crt*.o for PIE and non-PIE executables, and a
different one for DSOs. GNU/Linux, on the other hand, uses one set of crt*.o
for non-PIE executables, and another for both PIE executables and DSOs.
llvm-svn: 163500
Diffstat (limited to 'clang/test/Driver/linux-ld.c')
| -rw-r--r-- | clang/test/Driver/linux-ld.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c index 003bc9f540f..fc7b55858c6 100644 --- a/clang/test/Driver/linux-ld.c +++ b/clang/test/Driver/linux-ld.c @@ -412,3 +412,20 @@ // CHECK-ANDROID-STATIC: "-lgcc" // CHECK-ANDROID-STATIC-NOT: "gcc_s" // CHECK-ANDROID-STATIC: "{{.*}}/crtend_android.o" +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target arm-linux-androideabi \ +// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ +// RUN: -pie \ +// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s +// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: -target arm-linux-android \ +// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ +// RUN: -pie \ +// RUN: | FileCheck --check-prefix=CHECK-ANDROID-PIE %s +// CHECK-ANDROID-PIE: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" +// CHECK-ANDROID-PIE: "{{.*}}/crtbegin_dynamic.o" +// CHECK-ANDROID-PIE: "-L[[SYSROOT]]/usr/lib" +// CHECK-ANDROID-PIE-NOT: "gcc_s" +// CHECK-ANDROID-PIE: "-lgcc" +// CHECK-ANDROID-PIE-NOT: "gcc_s" +// CHECK-ANDROID-PIE: "{{.*}}/crtend_android.o" |

