diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-03-07 19:51:13 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-03-07 19:51:13 +0200 |
| commit | 040083cdb613096ed50463df2af3be005e97c152 (patch) | |
| tree | da5bfafda66b6911155457452fdca1377f089337 /test cases/linuxlike/3 linker script | |
| parent | 1a2b69d5c3bc511aa2cac732c19c5290ff8f90ce (diff) | |
| download | meson-040083cdb613096ed50463df2af3be005e97c152.tar.gz | |
Can define custom linker flags.
Diffstat (limited to 'test cases/linuxlike/3 linker script')
| -rw-r--r-- | test cases/linuxlike/3 linker script/bob.c | 9 | ||||
| -rw-r--r-- | test cases/linuxlike/3 linker script/bob.h | 6 | ||||
| -rw-r--r-- | test cases/linuxlike/3 linker script/bob.map | 6 | ||||
| -rw-r--r-- | test cases/linuxlike/3 linker script/meson.build | 7 | ||||
| -rw-r--r-- | test cases/linuxlike/3 linker script/prog.c | 5 |
5 files changed, 33 insertions, 0 deletions
diff --git a/test cases/linuxlike/3 linker script/bob.c b/test cases/linuxlike/3 linker script/bob.c new file mode 100644 index 000000000..7b3ed47cb --- /dev/null +++ b/test cases/linuxlike/3 linker script/bob.c @@ -0,0 +1,9 @@ +#include"bob.h" + +int hiddenFunction() { + return 42; +} + +int bobMcBob() { + return hiddenFunction(); +} diff --git a/test cases/linuxlike/3 linker script/bob.h b/test cases/linuxlike/3 linker script/bob.h new file mode 100644 index 000000000..b29331e79 --- /dev/null +++ b/test cases/linuxlike/3 linker script/bob.h @@ -0,0 +1,6 @@ +#ifndef BOB_H_ +#define BOB_H_ + +int bobMcBob(); + +#endif diff --git a/test cases/linuxlike/3 linker script/bob.map b/test cases/linuxlike/3 linker script/bob.map new file mode 100644 index 000000000..e07a78062 --- /dev/null +++ b/test cases/linuxlike/3 linker script/bob.map @@ -0,0 +1,6 @@ +V1_0_0 { + global: + "bobMcBob"; + local: + *; +}; diff --git a/test cases/linuxlike/3 linker script/meson.build b/test cases/linuxlike/3 linker script/meson.build new file mode 100644 index 000000000..8589eb32a --- /dev/null +++ b/test cases/linuxlike/3 linker script/meson.build @@ -0,0 +1,7 @@ +project('linker script', 'c') + +vflag = '-Wl,--version-script,@0@/bob.map'.format('/home/jpakkane/workspace/meson/test cases/linuxlike/3 linker script') + +l = shared_library('bob', 'bob.c', link_flags : vflag) +e = executable('prog', 'prog.c', link_with : l) +test('core', e) diff --git a/test cases/linuxlike/3 linker script/prog.c b/test cases/linuxlike/3 linker script/prog.c new file mode 100644 index 000000000..da9c67509 --- /dev/null +++ b/test cases/linuxlike/3 linker script/prog.c @@ -0,0 +1,5 @@ +#include"bob.h" + +int main(int argc, char **argv) { + return bobMcBob() != 42; +} |
