diff options
Diffstat (limited to 'meson/test cases/unit/87 prelinking')
-rw-r--r-- | meson/test cases/unit/87 prelinking/file1.c | 14 | ||||
-rw-r--r-- | meson/test cases/unit/87 prelinking/file2.c | 9 | ||||
-rw-r--r-- | meson/test cases/unit/87 prelinking/file3.c | 9 | ||||
-rw-r--r-- | meson/test cases/unit/87 prelinking/file4.c | 9 | ||||
-rw-r--r-- | meson/test cases/unit/87 prelinking/main.c | 10 | ||||
-rw-r--r-- | meson/test cases/unit/87 prelinking/meson.build | 8 | ||||
-rw-r--r-- | meson/test cases/unit/87 prelinking/private_header.h | 11 | ||||
-rw-r--r-- | meson/test cases/unit/87 prelinking/public_header.h | 3 |
8 files changed, 73 insertions, 0 deletions
diff --git a/meson/test cases/unit/87 prelinking/file1.c b/meson/test cases/unit/87 prelinking/file1.c new file mode 100644 index 000000000..9f0e26523 --- /dev/null +++ b/meson/test cases/unit/87 prelinking/file1.c @@ -0,0 +1,14 @@ +#include<public_header.h> +#include<private_header.h> + +int public_func() { + return round1_a(); +} + +int round1_a() { + return round1_b(); +} + +int round2_a() { + return round2_b(); +} diff --git a/meson/test cases/unit/87 prelinking/file2.c b/meson/test cases/unit/87 prelinking/file2.c new file mode 100644 index 000000000..ce3b11550 --- /dev/null +++ b/meson/test cases/unit/87 prelinking/file2.c @@ -0,0 +1,9 @@ +#include<private_header.h> + +int round1_b() { + return round1_c(); +} + +int round2_b() { + return round2_c(); +} diff --git a/meson/test cases/unit/87 prelinking/file3.c b/meson/test cases/unit/87 prelinking/file3.c new file mode 100644 index 000000000..85052beb4 --- /dev/null +++ b/meson/test cases/unit/87 prelinking/file3.c @@ -0,0 +1,9 @@ +#include<private_header.h> + +int round1_c() { + return round1_d(); +} + +int round2_c() { + return round2_d(); +} diff --git a/meson/test cases/unit/87 prelinking/file4.c b/meson/test cases/unit/87 prelinking/file4.c new file mode 100644 index 000000000..622364e78 --- /dev/null +++ b/meson/test cases/unit/87 prelinking/file4.c @@ -0,0 +1,9 @@ +#include<private_header.h> + +int round1_d() { + return round2_a(); +} + +int round2_d() { + return 42; +} diff --git a/meson/test cases/unit/87 prelinking/main.c b/meson/test cases/unit/87 prelinking/main.c new file mode 100644 index 000000000..09a2e5c3d --- /dev/null +++ b/meson/test cases/unit/87 prelinking/main.c @@ -0,0 +1,10 @@ +#include<public_header.h> +#include<stdio.h> + +int main(int argc, char **argv) { + if(public_func() != 42) { + printf("Something failed.\n"); + return 1; + } + return 0; +} diff --git a/meson/test cases/unit/87 prelinking/meson.build b/meson/test cases/unit/87 prelinking/meson.build new file mode 100644 index 000000000..3dbf88e5f --- /dev/null +++ b/meson/test cases/unit/87 prelinking/meson.build @@ -0,0 +1,8 @@ +project('prelinking', 'c') + +liba = static_library('prelinked', 'file1.c', 'file2.c', 'file3.c', 'file4.c', + prelink: true) +exe = executable('testprog', 'main.c', + link_with: liba) +test('prelinked', exe) +
\ No newline at end of file diff --git a/meson/test cases/unit/87 prelinking/private_header.h b/meson/test cases/unit/87 prelinking/private_header.h new file mode 100644 index 000000000..f24b621a0 --- /dev/null +++ b/meson/test cases/unit/87 prelinking/private_header.h @@ -0,0 +1,11 @@ +#pragma once + +int round1_a(); +int round1_b(); +int round1_c(); +int round1_d(); + +int round2_a(); +int round2_b(); +int round2_c(); +int round2_d(); diff --git a/meson/test cases/unit/87 prelinking/public_header.h b/meson/test cases/unit/87 prelinking/public_header.h new file mode 100644 index 000000000..0cd67862a --- /dev/null +++ b/meson/test cases/unit/87 prelinking/public_header.h @@ -0,0 +1,3 @@ +#pragma once + +int public_func(); |