1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
* License, v. 2.0. If a copy of the MPL was not distributed with this
3
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
86
#pragma GCC visibility push(default)
90
#define DEF(w) static const char str_ ## w[] = #w;
94
const char *strings[] = {
95
#define DEF(w) str_ ## w,
101
/* Create a hole between two zones of relative relocations */
106
const char *strings2[] = {
118
fprintf(stderr, "%s\n", ret ? "FAIL" : "PASS");
122
/* On ARM, this creates a .tbss section before .init_array, which
123
* elfhack could then pick instead of .init_array.
124
* Also, when .tbss is big enough, elfhack may wrongfully consider
125
* following sections as part of the PT_TLS segment. */
126
__thread int foo[1024];
129
static int count = 0;
130
/* Only exit when both constructors have been called */
137
#define DEF_(a,i,w) \
138
if (a[i++] != str_ ## w) return;
139
#define DEF(w) DEF_(strings,i,w)
144
#define DEF(w) DEF_(strings2,j,w)
151
if (i != sizeof(strings)/sizeof(strings[0]) &&
152
j != sizeof(strings2)/sizeof(strings2[0]))
153
fprintf(stderr, "WARNING: Test doesn't cover the whole array\n");
157
#pragma GCC visibility pop