diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /meson/test cases/unit/87 prelinking | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
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(); |