1 /* large.c -- a test case for gold
3 Copyright 2009 Free Software Foundation, Inc.
4 Written by Ian Lance Taylor <iant@google.com>.
6 This file is part of gold.
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
21 MA 02110-1301, USA. */
25 /* Test large sections in gold. */
30 int v4
[0x10000] = { 1 };
31 const int v5
[0x10000] = { 2 };
36 main (int argc
__attribute__ ((unused
)), char** argv
__attribute ((unused
)))
40 assert (v3
[0] == 0 && v3
[0xffff] == 0);
41 assert (v4
[0] == 1 && v4
[0xffff] == 0);
42 assert (v5
[0] == 2 && v5
[0xffff] == 0);
46 /* The large symbols must follow the small ones. */
47 assert (&v1
< v3
&& &v1
< v4
&& &v1
< v5
);
48 assert (&v2
< v3
&& &v2
< v4
&& &v2
< v5
);
49 assert (&v6
< v3
&& &v6
< v4
&& &v6
< v5
);
50 assert (&v7
< v3
&& &v7
< v4
&& &v7
< v5
);
52 /* Large symbols should be BSS followed by read-only followed by