1 #!/usr/bin/ksh
2 #
3 # This file and its contents are supplied under the terms of the
4 # Common Development and Distribution License ("CDDL"), version 1.0.
5 # You may only use this file in accordance with the terms of version
6 # 1.0 of the CDDL.
7 #
8 # A full copy of the text of the CDDL should have accompanied this
9 # source. A copy of the CDDL is also available via the Internet at
10 # http://www.illumos.org/license/CDDL.
11 #
12
13 #
14 # Copyright 2018, Richard Lowe.
15 #
16
17 # Test that a simple use of linker-sets, tat is, automatically generated start
18 # and end symbols for sections can be generated and used.
19
20 if [[ -z $ELF_TESTS ]]; then
21 print -u2 "Don't know where the test data is rooted";
22 exit 1;
23 fi
24
25 tmpdir=/tmp/test.$$
26 mkdir $tmpdir
27 cd $tmpdir
28
29 cleanup() {
30 cd /
31 rm -fr $tmpdir
32 }
33
34 trap 'cleanup' EXIT
35
36 # We expect any alternate linker to be in LD_ALTEXEC for us already
37 gcc -o simple ${ELF_TESTS}/tests/linker-sets/simple-src.c -Wall -Wextra
|
1 #!/usr/bin/ksh
2 #
3 # This file and its contents are supplied under the terms of the
4 # Common Development and Distribution License ("CDDL"), version 1.0.
5 # You may only use this file in accordance with the terms of version
6 # 1.0 of the CDDL.
7 #
8 # A full copy of the text of the CDDL should have accompanied this
9 # source. A copy of the CDDL is also available via the Internet at
10 # http://www.illumos.org/license/CDDL.
11 #
12
13 #
14 # Copyright 2018, Richard Lowe.
15 #
16
17 # Test that a simple use of linker-sets, that is, automatically generated start
18 # and end symbols for sections can be generated and used.
19
20 if [[ -z $ELF_TESTS ]]; then
21 print -u2 "Don't know where the test data is rooted";
22 exit 1;
23 fi
24
25 tmpdir=/tmp/test.$$
26 mkdir $tmpdir
27 cd $tmpdir
28
29 cleanup() {
30 cd /
31 rm -fr $tmpdir
32 }
33
34 trap 'cleanup' EXIT
35
36 # We expect any alternate linker to be in LD_ALTEXEC for us already
37 gcc -o simple ${ELF_TESTS}/tests/linker-sets/simple-src.c -Wall -Wextra
|