OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [gold/] [testsuite/] [Makefile.am] - Blame information for rev 303

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 27 khays
# Process this file with automake to generate Makefile.in
2
 
3
# As far as I can tell automake testing support assumes that the build
4
# system and the host system are the same.  So these tests will not
5
# work when building with a cross-compiler.
6
 
7
# Ignore warning about AM_PROG_CC_C_O due to large_CFLAGS
8
AUTOMAKE_OPTIONS = foreign -Wno-portability
9
 
10
# The two_file_test tests -fmerge-constants, so we simply always turn
11
# it on.  This may need to be controlled by a configure option
12
# eventually.
13
AM_CFLAGS = $(WARN_CFLAGS) $(LFS_CFLAGS) -fmerge-constants
14
AM_CXXFLAGS = $(WARN_CXXFLAGS) $(LFS_CFLAGS) -fmerge-constants
15
 
16
AM_CPPFLAGS = \
17
        -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../../include \
18
        -I$(srcdir)/../../elfcpp -I.. \
19
        -DLOCALEDIR="\"$(datadir)/locale\"" \
20
        @INCINTL@
21
 
22
TEST_READELF = $(top_builddir)/../binutils/readelf
23
TEST_OBJDUMP = $(top_builddir)/../binutils/objdump
24
TEST_CXXFILT = $(top_builddir)/../binutils/cxxfilt
25
TEST_STRIP = $(top_builddir)/../binutils/strip-new
26
TEST_AR = $(top_builddir)/../binutils/ar
27
TEST_NM = $(top_builddir)/../binutils/nm-new
28
TEST_AS = $(top_builddir)/../gas/as-new
29
 
30
if PLUGINS
31
LIBDL = -ldl
32
endif
33
 
34
if THREADS
35
THREADSLIB = -lpthread
36
endif
37
 
38
if OMP_SUPPORT
39
TLS_TEST_C_CFLAGS = -fopenmp
40
endif
41
 
42
# 'make clean' is good about deleting some intermediate files (such as
43
# .o's), but not all of them (such as .so's and .err files).  We
44
# improve on that here.  automake-1.9 info docs say "mostlyclean" is
45
# the right choice for files 'make' builds that people rebuild.
46
MOSTLYCLEANFILES = *.so *.syms *.stdout
47
 
48
 
49
# We will add to these later, for each individual test.  Note
50
# that we add each test under check_SCRIPTS or check_PROGRAMS;
51
# the TESTS variable is automatically populated from these.
52
check_SCRIPTS =
53
check_DATA =
54
check_PROGRAMS =
55
BUILT_SOURCES =
56
 
57
TESTS = $(check_SCRIPTS) $(check_PROGRAMS)
58
 
59
# ---------------------------------------------------------------------
60
# These tests test the internals of gold (unittests).
61
 
62
# Infrastucture needed for the unittests
63
check_LIBRARIES = libgoldtest.a
64
libgoldtest_a_SOURCES = test.cc testmain.cc testfile.cc
65
 
66
DEPENDENCIES = \
67
        libgoldtest.a ../libgold.a ../../libiberty/libiberty.a $(LIBINTL_DEP)
68
LDADD = libgoldtest.a ../libgold.a ../../libiberty/libiberty.a $(LIBINTL) \
69
        $(THREADSLIB) $(LIBDL)
70
 
71
 
72
# The unittests themselves
73
if NATIVE_OR_CROSS_LINKER
74
if GCC
75
 
76
# Infrastucture needed for the unittests: a directory where the linker
77
# is named 'ld'.  This is because the -B flag appends 'ld' to its arg.
78
gcctestdir/ld: ../ld-new
79
        test -d gcctestdir || mkdir -p gcctestdir
80
        rm -f gcctestdir/ld
81
        (cd gcctestdir && $(LN_S) ../../ld-new ld)
82
 
83 159 khays
# Some tests require the latest features of an in-tree assembler.
84
gcctestdir/as: $(TEST_AS)
85
        test -d gcctestdir || mkdir -p gcctestdir
86
        rm -f gcctestdir/as
87
        (cd gcctestdir && $(LN_S) $(abs_top_builddir)/../gas/as-new as)
88
 
89 27 khays
endif GCC
90
 
91
check_PROGRAMS += object_unittest
92
object_unittest_SOURCES = object_unittest.cc
93
 
94
check_PROGRAMS += binary_unittest
95
binary_unittest_SOURCES = binary_unittest.cc
96
 
97 166 khays
check_PROGRAMS += leb128_unittest
98
leb128_unittest_SOURCES = leb128_unittest.cc
99
 
100 27 khays
endif NATIVE_OR_CROSS_LINKER
101
 
102
# ---------------------------------------------------------------------
103
# These tests test the output of gold (end-to-end tests).  In
104
# particular, they make sure that gold can link "difficult" object
105
# files, and the resulting object files run correctly.  These can only
106
# run if we've built ld-new for the native architecture (that is,
107
# we're not cross-compiling it), since we run ld-new as part of these
108
# tests.  We use the gcc-specific flag '-B' to use our linker instead
109
# of the default linker, which is why we only run our tests under gcc.
110
 
111
if NATIVE_LINKER
112
if GCC
113
 
114
# Each of these .o's is a useful, small complete program.  They're
115
# particularly useful for making sure ld-new's flags do what they're
116
# supposed to (hence their names), but are used for many tests that
117
# don't actually involve analyzing input data.
118
flagstest_debug.o: constructor_test.cc
119
        $(CXXCOMPILE) -O0 -g -c -o $@ $<
120
flagstest_ndebug.o: constructor_test.cc
121
        $(CXXCOMPILE) -O0 -c -o $@ $<
122
 
123
check_SCRIPTS += incremental_test.sh
124
check_DATA += incremental_test.stdout
125
MOSTLYCLEANFILES += incremental_test
126
incremental_test_1.o: incremental_test_1.c
127
        $(COMPILE) -O0 -c -ffunction-sections -g -o $@ $<
128
incremental_test_2.o: incremental_test_2.c
129
        $(COMPILE) -O0 -c -ffunction-sections -g -o $@ $<
130
incremental_test: incremental_test_1.o incremental_test_2.o gcctestdir/ld
131
        $(LINK) -Bgcctestdir/ -Wl,--incremental-full incremental_test_1.o incremental_test_2.o -Wl,-debug 2> incremental_test.cmdline
132
incremental_test.stdout: incremental_test ../incremental-dump
133
        ../incremental-dump incremental_test > $@
134
 
135
check_SCRIPTS += gc_comdat_test.sh
136
check_DATA += gc_comdat_test.stdout
137
MOSTLYCLEANFILES += gc_comdat_test
138
gc_comdat_test_1.o: gc_comdat_test_1.cc
139
        $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $<
140
gc_comdat_test_2.o: gc_comdat_test_2.cc
141
        $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $<
142
gc_comdat_test: gc_comdat_test_1.o gc_comdat_test_2.o gcctestdir/ld
143
        $(CXXLINK) -Bgcctestdir/ -Wl,--gc-sections gc_comdat_test_1.o gc_comdat_test_2.o
144
gc_comdat_test.stdout: gc_comdat_test
145
        $(TEST_NM) -C gc_comdat_test > gc_comdat_test.stdout
146
 
147
check_SCRIPTS += gc_tls_test.sh
148
check_DATA += gc_tls_test.stdout
149
MOSTLYCLEANFILES += gc_tls_test
150
gc_tls_test.o: gc_tls_test.cc
151
        $(CXXCOMPILE) -O0 -c -g -o $@ $<
152
gc_tls_test:gc_tls_test.o gcctestdir/ld
153
        $(CXXLINK) -Bgcctestdir/ -Wl,--gc-sections gc_tls_test.o
154
gc_tls_test.stdout: gc_tls_test
155
        $(TEST_NM) -C gc_tls_test > gc_tls_test.stdout
156
 
157
check_SCRIPTS += gc_orphan_section_test.sh
158
check_DATA += gc_orphan_section_test.stdout
159
MOSTLYCLEANFILES += gc_orphan_section_test
160
gc_orphan_section_test.o: gc_orphan_section_test.cc
161
        $(CXXCOMPILE) -O0 -c -g -o $@ $<
162
gc_orphan_section_test:gc_orphan_section_test.o gcctestdir/ld
163
        $(CXXLINK) -Bgcctestdir/ -Wl,--gc-sections gc_orphan_section_test.o
164
gc_orphan_section_test.stdout: gc_orphan_section_test
165
        $(TEST_NM) gc_orphan_section_test > gc_orphan_section_test.stdout
166
 
167
check_SCRIPTS += icf_test.sh
168
check_DATA += icf_test.stdout
169
MOSTLYCLEANFILES += icf_test
170
icf_test.o: icf_test.cc
171
        $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $<
172
icf_test: icf_test.o gcctestdir/ld
173
        $(CXXLINK) -Bgcctestdir/ -Wl,--icf=all icf_test.o
174
icf_test.stdout: icf_test
175
        $(TEST_NM) -C icf_test > icf_test.stdout
176
 
177
check_SCRIPTS += icf_keep_unique_test.sh
178
check_DATA += icf_keep_unique_test.stdout
179
MOSTLYCLEANFILES += icf_keep_unique_test
180
icf_keep_unique_test.o: icf_keep_unique_test.cc
181
        $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $<
182
icf_keep_unique_test: icf_keep_unique_test.o gcctestdir/ld
183
        $(CXXLINK) -Bgcctestdir/ -Wl,--icf=all -Wl,--keep-unique,_Z11unique_funcv icf_keep_unique_test.o
184
icf_keep_unique_test.stdout: icf_keep_unique_test
185
        $(TEST_NM) -C icf_keep_unique_test > icf_keep_unique_test.stdout
186
 
187
check_SCRIPTS += icf_safe_test.sh
188
check_DATA += icf_safe_test_1.stdout icf_safe_test_2.stdout
189
MOSTLYCLEANFILES += icf_safe_test
190
icf_safe_test.o: icf_safe_test.cc
191
        $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $<
192
icf_safe_test: icf_safe_test.o gcctestdir/ld
193
        $(CXXLINK) -Bgcctestdir/ -Wl,--icf=safe icf_safe_test.o
194
icf_safe_test_1.stdout: icf_safe_test
195
        $(TEST_NM) icf_safe_test > icf_safe_test_1.stdout
196
icf_safe_test_2.stdout: icf_safe_test
197
        $(TEST_READELF) -h icf_safe_test > icf_safe_test_2.stdout
198
 
199
check_SCRIPTS += icf_safe_so_test.sh
200
check_DATA += icf_safe_so_test_1.stdout icf_safe_so_test_2.stdout
201
MOSTLYCLEANFILES += icf_safe_so_test
202
icf_safe_so_test.o: icf_safe_so_test.cc
203
        $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
204
icf_safe_so_test: icf_safe_so_test.o gcctestdir/ld
205
        $(CXXLINK) -Bgcctestdir/ -Wl,--icf=safe icf_safe_so_test.o -fPIC -shared
206
icf_safe_so_test_1.stdout: icf_safe_so_test
207
        $(TEST_NM) icf_safe_so_test > icf_safe_so_test_1.stdout
208
icf_safe_so_test_2.stdout: icf_safe_so_test
209
        $(TEST_READELF) -h icf_safe_so_test > icf_safe_so_test_2.stdout
210
 
211
check_SCRIPTS += final_layout.sh
212
check_DATA += final_layout.stdout
213
MOSTLYCLEANFILES += final_layout
214
final_layout.o: final_layout.cc
215
        $(CXXCOMPILE) -O0 -c -ffunction-sections  -fdata-sections -g -o $@ $<
216
final_layout_sequence.txt:
217
        (echo "*_Z3barv*" && echo ".text._Z3bazv" && echo "*_Z3foov*" && echo "*global_varb*" && echo "*global_vara*" && echo "*global_varc*") > final_layout_sequence.txt
218
final_layout: final_layout.o final_layout_sequence.txt gcctestdir/ld
219
        $(CXXLINK) -Bgcctestdir/ -Wl,--section-ordering-file,final_layout_sequence.txt final_layout.o
220
final_layout.stdout: final_layout
221
        $(TEST_NM) -n final_layout > final_layout.stdout
222
 
223
check_PROGRAMS += icf_virtual_function_folding_test
224
MOSTLYCLEANFILES += icf_virtual_function_folding_test
225
icf_virtual_function_folding_test.o: icf_virtual_function_folding_test.cc
226
        $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIE -g -o $@ $<
227
icf_virtual_function_folding_test: icf_virtual_function_folding_test.o gcctestdir/ld
228
        $(CXXLINK) -Bgcctestdir/ -Wl,--icf=all icf_virtual_function_folding_test.o -pie
229
 
230
check_SCRIPTS += icf_preemptible_functions_test.sh
231
check_DATA += icf_preemptible_functions_test.stdout
232
MOSTLYCLEANFILES += icf_preemptible_functions_test
233
icf_preemptible_functions_test.o: icf_preemptible_functions_test.cc
234
        $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
235
icf_preemptible_functions_test: icf_preemptible_functions_test.o gcctestdir/ld
236
        $(CXXLINK) -Bgcctestdir/ -Wl,--icf=all icf_preemptible_functions_test.o -fPIC -shared
237
icf_preemptible_functions_test.stdout: icf_preemptible_functions_test
238
        $(TEST_NM) icf_preemptible_functions_test > icf_preemptible_functions_test.stdout
239
 
240
check_SCRIPTS += icf_string_merge_test.sh
241
check_DATA += icf_string_merge_test.stdout
242
MOSTLYCLEANFILES += icf_string_merge_test
243
icf_string_merge_test.o: icf_string_merge_test.cc
244
        $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
245
icf_string_merge_test: icf_string_merge_test.o gcctestdir/ld
246
        $(CXXLINK) -Bgcctestdir/ -Wl,--icf=all icf_string_merge_test.o
247
icf_string_merge_test.stdout: icf_string_merge_test
248
        $(TEST_NM) icf_string_merge_test > icf_string_merge_test.stdout
249
 
250
check_SCRIPTS += icf_sht_rel_addend_test.sh
251
check_DATA += icf_sht_rel_addend_test.stdout
252
MOSTLYCLEANFILES += icf_sht_rel_addend_test
253
icf_sht_rel_addend_test_1.o: icf_sht_rel_addend_test_1.cc
254
        $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
255
icf_sht_rel_addend_test_2.o: icf_sht_rel_addend_test_2.cc
256
        $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
257
icf_sht_rel_addend_test: icf_sht_rel_addend_test_1.o icf_sht_rel_addend_test_2.o gcctestdir/ld
258
        $(CXXLINK) -Bgcctestdir/ -Wl,--icf=all icf_sht_rel_addend_test_1.o icf_sht_rel_addend_test_2.o
259
icf_sht_rel_addend_test.stdout: icf_sht_rel_addend_test
260
        $(TEST_NM) icf_sht_rel_addend_test > icf_sht_rel_addend_test.stdout
261
 
262
check_PROGRAMS += basic_test
263
check_PROGRAMS += basic_pic_test
264
basic_test.o: basic_test.cc
265
        $(CXXCOMPILE) -O0 -c -o $@ $<
266
basic_test: basic_test.o gcctestdir/ld
267
        $(CXXLINK) -Bgcctestdir/ basic_test.o
268 159 khays
 
269
if HAVE_STATIC
270
check_PROGRAMS += basic_static_test
271 27 khays
basic_static_test: basic_test.o gcctestdir/ld
272
        $(CXXLINK) -Bgcctestdir/ -static basic_test.o
273 159 khays
endif
274 27 khays
 
275
basic_pic_test.o: basic_test.cc
276
        $(CXXCOMPILE) -O0 -c -fpic -o $@ $<
277
basic_pic_test: basic_pic_test.o gcctestdir/ld
278
        $(CXXLINK) -Bgcctestdir/ basic_pic_test.o
279 159 khays
 
280
if HAVE_STATIC
281
check_PROGRAMS += basic_static_pic_test
282 27 khays
basic_static_pic_test: basic_pic_test.o gcctestdir/ld
283
        $(CXXLINK) -Bgcctestdir/ -static basic_pic_test.o
284 159 khays
endif
285 27 khays
 
286
check_PROGRAMS += basic_pie_test
287
basic_pie_test.o: basic_test.cc
288
        $(CXXCOMPILE) -O0 -c -fpie -o $@ $<
289
basic_pie_test: basic_pie_test.o gcctestdir/ld
290
        $(CXXLINK) -Bgcctestdir/ -pie basic_pie_test.o
291
 
292
check_PROGRAMS += constructor_test
293
constructor_test_SOURCES = constructor_test.cc
294
constructor_test_DEPENDENCIES = gcctestdir/ld
295
constructor_test_LDFLAGS = -Bgcctestdir/
296
constructor_test_LDADD =
297
 
298 159 khays
if HAVE_STATIC
299
check_PROGRAMS += constructor_static_test
300 27 khays
constructor_static_test_SOURCES = $(constructor_test_SOURCES)
301
constructor_static_test_DEPENDENCIES = $(constructor_test_DEPENDENCIES)
302
constructor_static_test_LDFLAGS = $(constructor_test_LDFLAGS) -static
303
constructor_static_test_LDADD = $(constructor_test_LDADD)
304 159 khays
endif
305 27 khays
 
306
check_PROGRAMS += two_file_test
307
check_PROGRAMS += two_file_pic_test
308
two_file_test_SOURCES = \
309
        two_file_test_1.cc \
310
        two_file_test_1b.cc \
311
        two_file_test_2.cc \
312
        two_file_test_main.cc \
313
        two_file_test.h
314
two_file_test_DEPENDENCIES = gcctestdir/ld
315
two_file_test_LDFLAGS = -Bgcctestdir/
316
two_file_test_LDADD =
317
 
318 159 khays
if HAVE_STATIC
319
check_PROGRAMS += two_file_static_test
320 27 khays
two_file_static_test_SOURCES = $(two_file_test_SOURCES)
321
two_file_static_test_DEPENDENCIES = $(two_file_test_DEPENDENCIES)
322
two_file_static_test_LDFLAGS = $(two_file_test_LDFLAGS) -static
323
two_file_static_test_LDADD = $(two_file_test_LDADD)
324 159 khays
endif
325 27 khays
 
326
two_file_pic_test_SOURCES = two_file_test_main.cc
327
two_file_pic_test_DEPENDENCIES = \
328
        gcctestdir/ld two_file_test_1_pic.o two_file_test_1b_pic.o two_file_test_2_pic.o
329
two_file_pic_test_LDFLAGS = -Bgcctestdir/
330
two_file_pic_test_LDADD = two_file_test_1_pic.o two_file_test_1b_pic.o two_file_test_2_pic.o
331
 
332
 
333
check_PROGRAMS += two_file_shared_1_test
334
check_PROGRAMS += two_file_shared_2_test
335
check_PROGRAMS += two_file_shared_1_pic_2_test
336
check_PROGRAMS += two_file_shared_2_pic_1_test
337
check_PROGRAMS += two_file_same_shared_test
338
check_PROGRAMS += two_file_separate_shared_12_test
339
check_PROGRAMS += two_file_separate_shared_21_test
340
two_file_test_1_pic.o: two_file_test_1.cc
341
        $(CXXCOMPILE) -c -fpic -o $@ $<
342
two_file_test_1b_pic.o: two_file_test_1b.cc
343
        $(CXXCOMPILE) -c -fpic -o $@ $<
344
two_file_test_2_pic.o: two_file_test_2.cc
345
        $(CXXCOMPILE) -c -fpic -o $@ $<
346
two_file_shared_1.so: two_file_test_1_pic.o two_file_test_1b_pic.o gcctestdir/ld
347
        $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1_pic.o two_file_test_1b_pic.o
348
two_file_shared_2.so: two_file_test_2_pic.o gcctestdir/ld
349
        $(CXXLINK) -Bgcctestdir/ -shared two_file_test_2_pic.o
350
two_file_shared.so: two_file_test_1_pic.o two_file_test_1b_pic.o two_file_test_2_pic.o gcctestdir/ld
351
        $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1_pic.o two_file_test_1b_pic.o two_file_test_2_pic.o
352
 
353
two_file_shared_1_test_SOURCES = two_file_test_2.cc two_file_test_main.cc
354
two_file_shared_1_test_DEPENDENCIES = gcctestdir/ld two_file_shared_1.so
355
two_file_shared_1_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
356
two_file_shared_1_test_LDADD = two_file_shared_1.so
357
 
358
two_file_shared_2_test_SOURCES = two_file_test_1.cc two_file_test_1b.cc two_file_test_main.cc
359
two_file_shared_2_test_DEPENDENCIES = gcctestdir/ld two_file_shared_2.so
360
two_file_shared_2_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
361
two_file_shared_2_test_LDADD = two_file_shared_2.so
362
 
363
two_file_shared_1_pic_2_test_SOURCES = two_file_test_main.cc
364
two_file_shared_1_pic_2_test_DEPENDENCIES = \
365
        gcctestdir/ld two_file_shared_2.so two_file_test_1_pic.o two_file_test_1b_pic.o
366
two_file_shared_1_pic_2_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
367
two_file_shared_1_pic_2_test_LDADD = two_file_test_1_pic.o two_file_test_1b_pic.o two_file_shared_2.so
368
 
369
two_file_shared_2_pic_1_test_SOURCES = two_file_test_main.cc
370
two_file_shared_2_pic_1_test_DEPENDENCIES = \
371
        gcctestdir/ld two_file_shared_2.so two_file_test_2_pic.o
372
two_file_shared_2_pic_1_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
373
two_file_shared_2_pic_1_test_LDADD = two_file_test_2_pic.o two_file_shared_1.so
374
 
375
two_file_same_shared_test_SOURCES = two_file_test_main.cc
376
two_file_same_shared_test_DEPENDENCIES = gcctestdir/ld two_file_shared.so
377
two_file_same_shared_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
378
two_file_same_shared_test_LDADD = two_file_shared.so
379
 
380
two_file_separate_shared_12_test_SOURCES = two_file_test_main.cc
381
two_file_separate_shared_12_test_DEPENDENCIES = \
382
        gcctestdir/ld two_file_shared_1.so two_file_shared_2.so
383
two_file_separate_shared_12_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
384
two_file_separate_shared_12_test_LDADD = \
385
        two_file_shared_1.so two_file_shared_2.so
386
 
387
two_file_separate_shared_21_test_SOURCES = two_file_test_main.cc
388
two_file_separate_shared_21_test_DEPENDENCIES = \
389
        gcctestdir/ld two_file_shared_1.so two_file_shared_2.so
390
two_file_separate_shared_21_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
391
two_file_separate_shared_21_test_LDADD = \
392
        two_file_shared_2.so two_file_shared_1.so
393
 
394
check_PROGRAMS += two_file_relocatable_test
395
two_file_relocatable_test_SOURCES = two_file_test_main.cc
396
two_file_relocatable_test_DEPENDENCIES = \
397
        gcctestdir/ld two_file_relocatable.o
398
two_file_relocatable_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
399
two_file_relocatable_test_LDADD = two_file_relocatable.o
400
two_file_relocatable.o: gcctestdir/ld two_file_test_1.o two_file_test_1b.o two_file_test_2.o
401
        gcctestdir/ld -r -o $@ two_file_test_1.o two_file_test_1b.o two_file_test_2.o
402
 
403
check_PROGRAMS += two_file_pie_test
404
two_file_test_1_pie.o: two_file_test_1.cc
405
        $(CXXCOMPILE) -c -fpie -o $@ $<
406
two_file_test_1b_pie.o: two_file_test_1b.cc
407
        $(CXXCOMPILE) -c -fpie -o $@ $<
408
two_file_test_2_pie.o: two_file_test_2.cc
409
        $(CXXCOMPILE) -c -fpie -o $@ $<
410
two_file_test_main_pie.o: two_file_test_main.cc
411
        $(CXXCOMPILE) -c -fpie -o $@ $<
412
two_file_pie_test: two_file_test_1_pie.o two_file_test_1b_pie.o \
413
                two_file_test_2_pie.o two_file_test_main_pie.o gcctestdir/ld
414
        $(CXXLINK) -Bgcctestdir/ -pie two_file_test_1_pie.o two_file_test_1b_pie.o two_file_test_2_pie.o two_file_test_main_pie.o
415
 
416
check_SCRIPTS += two_file_shared.sh
417
check_DATA += two_file_shared.dbg
418
MOSTLYCLEANFILES += two_file_shared.dbg
419
two_file_shared.dbg: two_file_shared.so
420
        $(TEST_READELF) -w $< >$@ 2>/dev/null
421
 
422
# The nonpic tests will fail on platforms which can not put non-PIC
423
# code into shared libraries, so we just don't run them in that case.
424
if FN_PTRS_IN_SO_WITHOUT_PIC
425
 
426
check_PROGRAMS += two_file_shared_1_nonpic_test
427
check_PROGRAMS += two_file_shared_2_nonpic_test
428
check_PROGRAMS += two_file_same_shared_nonpic_test
429
check_PROGRAMS += two_file_separate_shared_12_nonpic_test
430
check_PROGRAMS += two_file_separate_shared_21_nonpic_test
431
check_PROGRAMS += two_file_mixed_shared_test
432
check_PROGRAMS += two_file_mixed_2_shared_test
433
two_file_shared_1_nonpic.so: two_file_test_1.o gcctestdir/ld
434 159 khays
        $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_1b.o -Wl,-z,notext
435 27 khays
two_file_shared_2_nonpic.so: two_file_test_2.o gcctestdir/ld
436
        $(CXXLINK) -Bgcctestdir/ -shared two_file_test_2.o
437
two_file_shared_nonpic.so: two_file_test_1.o two_file_test_1b.o two_file_test_2.o gcctestdir/ld
438 159 khays
        $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_1b.o two_file_test_2.o -Wl,-z,notext
439 27 khays
two_file_shared_mixed.so: two_file_test_1_pic.o two_file_test_1b_pic.o two_file_test_2.o gcctestdir/ld
440 159 khays
        $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1_pic.o two_file_test_1b_pic.o two_file_test_2.o -Wl,-z,notext
441 27 khays
two_file_shared_mixed_1.so: two_file_test_1.o two_file_test_1b_pic.o two_file_shared_2.so gcctestdir/ld
442 159 khays
        $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1.o two_file_test_1b_pic.o two_file_shared_2.so -Wl,-z,notext
443 27 khays
 
444
two_file_shared_1_nonpic_test_SOURCES = \
445
        two_file_test_2.cc two_file_test_main.cc
446
two_file_shared_1_nonpic_test_DEPENDENCIES = \
447
        gcctestdir/ld two_file_shared_1_nonpic.so
448
two_file_shared_1_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
449
two_file_shared_1_nonpic_test_LDADD = two_file_shared_1_nonpic.so
450
 
451
two_file_shared_2_nonpic_test_SOURCES = \
452
        two_file_test_1.cc two_file_test_1b.cc two_file_test_main.cc
453
two_file_shared_2_nonpic_test_DEPENDENCIES = \
454
        gcctestdir/ld two_file_shared_2_nonpic.so
455
two_file_shared_2_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
456
two_file_shared_2_nonpic_test_LDADD = two_file_shared_2_nonpic.so
457
 
458
two_file_same_shared_nonpic_test_SOURCES = two_file_test_main.cc
459
two_file_same_shared_nonpic_test_DEPENDENCIES = \
460
        gcctestdir/ld two_file_shared_nonpic.so
461
two_file_same_shared_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
462
two_file_same_shared_nonpic_test_LDADD = two_file_shared_nonpic.so
463
 
464
two_file_separate_shared_12_nonpic_test_SOURCES = two_file_test_main.cc
465
two_file_separate_shared_12_nonpic_test_DEPENDENCIES = \
466
        gcctestdir/ld two_file_shared_1_nonpic.so two_file_shared_2_nonpic.so
467
two_file_separate_shared_12_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
468
two_file_separate_shared_12_nonpic_test_LDADD = \
469
        two_file_shared_1_nonpic.so two_file_shared_2_nonpic.so
470
 
471
two_file_separate_shared_21_nonpic_test_SOURCES = two_file_test_main.cc
472
two_file_separate_shared_21_nonpic_test_DEPENDENCIES = \
473
        gcctestdir/ld two_file_shared_1_nonpic.so two_file_shared_2_nonpic.so
474
two_file_separate_shared_21_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
475
two_file_separate_shared_21_nonpic_test_LDADD = \
476
        two_file_shared_2_nonpic.so two_file_shared_1_nonpic.so
477
 
478
two_file_mixed_shared_test_SOURCES = two_file_test_main.cc
479
two_file_mixed_shared_test_DEPENDENCIES = gcctestdir/ld two_file_shared_mixed.so
480
two_file_mixed_shared_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
481
two_file_mixed_shared_test_LDADD = two_file_shared_mixed.so
482
 
483
two_file_mixed_2_shared_test_SOURCES = two_file_test_main.cc
484
two_file_mixed_2_shared_test_DEPENDENCIES = gcctestdir/ld two_file_shared_mixed_1.so two_file_shared_2.so
485
two_file_mixed_2_shared_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
486
two_file_mixed_2_shared_test_LDADD = two_file_shared_mixed_1.so two_file_shared_2.so
487
 
488
check_PROGRAMS += two_file_mixed_pie_test
489
two_file_mixed_pie_test: two_file_test_1.o two_file_test_1b_pie.o \
490
                two_file_test_main_pie.o two_file_shared_2.so gcctestdir/ld
491
        $(CXXLINK) -Bgcctestdir/ -Wl,-R,. -pie two_file_test_1.o two_file_test_1b_pie.o two_file_test_main_pie.o two_file_shared_2.so
492
 
493
endif FN_PTRS_IN_SO_WITHOUT_PIC
494
 
495
check_PROGRAMS += two_file_strip_test
496
two_file_strip_test: two_file_test
497
        $(TEST_STRIP) -o two_file_strip_test two_file_test
498
 
499
check_PROGRAMS += two_file_same_shared_strip_test
500
two_file_same_shared_strip_test_SOURCES = two_file_test_main.cc
501
two_file_same_shared_strip_test_DEPENDENCIES = \
502
        gcctestdir/ld two_file_shared_strip.so
503
two_file_same_shared_strip_test_LDFLAGS = -Bgcctestdir/ -Wl,-R.
504
two_file_same_shared_strip_test_LDADD = two_file_shared_strip.so
505
two_file_shared_strip.so: two_file_shared.so
506
        $(TEST_STRIP) -S -o two_file_shared_strip.so two_file_shared.so
507
 
508
check_PROGRAMS += common_test_1
509
common_test_1_SOURCES = common_test_1.c
510
common_test_1_DEPENDENCIES = gcctestdir/ld
511
common_test_1_LDFLAGS = -Bgcctestdir/
512
common_test_1_LDADD =
513
 
514
check_PROGRAMS += common_test_2
515
common_test_2_SOURCES = common_test_1.c
516
common_test_2_DEPENDENCIES = common_test_2.so common_test_3.so gcctestdir/ld
517
common_test_2_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
518
common_test_2_LDADD = common_test_2.so common_test_3.so
519
common_test_2_pic.o: common_test_2.c
520
        $(COMPILE) -c -fpic -o $@ $<
521
common_test_2.so: common_test_2_pic.o common_test_3.so gcctestdir/ld
522
        $(LINK) -Bgcctestdir/ -shared common_test_2_pic.o common_test_3.so
523
common_test_3_pic.o: common_test_3.c
524
        $(COMPILE) -c -fpic -o $@ $<
525
common_test_3.so: common_test_3_pic.o ver_test_2.script gcctestdir/ld
526
        $(LINK) -Bgcctestdir/ -shared common_test_3_pic.o -Wl,--version-script,$(srcdir)/ver_test_2.script
527
 
528
check_PROGRAMS += exception_test
529
check_PROGRAMS += exception_shared_1_test
530
check_PROGRAMS += exception_shared_2_test
531
check_PROGRAMS += exception_same_shared_test
532
check_PROGRAMS += exception_separate_shared_12_test
533
check_PROGRAMS += exception_separate_shared_21_test
534
exception_test_1_pic.o: exception_test_1.cc
535
        $(CXXCOMPILE) -c -fpic -o $@ $<
536
exception_test_2_pic.o: exception_test_2.cc
537
        $(CXXCOMPILE) -c -fpic -o $@ $<
538
exception_shared_1.so: exception_test_1_pic.o gcctestdir/ld
539
        $(CXXLINK) -Bgcctestdir/ -shared exception_test_1_pic.o
540
exception_shared_2.so: exception_test_2_pic.o gcctestdir/ld
541
        $(CXXLINK) -Bgcctestdir/ -shared exception_test_2_pic.o
542
exception_shared.so: exception_test_1_pic.o exception_test_2_pic.o gcctestdir/ld
543
        $(CXXLINK) -Bgcctestdir/ -shared exception_test_1_pic.o exception_test_2_pic.o
544
 
545
exception_test_SOURCES = \
546
        exception_test_main.cc \
547
        exception_test_1.cc \
548
        exception_test_2.cc \
549
        exception_test.h
550
exception_test_DEPENDENCIES = gcctestdir/ld
551
exception_test_LDFLAGS = -Bgcctestdir/
552
exception_test_LDADD =
553
 
554 159 khays
if HAVE_STATIC
555
check_PROGRAMS += exception_static_test
556 27 khays
exception_static_test_SOURCES = $(exception_test_SOURCES)
557
exception_static_test_DEPENDENCIES = $(exception_test_DEPENDENCIES)
558
exception_static_test_LDFLAGS = $(exception_test_LDFLAGS) -static
559
exception_static_test_LDADD = $(exception_test_LDADD)
560 159 khays
endif
561 27 khays
 
562
exception_shared_1_test_SOURCES = exception_test_2.cc exception_test_main.cc
563
exception_shared_1_test_DEPENDENCIES = gcctestdir/ld exception_shared_1.so
564
exception_shared_1_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
565
exception_shared_1_test_LDADD = exception_shared_1.so
566
 
567
exception_shared_2_test_SOURCES = exception_test_1.cc exception_test_main.cc
568
exception_shared_2_test_DEPENDENCIES = gcctestdir/ld exception_shared_2.so
569
exception_shared_2_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
570
exception_shared_2_test_LDADD = exception_shared_2.so
571
 
572
exception_same_shared_test_SOURCES = exception_test_main.cc
573
exception_same_shared_test_DEPENDENCIES = gcctestdir/ld exception_shared.so
574
exception_same_shared_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
575
exception_same_shared_test_LDADD = exception_shared.so
576
 
577
exception_separate_shared_12_test_SOURCES = exception_test_main.cc
578
exception_separate_shared_12_test_DEPENDENCIES = \
579
        gcctestdir/ld exception_shared_1.so exception_shared_2.so
580
exception_separate_shared_12_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
581
exception_separate_shared_12_test_LDADD = \
582
        exception_shared_1.so exception_shared_2.so
583
 
584
exception_separate_shared_21_test_SOURCES = exception_test_main.cc
585
exception_separate_shared_21_test_DEPENDENCIES = \
586
        gcctestdir/ld exception_shared_1.so exception_shared_2.so
587
exception_separate_shared_21_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
588
exception_separate_shared_21_test_LDADD = \
589
        exception_shared_2.so exception_shared_1.so
590
 
591
 
592
check_PROGRAMS += weak_test
593
weak_test_SOURCES = weak_test.cc
594
weak_test_DEPENDENCIES = gcctestdir/ld
595
weak_test_LDFLAGS = -Bgcctestdir/
596
weak_test_LDADD =
597
 
598
check_PROGRAMS += weak_undef_test
599
MOSTLYCLEANFILES += alt/weak_undef_lib.so
600
weak_undef_test_SOURCES = weak_undef_test.cc
601
weak_undef_test_DEPENDENCIES = gcctestdir/ld weak_undef_lib.so alt/weak_undef_lib.so
602
weak_undef_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,alt
603
weak_undef_test_LDADD = -L . weak_undef_lib.so
604
weak_undef_file1.o: weak_undef_file1.cc
605
        $(CXXCOMPILE) -c -fpic -o $@ $<
606
weak_undef_file2.o: weak_undef_file2.cc
607
        $(CXXCOMPILE) -c -fpic -o $@ $<
608
weak_undef_lib.so: weak_undef_file1.o
609
        $(CXXLINK) -Bgcctestdir/ -shared weak_undef_file1.o
610
alt/weak_undef_lib.so: weak_undef_file2.o
611
        test -d alt || mkdir -p alt
612
        $(CXXLINK) -Bgcctestdir/ -shared weak_undef_file2.o
613
 
614
if FN_PTRS_IN_SO_WITHOUT_PIC
615
check_PROGRAMS += weak_undef_nonpic_test
616
MOSTLYCLEANFILES += alt/weak_undef_lib_nonpic.so
617
weak_undef_nonpic_test_SOURCES = weak_undef_test.cc
618
weak_undef_nonpic_test_DEPENDENCIES = gcctestdir/ld weak_undef_lib_nonpic.so alt/weak_undef_lib_nonpic.so
619
weak_undef_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,alt
620
weak_undef_nonpic_test_LDADD = -L . weak_undef_lib_nonpic.so
621
weak_undef_file1_nonpic.o: weak_undef_file1.cc
622
        $(CXXCOMPILE) -c -o $@ $<
623
weak_undef_file2_nonpic.o: weak_undef_file2.cc
624
        $(CXXCOMPILE) -c -o $@ $<
625
weak_undef_lib_nonpic.so: weak_undef_file1_nonpic.o
626 159 khays
        $(CXXLINK) -Bgcctestdir/ -shared weak_undef_file1_nonpic.o -Wl,-z,notext
627 27 khays
alt/weak_undef_lib_nonpic.so: weak_undef_file2_nonpic.o
628
        test -d alt || mkdir -p alt
629 159 khays
        $(CXXLINK) -Bgcctestdir/ -shared weak_undef_file2_nonpic.o -Wl,-z,notext
630 27 khays
endif FN_PTRS_IN_SO_WITHOUT_PIC
631
 
632
 
633
check_PROGRAMS += weak_alias_test
634
weak_alias_test_SOURCES = weak_alias_test_main.cc
635
weak_alias_test_DEPENDENCIES = \
636
        gcctestdir/ld weak_alias_test_1.so weak_alias_test_2.so \
637 159 khays
        weak_alias_test_3.o weak_alias_test_4.so weak_alias_test_5.so
638 27 khays
weak_alias_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
639
weak_alias_test_LDADD = \
640
        weak_alias_test_1.so weak_alias_test_2.so weak_alias_test_3.o \
641 159 khays
        weak_alias_test_4.so weak_alias_test_5.so
642 27 khays
weak_alias_test_1_pic.o: weak_alias_test_1.cc
643
        $(CXXCOMPILE) -c -fpic -o $@ $<
644
weak_alias_test_1.so: weak_alias_test_1_pic.o gcctestdir/ld
645
        $(CXXLINK) -Bgcctestdir/ -shared weak_alias_test_1_pic.o
646
weak_alias_test_2_pic.o: weak_alias_test_2.cc
647
        $(CXXCOMPILE) -c -fpic -o $@ $<
648
weak_alias_test_2.so: weak_alias_test_2_pic.o gcctestdir/ld
649
        $(CXXLINK) -Bgcctestdir/ -shared weak_alias_test_2_pic.o
650
weak_alias_test_3.o: weak_alias_test_3.cc
651
        $(CXXCOMPILE) -c -o $@ $<
652
weak_alias_test_4_pic.o: weak_alias_test_4.cc
653
        $(CXXCOMPILE) -c -fpic -o $@ $<
654
weak_alias_test_4.so: weak_alias_test_4_pic.o gcctestdir/ld
655
        $(CXXLINK) -Bgcctestdir/ -shared weak_alias_test_4_pic.o
656 159 khays
weak_alias_test_5_pic.o: weak_alias_test_5.cc
657
        $(CXXCOMPILE) -c -fpic -o $@ $<
658
weak_alias_test_5.so: weak_alias_test_5_pic.o $(srcdir)/weak_alias_test.script gcctestdir/ld
659
        $(CXXLINK) -Bgcctestdir/ -shared weak_alias_test_5_pic.o \
660
                -Wl,--version-script,$(srcdir)/weak_alias_test.script
661 27 khays
 
662
check_SCRIPTS += weak_plt.sh
663
check_PROGRAMS += weak_plt
664
check_DATA += weak_plt_shared.so
665
weak_plt_main_pic.o: weak_plt_main.cc
666
        $(CXXCOMPILE) -c -fpic -o $@ $<
667
weak_plt: weak_plt_main_pic.o gcctestdir/ld
668
        $(CXXLINK) -Bgcctestdir/ weak_plt_main_pic.o
669
weak_plt_shared_pic.o: weak_plt_shared.cc
670
        $(CXXCOMPILE) -c -fpic -o $@ $<
671
weak_plt_shared.so: weak_plt_shared_pic.o gcctestdir/ld
672
        $(CXXLINK) -Bgcctestdir/ -shared weak_plt_shared_pic.o
673
 
674
check_PROGRAMS += copy_test
675
copy_test_SOURCES = copy_test.cc
676
copy_test_DEPENDENCIES = gcctestdir/ld copy_test_1.so copy_test_2.so
677
copy_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
678
copy_test_LDADD = copy_test_1.so copy_test_2.so
679
copy_test_1_pic.o: copy_test_1.cc
680
        $(CXXCOMPILE) -c -fpic -o $@ $<
681
copy_test_1.so: gcctestdir/ld copy_test_1_pic.o
682
        $(CXXLINK) -Bgcctestdir/ -shared copy_test_1_pic.o
683
copy_test_2_pic.o: copy_test_2.cc
684
        $(CXXCOMPILE) -c -fpic -o $@ $<
685
copy_test_2.so: gcctestdir/ld copy_test_2_pic.o
686
        $(CXXLINK) -Bgcctestdir/ -shared copy_test_2_pic.o
687
 
688
if TLS
689
 
690
check_PROGRAMS += tls_test
691
check_PROGRAMS += tls_pic_test
692
check_PROGRAMS += tls_pie_test
693
check_PROGRAMS += tls_pie_pic_test
694
check_PROGRAMS += tls_shared_test
695
check_PROGRAMS += tls_shared_ie_test
696
check_PROGRAMS += tls_shared_gd_to_ie_test
697
tls_test_pic.o: tls_test.cc
698
        $(CXXCOMPILE) -c -fpic -o $@ $<
699
tls_test_file2_pic.o: tls_test_file2.cc
700
        $(CXXCOMPILE) -c -fpic -o $@ $<
701
tls_test_c_pic.o: tls_test_c.c
702
        $(COMPILE) -c -fpic $(TLS_TEST_C_CFLAGS) -o $@ $<
703
tls_test_shared.so: tls_test_pic.o tls_test_file2_pic.o tls_test_c_pic.o gcctestdir/ld
704
        $(CXXLINK) -Bgcctestdir/ -shared tls_test_pic.o tls_test_file2_pic.o tls_test_c_pic.o -Wl,-z,defs
705
tls_test_shared2.so: tls_test_file2_pic.o gcctestdir/ld
706
        $(CXXLINK) -Bgcctestdir/ -shared tls_test_file2_pic.o
707
 
708
tls_test_pic_ie.o: tls_test.cc
709
        $(CXXCOMPILE) -c -fpic -ftls-model=initial-exec -o $@ $<
710
tls_test_file2_pic_ie.o: tls_test_file2.cc
711
        $(CXXCOMPILE) -c -fpic -ftls-model=initial-exec -o $@ $<
712
tls_test_c_pic_ie.o: tls_test_c.c
713
        $(COMPILE) -c -fpic -ftls-model=initial-exec $(TLS_TEST_C_CFLAGS) -o $@ $<
714
tls_test_ie_shared.so: tls_test_pic_ie.o tls_test_file2_pic_ie.o tls_test_c_pic_ie.o gcctestdir/ld
715
        $(CXXLINK) -Bgcctestdir/ -shared tls_test_pic_ie.o tls_test_file2_pic_ie.o tls_test_c_pic_ie.o
716
 
717
tls_test_SOURCES = tls_test.cc tls_test_file2.cc tls_test_main.cc tls_test.h
718
tls_test_DEPENDENCIES = gcctestdir/ld tls_test_c.o
719
tls_test_LDFLAGS = -Bgcctestdir/
720
tls_test_LDADD = tls_test_c.o -lpthread
721
tls_test_c.o: tls_test_c.c
722
        $(COMPILE) -c $(TLS_TEST_C_CFLAGS) -o $@ $<
723
 
724
tls_pic_test_SOURCES = tls_test_main.cc
725
tls_pic_test_DEPENDENCIES = gcctestdir/ld tls_test_pic.o tls_test_file2_pic.o \
726
        tls_test_c_pic.o
727
tls_pic_test_LDFLAGS = -Bgcctestdir/
728
tls_pic_test_LDADD = tls_test_pic.o tls_test_file2_pic.o tls_test_c_pic.o \
729
        -lpthread
730
 
731
tls_test_main_pie.o: tls_test_main.cc tls_test.h
732
        $(CXXCOMPILE) -c -fpie -o $@ $<
733
tls_test_pie.o: tls_test.cc tls_test.h
734
        $(CXXCOMPILE) -c -fpie -o $@ $<
735
tls_test_file2_pie.o: tls_test_file2.cc tls_test.h
736
        $(CXXCOMPILE) -c -fpie -o $@ $<
737
tls_test_c_pie.o: tls_test_c.c
738
        $(COMPILE) -c -fpic $(TLS_TEST_C_CFLAGS) -o $@ $<
739
tls_pie_test: tls_test_main_pie.o tls_test_pie.o tls_test_file2_pie.o \
740
                tls_test_c_pie.o gcctestdir/ld
741
        $(CXXLINK) -Bgcctestdir/ -pie tls_test_main_pie.o tls_test_pie.o tls_test_file2_pie.o tls_test_c_pie.o -lpthread
742
 
743
tls_pie_pic_test: tls_test_main_pie.o tls_test_pic.o tls_test_file2_pic.o \
744
                tls_test_c_pic.o gcctestdir/ld
745
        $(CXXLINK) -Bgcctestdir/ -pie tls_test_main_pie.o tls_test_pic.o tls_test_file2_pic.o tls_test_c_pic.o -lpthread
746
 
747
tls_shared_test_SOURCES = tls_test_main.cc
748
tls_shared_test_DEPENDENCIES = gcctestdir/ld tls_test_shared.so
749
tls_shared_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
750
tls_shared_test_LDADD = tls_test_shared.so -lpthread
751
 
752
tls_shared_ie_test_SOURCES = tls_test_main.cc
753
tls_shared_ie_test_DEPENDENCIES = gcctestdir/ld tls_test_ie_shared.so
754
tls_shared_ie_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
755
tls_shared_ie_test_LDADD = tls_test_ie_shared.so -lpthread
756
 
757
tls_shared_gd_to_ie_test_SOURCES = tls_test_main.cc
758
tls_shared_gd_to_ie_test_DEPENDENCIES = gcctestdir/ld tls_test_pic.o \
759
        tls_test_c_pic.o tls_test_shared2.so
760
tls_shared_gd_to_ie_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
761
tls_shared_gd_to_ie_test_LDADD = tls_test_pic.o tls_test_c_pic.o \
762
        tls_test_shared2.so -lpthread
763
 
764
if TLS_GNU2_DIALECT
765
 
766
check_PROGRAMS += tls_shared_gnu2_gd_to_ie_test
767
 
768
tls_test_gnu2.o: tls_test.cc
769
        $(CXXCOMPILE) -c -fpic -mtls-dialect=gnu2 -o $@ $<
770
tls_test_file2_gnu2.o: tls_test_file2.cc
771
        $(CXXCOMPILE) -c -fpic -mtls-dialect=gnu2 -o $@ $<
772
tls_test_c_gnu2.o: tls_test_c.c
773
        $(COMPILE) -c -fpic -mtls-dialect=gnu2 $(TLS_TEST_C_CFLAGS) -o $@ $<
774
tls_test_gnu2_shared2.so: tls_test_file2_gnu2.o gcctestdir/ld
775
        $(CXXLINK) -Bgcctestdir/ -shared tls_test_file2_gnu2.o
776
 
777
tls_shared_gnu2_gd_to_ie_test_SOURCES = tls_test_main.cc
778
tls_shared_gnu2_gd_to_ie_test_DEPENDENCIES = gcctestdir/ld tls_test_gnu2.o \
779
        tls_test_c_gnu2.o tls_test_gnu2_shared2.so
780
tls_shared_gnu2_gd_to_ie_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
781
tls_shared_gnu2_gd_to_ie_test_LDADD = tls_test_gnu2.o tls_test_c_gnu2.o \
782
        tls_test_gnu2_shared2.so -lpthread
783
 
784
if TLS_DESCRIPTORS
785
 
786
check_PROGRAMS += tls_shared_gnu2_test
787
 
788
tls_test_gnu2_shared.so: tls_test_gnu2.o tls_test_file2_gnu2.o tls_test_c_gnu2.o gcctestdir/ld
789
        $(CXXLINK) -Bgcctestdir/ -shared tls_test_gnu2.o tls_test_file2_gnu2.o tls_test_c_gnu2.o
790
 
791
tls_shared_gnu2_test_SOURCES = tls_test_main.cc
792
tls_shared_gnu2_test_DEPENDENCIES = gcctestdir/ld tls_test_gnu2_shared.so
793
tls_shared_gnu2_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
794
tls_shared_gnu2_test_LDADD = tls_test_gnu2_shared.so -lpthread
795
 
796
endif TLS_DESCRIPTORS
797
 
798
endif TLS_GNU2_DIALECT
799
 
800 159 khays
if HAVE_STATIC
801 27 khays
if STATIC_TLS
802
check_PROGRAMS += tls_static_test
803
check_PROGRAMS += tls_static_pic_test
804
 
805
tls_static_test_SOURCES = $(tls_test_SOURCES)
806
tls_static_test_DEPENDENCIES = $(tls_test_DEPENDENCIES)
807
tls_static_test_LDFLAGS = $(tls_test_LDFLAGS) -static
808
tls_static_test_LDADD = $(tls_test_LDADD)
809
 
810
tls_static_pic_test_SOURCES = $(tls_pic_test_SOURCES)
811
tls_static_pic_test_DEPENDENCIES = $(tls_pic_test_DEPENDENCIES)
812
tls_static_pic_test_LDFLAGS = $(tls_pic_test_LDFLAGS) -static
813
tls_static_pic_test_LDADD = $(tls_pic_test_LDADD)
814
endif
815 159 khays
endif
816 27 khays
 
817
if FN_PTRS_IN_SO_WITHOUT_PIC
818
check_PROGRAMS += tls_shared_nonpic_test
819
tls_test_shared_nonpic.so: tls_test.o tls_test_file2.o tls_test_c.o gcctestdir/ld
820 159 khays
        $(CXXLINK) -Bgcctestdir/ -shared tls_test.o tls_test_file2.o tls_test_c.o -Wl,-z,notext
821 27 khays
 
822
tls_shared_nonpic_test_SOURCES = tls_test_main.cc
823
tls_shared_nonpic_test_DEPENDENCIES = gcctestdir/ld tls_test_shared_nonpic.so
824
tls_shared_nonpic_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
825
tls_shared_nonpic_test_LDADD = tls_test_shared_nonpic.so -lpthread
826
endif FN_PTRS_IN_SO_WITHOUT_PIC
827
 
828
endif TLS
829
 
830
check_PROGRAMS += many_sections_test
831
many_sections_test_SOURCES = many_sections_test.cc
832
many_sections_test_DEPENDENCIES = gcctestdir/ld
833
many_sections_test_LDFLAGS = -Bgcctestdir/ -rdynamic
834
many_sections_test_LDADD =
835
 
836
BUILT_SOURCES += many_sections_define.h
837
MOSTLYCLEANFILES += many_sections_define.h
838
many_sections_define.h:
839
        (for i in `seq 1 70000`; do \
840
           echo "int var_$$i __attribute__((section(\"section_$$i\"))) = $$i;"; \
841
         done) > $@.tmp
842
        mv -f $@.tmp $@
843
 
844
BUILT_SOURCES += many_sections_check.h
845
MOSTLYCLEANFILES += many_sections_check.h
846
many_sections_check.h:
847
        (for i in `seq 1 1000 70000`; do \
848
           echo "assert(var_$$i == $$i);"; \
849
         done) > $@.tmp
850
        mv -f $@.tmp $@
851
 
852
check_PROGRAMS += many_sections_r_test
853
many_sections_r_test.o: many_sections_test.o gcctestdir/ld
854
        gcctestdir/ld -r -o $@ many_sections_test.o
855
many_sections_r_test: many_sections_r_test.o gcctestdir/ld
856
        $(CXXLINK) -Bgcctestdir/ many_sections_r_test.o $(LIBS)
857
 
858
check_PROGRAMS += initpri1
859
initpri1_SOURCES = initpri1.c
860
initpri1_DEPENDENCIES = gcctestdir/ld
861
initpri1_LDFLAGS = -Bgcctestdir/
862
initpri1_LDADD =
863
 
864 159 khays
check_PROGRAMS += initpri2
865
initpri2_SOURCES = initpri2.c
866
initpri2_DEPENDENCIES = gcctestdir/ld
867 166 khays
initpri2_LDFLAGS = -Bgcctestdir/ -Wl,--ctors-in-init-array
868 159 khays
initpri2_LDADD =
869 27 khays
 
870 159 khays
check_PROGRAMS += initpri3a
871
initpri3a_SOURCES = initpri3.c
872
initpri3a_DEPENDENCIES = gcctestdir/ld
873
initpri3a_LDFLAGS = -Bgcctestdir/
874
initpri3a_LDADD =
875 27 khays
 
876 159 khays
check_PROGRAMS += initpri3b
877
initpri3b_SOURCES = initpri3.c
878
initpri3b_DEPENDENCIES = gcctestdir/ld
879
initpri3b_LDFLAGS = -Bgcctestdir/ -Wl,--no-ctors-in-init-array
880
initpri3b_LDADD =
881
 
882 27 khays
# Test --detect-odr-violations
883
check_SCRIPTS += debug_msg.sh
884
 
885
# Create the data files that debug_msg.sh analyzes.
886
check_DATA += debug_msg.err
887
MOSTLYCLEANFILES += debug_msg.err
888
debug_msg.o: debug_msg.cc
889
        $(CXXCOMPILE) -O0 -g -c -w -o $@ $(srcdir)/debug_msg.cc
890
odr_violation1.o: odr_violation1.cc
891
        $(CXXCOMPILE) -O0 -g -c -w -o $@ $(srcdir)/odr_violation1.cc
892
# Compile with different optimization flags to check that rearranged
893
# instructions don't cause a false positive.
894
odr_violation2.o: odr_violation2.cc
895
        $(CXXCOMPILE) -O2 -g -c -w -o $@ $(srcdir)/odr_violation2.cc
896
debug_msg.err: debug_msg.o odr_violation1.o odr_violation2.o gcctestdir/ld
897
        @echo $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg debug_msg.o odr_violation1.o odr_violation2.o "2>$@"
898
        @if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg debug_msg.o odr_violation1.o odr_violation2.o 2>$@; \
899
        then \
900
          echo 1>&2 "Link of debug_msg should have failed"; \
901
          rm -f $@; \
902
          exit 1; \
903
        fi
904
 
905 159 khays
 
906
if HAVE_ZLIB
907
 
908
# Check that --detect-odr-violations works with compressed debug sections.
909
check_DATA += debug_msg_cdebug.err
910
MOSTLYCLEANFILES += debug_msg_cdebug.err
911
debug_msg_cdebug.o: debug_msg.cc gcctestdir/as
912
        $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/debug_msg.cc
913
odr_violation1_cdebug.o: odr_violation1.cc gcctestdir/as
914
        $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/odr_violation1.cc
915
odr_violation2_cdebug.o: odr_violation2.cc gcctestdir/as
916
        $(CXXCOMPILE) -Bgcctestdir/ -O2 -g -Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/odr_violation2.cc
917
debug_msg_cdebug.err: debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_cdebug.o gcctestdir/ld
918
        @echo $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_cdebug debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_cdebug.o "2>$@"
919
        @if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_cdebug debug_msg_cdebug.o odr_violation1_cdebug.o odr_violation2_cdebug.o 2>$@; \
920
        then \
921
          echo 1>&2 "Link of debug_msg_cdebug should have failed"; \
922
          rm -f $@; \
923
          exit 1; \
924
        fi
925
 
926
endif HAVE_ZLIB
927
 
928 27 khays
# See if we can also detect problems when we're linking .so's, not .o's.
929
check_DATA += debug_msg_so.err
930
MOSTLYCLEANFILES += debug_msg_so.err
931
debug_msg.so: debug_msg.cc gcctestdir/ld
932
        $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -shared -fPIC -w -o $@ $(srcdir)/debug_msg.cc
933
odr_violation1.so: odr_violation1.cc gcctestdir/ld
934
        $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -shared -fPIC -w -o $@ $(srcdir)/odr_violation1.cc
935
odr_violation2.so: odr_violation2.cc gcctestdir/ld
936
        $(CXXCOMPILE) -Bgcctestdir/ -O2 -g -shared -fPIC -w -o $@ $(srcdir)/odr_violation2.cc
937
debug_msg_so.err: debug_msg.so odr_violation1.so odr_violation2.so gcctestdir/ld
938
        @echo $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_so debug_msg.so odr_violation1.so odr_violation2.so "2>$@"
939
        @if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_so debug_msg.so odr_violation1.so odr_violation2.so 2>$@; \
940
        then \
941
          echo 1>&2 "Link of debug_msg_so should have failed"; \
942
          rm -f $@; \
943
          exit 1; \
944
        fi
945
 
946
# We also want to make sure we do something reasonable when there's no
947
# debug info available.  For the best test, we use .so's.
948
check_DATA += debug_msg_ndebug.err
949
MOSTLYCLEANFILES += debug_msg_ndebug.err
950
debug_msg_ndebug.so: debug_msg.cc gcctestdir/ld
951
        $(CXXCOMPILE) -Bgcctestdir/ -O0 -g0 -shared -fPIC -w -o $@ $(srcdir)/debug_msg.cc
952
odr_violation1_ndebug.so: odr_violation1.cc gcctestdir/ld
953
        $(CXXCOMPILE) -Bgcctestdir/ -O0 -g0 -shared -fPIC -w -o $@ $(srcdir)/odr_violation1.cc
954
odr_violation2_ndebug.so: odr_violation2.cc gcctestdir/ld
955
        $(CXXCOMPILE) -Bgcctestdir/ -O2 -g0 -shared -fPIC -w -o $@ $(srcdir)/odr_violation2.cc
956
debug_msg_ndebug.err: debug_msg_ndebug.so odr_violation1_ndebug.so odr_violation2_ndebug.so gcctestdir/ld
957
        @echo $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_ndebug debug_msg_ndebug.so odr_violation1_ndebug.so odr_violation2_ndebug.so "2>$@"
958
        @if $(CXXLINK) -Bgcctestdir/ -Wl,--detect-odr-violations -o debug_msg_ndebug debug_msg_ndebug.so odr_violation1_ndebug.so odr_violation2_ndebug.so 2>$@; \
959
        then \
960
          echo 1>&2 "Link of debug_msg_ndebug should have failed"; \
961
          rm -f $@; \
962
          exit 1; \
963
        fi
964
 
965
 
966
# Similar to --detect-odr-violations: check for undefined symbols in .so's
967
check_SCRIPTS += undef_symbol.sh
968
check_DATA += undef_symbol.err
969
MOSTLYCLEANFILES += undef_symbol.err
970
undef_symbol.o: undef_symbol.cc
971
        $(CXXCOMPILE) -O0 -g -c -fPIC $<
972
undef_symbol.so: undef_symbol.o gcctestdir/ld
973
        $(CXXLINK) -Bgcctestdir/ -shared undef_symbol.o
974
undef_symbol.err: undef_symbol_main.o undef_symbol.so gcctestdir/ld
975
        @echo $(CXXLINK) -Bgcctestdir/ -o undef_symbol_test undef_symbol_main.o undef_symbol.so "2>$@"
976
        @if $(CXXLINK) -Bgcctestdir/ -o undef_symbol_test undef_symbol_main.o undef_symbol.so 2>$@; \
977
        then \
978
          echo 1>&2 "Link of undef_symbol_test should have failed"; \
979
          rm -f $@; \
980
          exit 1; \
981
        fi
982
 
983
 
984
# Test -o when emitting to a special file (such as something in /dev).
985
check_PROGRAMS += flagstest_o_specialfile
986
flagstest_o_specialfile: flagstest_debug.o gcctestdir/ld
987
        $(CXXLINK) -Bgcctestdir/ -o /dev/stdout $< 2>&1 | cat > $@
988
        chmod a+x $@
989
        test -s $@
990
 
991
if HAVE_ZLIB
992
 
993
# Test --compress-debug-sections.  FIXME: check we actually compress.
994
check_PROGRAMS += flagstest_compress_debug_sections
995
flagstest_compress_debug_sections: flagstest_debug.o gcctestdir/ld
996
        $(CXXLINK) -Bgcctestdir/ -o $@ $< -Wl,--compress-debug-sections=zlib
997
        test -s $@
998
 
999
 
1000
# The specialfile output has a tricky case when we also compress debug
1001
# sections, because it requires output-file resizing.
1002
check_PROGRAMS += flagstest_o_specialfile_and_compress_debug_sections
1003
flagstest_o_specialfile_and_compress_debug_sections: flagstest_debug.o \
1004
                gcctestdir/ld
1005
        $(CXXLINK) -Bgcctestdir/ -o /dev/stdout $< -Wl,--compress-debug-sections=zlib 2>&1 | cat > $@
1006
        chmod a+x $@
1007
        test -s $@
1008
 
1009
endif HAVE_ZLIB
1010
 
1011 159 khays
# Test -TText and -Tdata.
1012
check_PROGRAMS += flagstest_o_ttext_1
1013
flagstest_o_ttext_1: flagstest_debug.o gcctestdir/ld
1014
        $(CXXLINK) -Bgcctestdir/ -o $@ $< -Wl,-Ttext,0x400000 -Wl,-Tdata,0x800000
1015
 
1016
# This version won't be runnable, because there is no way to put the
1017
# PT_PHDR segment at file offset 0.  We just make sure that we can
1018
# build it without error.
1019
check_DATA += flagstest_o_ttext_2
1020
flagstest_o_ttext_2: flagstest_debug.o gcctestdir/ld
1021
        $(CXXLINK) -Bgcctestdir/ -o $@ $< -Wl,-Ttext,0x400010 -Wl,-Tdata,0x800010
1022
 
1023 27 khays
# Test symbol versioning.
1024
check_PROGRAMS += ver_test
1025
ver_test_SOURCES = ver_test_main.cc
1026
ver_test_DEPENDENCIES = gcctestdir/ld ver_test_1.so ver_test_2.so ver_test_4.so
1027
ver_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1028
ver_test_LDADD = ver_test_1.so ver_test_2.so ver_test_4.so
1029
ver_test_1.so: ver_test_1.o ver_test_2.so ver_test_3.o ver_test_4.so gcctestdir/ld
1030
        $(CXXLINK) -Bgcctestdir/ -shared ver_test_1.o ver_test_2.so ver_test_3.o ver_test_4.so
1031
ver_test_2.so: ver_test_2.o $(srcdir)/ver_test_2.script ver_test_4.so gcctestdir/ld
1032
        $(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_2.script -Wl,-R,. ver_test_2.o ver_test_4.so
1033
ver_test_4.so: ver_test_4.o $(srcdir)/ver_test_4.script gcctestdir/ld
1034
        $(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_4.script ver_test_4.o
1035
ver_test_1.o: ver_test_1.cc
1036
        $(CXXCOMPILE) -c -fpic -o $@ $<
1037
ver_test_2.o: ver_test_2.cc
1038
        $(CXXCOMPILE) -c -fpic -o $@ $<
1039
ver_test_3.o: ver_test_3.cc
1040
        $(CXXCOMPILE) -c -fpic -o $@ $<
1041
ver_test_4.o: ver_test_4.cc
1042
        $(CXXCOMPILE) -c -fpic -o $@ $<
1043
 
1044
check_SCRIPTS += ver_test_1.sh
1045
check_DATA += ver_test_1.syms
1046
ver_test_1.syms: ver_test_1.so
1047
        $(TEST_READELF) -s $< >$@ 2>/dev/null
1048
 
1049
check_PROGRAMS += ver_test_2
1050
ver_test_2_SOURCES = ver_test_main_2.cc
1051
ver_test_2_DEPENDENCIES = gcctestdir/ld ver_test_4.so ver_test_2.so
1052
ver_test_2_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1053
ver_test_2_LDADD = ver_test_4.so ver_test_2.so
1054
 
1055
check_SCRIPTS += ver_test_2.sh
1056
check_DATA += ver_test_2.syms
1057
ver_test_2.syms: ver_test_2
1058
        $(TEST_READELF) -s $< >$@ 2>/dev/null
1059
 
1060
check_SCRIPTS += ver_test_4.sh
1061
check_DATA += ver_test_4.syms
1062
ver_test_4.syms: ver_test_4.so
1063
        $(TEST_READELF) -s $< >$@ 2>/dev/null
1064
 
1065
ver_test_5.so: ver_test_5.o $(srcdir)/ver_test_5.script ver_test_4.so gcctestdir/ld
1066
        $(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_5.script ver_test_5.o ver_test_4.so
1067
ver_test_5.o: ver_test_5.cc
1068
        $(CXXCOMPILE) -c -fpic -o $@ $<
1069
check_SCRIPTS += ver_test_5.sh
1070
check_DATA += ver_test_5.syms
1071
ver_test_5.syms: ver_test_5.so
1072
        $(TEST_READELF) -s $< >$@ 2>/dev/null
1073
 
1074
check_PROGRAMS += ver_test_6
1075
ver_test_6_SOURCES = ver_test_6.c
1076
ver_test_6_DEPENDENCIES = gcctestdir/ld ver_test_2.so
1077
ver_test_6_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1078
ver_test_6_LDADD = ver_test_2.so
1079
 
1080
ver_test_7.so: ver_test_4.o $(srcdir)/ver_test_4.script ver_test_7.o gcctestdir/ld
1081
        $(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_4.script ver_test_4.o ver_test_7.o
1082
ver_test_7.o: ver_test_7.cc
1083
        $(CXXCOMPILE) -c -fpic -o $@ $<
1084
check_SCRIPTS += ver_test_7.sh
1085
check_DATA += ver_test_7.syms
1086
ver_test_7.syms: ver_test_7.so
1087
        $(TEST_READELF) -s $< >$@ 2>/dev/null
1088
 
1089
check_PROGRAMS += ver_test_8
1090
ver_test_8_SOURCES = two_file_test_main.cc
1091
ver_test_8_DEPENDENCIES = gcctestdir/ld ver_test_8_1.so ver_test_8_2.so
1092
ver_test_8_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1093
ver_test_8_LDADD = ver_test_8_1.so ver_test_8_2.so
1094
ver_test_8_1.so: two_file_test_1_pic.o two_file_test_1b_pic.o ver_test_8_2.so gcctestdir/ld
1095
        $(CXXLINK) -Bgcctestdir/ -shared two_file_test_1_pic.o two_file_test_1b_pic.o ver_test_8_2.so
1096
ver_test_8_2.so: two_file_test_2_pic.o $(srcdir)/ver_test_8.script gcctestdir/ld
1097
        $(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_8.script two_file_test_2_pic.o
1098
 
1099
check_PROGRAMS += ver_test_9
1100
ver_test_9_SOURCES = ver_test_main.cc
1101
ver_test_9_DEPENDENCIES = gcctestdir/ld ver_test_9.so
1102
ver_test_9_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1103
ver_test_9_LDADD = ver_test_9.so
1104
ver_test_9.so: ver_test_9.o ver_test_4.so ver_test_5.so gcctestdir/ld
1105
        $(CXXLINK) -Bgcctestdir/ -shared -Wl,-R,. ver_test_9.o ver_test_5.so ver_test_4.so
1106
ver_test_9.o: ver_test_9.cc
1107
        $(CXXCOMPILE) -c -fpic -o $@ $<
1108
 
1109
check_SCRIPTS += ver_test_10.sh
1110
check_DATA += ver_test_10.syms
1111
ver_test_10.syms: ver_test_10.so
1112
        $(TEST_READELF) -s $< >$@ 2>/dev/null
1113
ver_test_10.so: gcctestdir/ld ver_test_2.o ver_test_10.script
1114
        $(CXXLINK) -Bgcctestdir/ -shared -Wl,--version-script,$(srcdir)/ver_test_10.script ver_test_2.o
1115
 
1116
check_PROGRAMS += ver_test_11
1117
MOSTLYCLEANFILES += ver_test_11.a
1118
ver_test_11_SOURCES = ver_test_main_2.cc
1119
ver_test_11_DEPENDENCIES = gcctestdir/ld ver_test_11.a
1120
ver_test_11_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1121
ver_test_11_LDADD = ver_test_11.a
1122
ver_test_11.a: ver_test_1.o ver_test_2.o ver_test_4.o
1123
        $(TEST_AR) rc $@ $^
1124
 
1125 159 khays
check_PROGRAMS += ver_test_12
1126
ver_test_12_SOURCES = ver_test_main_2.cc
1127
ver_test_12_DEPENDENCIES = gcctestdir/ld ver_test_12.o
1128
ver_test_12_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1129
ver_test_12_LDADD = ver_test_12.o
1130
ver_test_12.o: gcctestdir/ld ver_test_1.o ver_test_2.o ver_test_4.o
1131
        gcctestdir/ld -r -o $@ ver_test_1.o ver_test_2.o ver_test_4.o
1132
 
1133 27 khays
check_PROGRAMS += protected_1
1134
protected_1_SOURCES = \
1135
        protected_main_1.cc protected_main_2.cc protected_main_3.cc
1136
protected_1_DEPENDENCIES = gcctestdir/ld protected_1.so
1137
protected_1_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1138
protected_1_LDADD = protected_1.so
1139
 
1140
protected_1.so: gcctestdir/ld protected_1_pic.o protected_2_pic.o protected_3_pic.o
1141
        $(CXXLINK) -Bgcctestdir/ -shared protected_1_pic.o protected_2_pic.o protected_3_pic.o
1142
protected_1_pic.o: protected_1.cc
1143
        $(CXXCOMPILE) -c -fpic -o $@ $<
1144
protected_2_pic.o: protected_2.cc
1145
        $(CXXCOMPILE) -c -fpic -o $@ $<
1146
protected_3_pic.o: protected_3.cc
1147
        $(CXXCOMPILE) -c -fpic -o $@ $<
1148
 
1149
check_PROGRAMS += protected_2
1150
protected_2_SOURCES = protected_main_1.cc protected_3.cc
1151
protected_2_DEPENDENCIES = gcctestdir/ld protected_1.so
1152
protected_2_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1153
protected_2_LDADD = protected_1.so
1154
 
1155
check_DATA += protected_3.err
1156
MOSTLYCLEANFILES += protected_3.err
1157
protected_4_pic.o: protected_4.cc
1158
        $(CXXCOMPILE) -c -fpic -o $@ $<
1159
protected_3.err: protected_4_pic.o gcctestdir/ld
1160
        @echo $(CXXLINK) -Bgcctestdir/ -shared -o protected_4.so protected_4_pic.o "2>$@"
1161
        @if $(CXXLINK) -Bgcctestdir/ -shared -o protected_4.so protected_4_pic.o 2>$@; then \
1162
          echo 1>&2 "Link of protected_4.so should have failed"; \
1163
          rm -f $@; \
1164
          exit 1; \
1165
        fi
1166
 
1167
check_PROGRAMS += relro_test
1168
check_SCRIPTS += relro_test.sh
1169
check_DATA += relro_test.stdout
1170
relro_test_SOURCES = relro_test_main.cc
1171
relro_test_DEPENDENCIES = gcctestdir/ld relro_test.so
1172
relro_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1173
relro_test_LDADD = relro_test.so
1174
relro_test.so: gcctestdir/ld relro_test_pic.o
1175
        $(CXXLINK) -Bgcctestdir/ -shared -Wl,-z,relro relro_test_pic.o
1176
relro_test_pic.o: relro_test.cc
1177
        $(CXXCOMPILE) -c -fpic -o $@ $<
1178
relro_test.stdout: relro_test.so
1179
        $(TEST_READELF) -SlW relro_test.so > relro_test.stdout
1180
 
1181 159 khays
check_PROGRAMS += relro_now_test
1182
relro_now_test_SOURCES = relro_test_main.cc
1183
relro_now_test_DEPENDENCIES = gcctestdir/ld relro_now_test.so
1184
relro_now_test_LDFLAGS = -Bgcctestdir -Wl,-R,. -Wl,-z,relro -Wl,-z,now
1185
relro_now_test_LDADD = relro_now_test.so
1186
relro_now_test.so: gcctestdir/ld relro_test_pic.o
1187
        $(CXXLINK) -Bgcctestdir/ -shared -Wl,-z,relro -Wl,-z,now relro_test_pic.o
1188
 
1189 27 khays
check_PROGRAMS += relro_strip_test
1190
relro_strip_test_SOURCES = relro_test_main.cc
1191
relro_strip_test_DEPENDENCIES = gcctestdir/ld relro_strip_test.so
1192
relro_strip_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1193
relro_strip_test_LDADD = relro_strip_test.so
1194
relro_strip_test.so: relro_test.so
1195
        $(TEST_STRIP) -o $@ $<
1196
 
1197
check_PROGRAMS += relro_script_test
1198
relro_script_test_SOURCES = relro_test_main.cc
1199
relro_script_test_DEPENDENCIES = gcctestdir/ld relro_script_test.so
1200
relro_script_test_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1201
relro_script_test_LDADD = relro_script_test.so
1202
relro_script_test.so: gcctestdir/ld relro_script_test.t relro_test_pic.o
1203
        $(CXXLINK) -Bgcctestdir/ -shared -Wl,-z,relro -T $(srcdir)/relro_script_test.t relro_test_pic.o
1204
 
1205
check_PROGRAMS += script_test_1
1206
script_test_1_SOURCES = script_test_1.cc
1207
script_test_1_DEPENDENCIES = gcctestdir/ld script_test_1.t
1208
script_test_1_LDFLAGS = -Bgcctestdir/ -Wl,-R,. -T $(srcdir)/script_test_1.t
1209
script_test_1_LDADD =
1210
 
1211
check_PROGRAMS += script_test_2
1212
script_test_2_SOURCES = script_test_2.cc script_test_2a.cc script_test_2b.cc
1213
script_test_2_DEPENDENCIES = gcctestdir/ld script_test_2.t
1214
script_test_2_LDFLAGS = -Bgcctestdir/ -Wl,-R,. -T $(srcdir)/script_test_2.t
1215
script_test_2_LDADD =
1216
 
1217
check_PROGRAMS += justsyms
1218
justsyms_SOURCES = justsyms_1.cc
1219
justsyms_DEPENDENCIES = gcctestdir/ld justsyms_2r.o
1220
justsyms_LDFLAGS = -Bgcctestdir/ -Wl,-R,justsyms_2r.o
1221
justsyms_LDADD =
1222
justsyms_2.o: justsyms_2.cc
1223
        $(CXXCOMPILE) -c -o $@ $<
1224
justsyms_2r.o: justsyms_2.o gcctestdir/ld $(srcdir)/justsyms.t
1225
        gcctestdir/ld -o $@ -r -T $(srcdir)/justsyms.t justsyms_2.o
1226
 
1227 159 khays
check_PROGRAMS += justsyms_exec
1228
justsyms_exec_SOURCES = justsyms_exec.c
1229
justsyms_exec_DEPENDENCIES = gcctestdir/ld justsyms_lib
1230
justsyms_exec_LDFLAGS = -Bgcctestdir/ -Wl,-R,justsyms_lib
1231
justsyms_exec_LDADD =
1232
justsyms_lib.o: justsyms_lib.c
1233
        $(COMPILE) -c -o $@ $<
1234
justsyms_lib: justsyms_lib.o gcctestdir/ld
1235
        gcctestdir/ld -o $@ -Ttext=0x1000200 -Tdata=0x2000000 -e exported_func justsyms_lib.o
1236
 
1237 27 khays
check_PROGRAMS += binary_test
1238
MOSTLYCLEANFILES += binary.txt
1239
binary_test_SOURCES = binary_test.cc
1240
binary_test_DEPENDENCIES = gcctestdir/ld binary.txt
1241
binary_test_LDFLAGS = -Bgcctestdir/ -Wl,--format,binary,binary.txt,--format,elf
1242
binary_test_LDADD =
1243
# Copy the file to the build directory to avoid worrying about the
1244
# full pathname in the generated symbols.
1245
binary.txt: $(srcdir)/binary.in
1246
        rm -f $@
1247
        $(LN_S) $< $@
1248
 
1249
check_SCRIPTS += ver_matching_test.sh
1250
check_DATA += ver_matching_test.stdout
1251
MOSTLYCLEANFILES += ver_matching_test.stdout
1252
ver_matching_def.so: ver_matching_def_pic.o $(srcdir)/version_script.map gcctestdir/ld
1253
        $(CXXLINK) -O0 -Bgcctestdir/ -shared ver_matching_def_pic.o -Wl,--version-script=$(srcdir)/version_script.map
1254
ver_matching_def_pic.o: ver_matching_def.cc
1255
        $(CXXCOMPILE) -O0 -c -fpic -o $@ $<
1256
ver_matching_test.stdout: ver_matching_def.so
1257
        $(TEST_OBJDUMP) -T ver_matching_def.so | $(TEST_CXXFILT) > ver_matching_test.stdout
1258
 
1259
check_PROGRAMS += script_test_3
1260
check_SCRIPTS += script_test_3.sh
1261
check_DATA += script_test_3.stdout
1262
MOSTLYCLEANFILES += script_test_3.stdout
1263
script_test_3: basic_test.o gcctestdir/ld script_test_3.t
1264
        $(CXXLINK) -Bgcctestdir/ basic_test.o -T $(srcdir)/script_test_3.t
1265
script_test_3.stdout: script_test_3
1266
        $(TEST_READELF) -SlW script_test_3 > script_test_3.stdout
1267
 
1268
check_PROGRAMS += tls_phdrs_script_test
1269
tls_phdrs_script_test_SOURCES = $(tls_test_SOURCES)
1270
tls_phdrs_script_test_DEPENDENCIES = $(tls_test_DEPENDENCIES) $(srcdir)/script_test_3.t
1271
tls_phdrs_script_test_LDFLAGS = $(tls_test_LDFLAGS) -T $(srcdir)/script_test_3.t
1272
tls_phdrs_script_test_LDADD = $(tls_test_LDADD)
1273
 
1274
check_SCRIPTS += script_test_4.sh
1275
check_DATA += script_test_4.stdout
1276
MOSTLYCLEANFILES += script_test_4
1277
script_test_4: basic_test.o gcctestdir/ld $(srcdir)/script_test_4.t
1278
        $(CXXLINK) -Bgcctestdir/ basic_test.o -T $(srcdir)/script_test_4.t
1279
script_test_4.stdout: script_test_4
1280
        $(TEST_READELF) -SlW script_test_4 > script_test_4.stdout
1281
 
1282
check_PROGRAMS += tls_script_test
1283
tls_script_test_SOURCES = $(tls_test_SOURCES)
1284
tls_script_test_DEPENDENCIES = $(tls_test_DEPENDENCIES) $(srcdir)/script_test_4.t
1285
tls_script_test_LDFLAGS = $(tls_test_LDFLAGS) -T $(srcdir)/script_test_4.t
1286
tls_script_test_LDADD = $(tls_test_LDADD)
1287
 
1288
check_SCRIPTS += script_test_5.sh
1289
check_DATA += script_test_5.stdout
1290
MOSTLYCLEANFILES += script_test_5
1291
script_test_5: script_test_5.o gcctestdir/ld $(srcdir)/script_test_5.t
1292
        $(CXXLINK) -Bgcctestdir/ script_test_5.o -T $(srcdir)/script_test_5.t
1293
script_test_5.stdout: script_test_5
1294
        $(TEST_READELF) -SW script_test_5 > script_test_5.stdout
1295
 
1296
check_SCRIPTS += script_test_6.sh
1297
check_DATA += script_test_6.stdout
1298
MOSTLYCLEANFILES += script_test_6
1299
script_test_6: basic_test.o gcctestdir/ld $(srcdir)/script_test_6.t
1300
        $(CXXLINK) -Bgcctestdir/ basic_test.o -T $(srcdir)/script_test_6.t \
1301
        -Wl,-Ttext=0x10001000 -Wl,-Tdata=0x10200000 -Wl,-Tbss=0x10400000
1302
script_test_6.stdout: script_test_6
1303
        $(TEST_READELF) -SlW script_test_6 > script_test_6.stdout
1304
 
1305
check_SCRIPTS += script_test_7.sh
1306
check_DATA += script_test_7.stdout
1307
MOSTLYCLEANFILES += script_test_7
1308
script_test_7: basic_test.o gcctestdir/ld $(srcdir)/script_test_7.t
1309
        $(CXXLINK) -Bgcctestdir/ basic_test.o -T $(srcdir)/script_test_7.t
1310
script_test_7.stdout: script_test_7
1311
        $(TEST_READELF) -SlW script_test_7 > script_test_7.stdout
1312
 
1313
check_SCRIPTS += script_test_8.sh
1314
check_DATA += script_test_8.stdout
1315
MOSTLYCLEANFILES += script_test_8
1316
script_test_8: basic_test.o gcctestdir/ld $(srcdir)/script_test_7.t
1317
        $(CXXLINK) -Bgcctestdir/ basic_test.o -T $(srcdir)/script_test_7.t \
1318
        -Wl,-Ttext=0x20001000 -Wl,-Tdata=0x20200000 -Wl,-Tbss=0x20400000
1319
script_test_8.stdout: script_test_8
1320
        $(TEST_READELF) -SlW script_test_8 > script_test_8.stdout
1321
 
1322
 
1323
check_SCRIPTS += script_test_9.sh
1324
check_DATA += script_test_9.stdout
1325
script_test_9.o: script_test_9.cc
1326
        $(CXXCOMPILE) -O0 -c -o $@ $<
1327
script_test_9: gcctestdir/ld $(srcdir)/script_test_9.t script_test_9.o
1328
        $(CXXLINK) -Bgcctestdir/ script_test_9.o -T $(srcdir)/script_test_9.t
1329
script_test_9.stdout: script_test_9
1330
        $(TEST_READELF) -lW script_test_9 > script_test_9.stdout
1331
 
1332
 
1333
# Test --dynamic-list, --dynamic-list-data, --dynamic-list-cpp-new,
1334
# and --dynamic-list-cpp-typeinfo
1335
 
1336
check_SCRIPTS += dynamic_list.sh
1337
check_DATA += dynamic_list.stdout
1338
MOSTLYCLEANFILES += dynamic_list dynamic_list.stdout
1339
dynamic_list: basic_test.o gcctestdir/ld $(srcdir)/dynamic_list.t
1340
        $(CXXLINK) -Bgcctestdir/ basic_test.o \
1341
          -Wl,--dynamic-list $(srcdir)/dynamic_list.t \
1342
          -Wl,--dynamic-list-data \
1343
          -Wl,--dynamic-list-cpp-new \
1344
          -Wl,--dynamic-list-cpp-typeinfo
1345
dynamic_list.stdout: dynamic_list
1346
        $(TEST_READELF) -W --dyn-syms dynamic_list > dynamic_list.stdout
1347
 
1348
check_PROGRAMS += thin_archive_test_1
1349
MOSTLYCLEANFILES += libthin1.a libthin3.a libthinall.a \
1350
        alt/thin_archive_test_2.o alt/thin_archive_test_4.o \
1351
        alt/libthin2.a alt/libthin4.a
1352
thin_archive_test_1_SOURCES = thin_archive_main.cc
1353
thin_archive_test_1_DEPENDENCIES = gcctestdir/ld libthin1.a alt/libthin2.a
1354
thin_archive_test_1_LDFLAGS = -Bgcctestdir/ -Lalt
1355
thin_archive_test_1_LDADD = libthin1.a -lthin2
1356
 
1357
check_PROGRAMS += thin_archive_test_2
1358
thin_archive_test_2_SOURCES = thin_archive_main.cc
1359
thin_archive_test_2_DEPENDENCIES = gcctestdir/ld libthinall.a
1360
thin_archive_test_2_LDFLAGS = -Bgcctestdir/ -L.
1361
thin_archive_test_2_LDADD = -lthinall
1362
 
1363
libthin1.a: thin_archive_test_1.o alt/thin_archive_test_2.o
1364
        rm -f $@
1365
        $(TEST_AR) crT $@ $^
1366
alt/libthin2.a: thin_archive_test_3.o alt/thin_archive_test_4.o
1367
        rm -f $@
1368
        $(TEST_AR) crT $@ $^
1369
libthin3.a: thin_archive_test_1.o alt/thin_archive_test_4.o
1370
        rm -f $@
1371
        $(TEST_AR) crT $@ $^
1372
alt/libthin4.a: alt/thin_archive_test_2.o thin_archive_test_3.o
1373
        rm -f $@
1374
        $(TEST_AR) crT $@ $^
1375
libthinall.a: libthin3.a alt/libthin4.a
1376
        rm -f $@
1377
        $(TEST_AR) crT $@ $^
1378
alt/thin_archive_test_2.o: thin_archive_test_2.cc
1379
        test -d alt || mkdir -p alt
1380
        $(CXXCOMPILE) -c -o $@ $<
1381
alt/thin_archive_test_4.o: thin_archive_test_4.cc
1382
        test -d alt || mkdir -p alt
1383
        $(CXXCOMPILE) -c -o $@ $<
1384
 
1385
if PLUGINS
1386
 
1387
check_PROGRAMS += plugin_test_1
1388
check_SCRIPTS += plugin_test_1.sh
1389
check_DATA += plugin_test_1.err
1390
MOSTLYCLEANFILES += plugin_test_1.err
1391
plugin_test_1: two_file_test_main.o two_file_test_1.syms two_file_test_1b.syms two_file_test_2.syms empty.syms gcctestdir/ld plugin_test.so
1392
        $(CXXLINK) -Bgcctestdir/ -Wl,--no-demangle,--plugin,"./plugin_test.so",--plugin-opt,"_Z4f13iv" two_file_test_main.o two_file_test_1.syms two_file_test_1b.syms two_file_test_2.syms empty.syms 2>plugin_test_1.err
1393
plugin_test_1.err: plugin_test_1
1394
        @touch plugin_test_1.err
1395
 
1396
check_PROGRAMS += plugin_test_2
1397
check_SCRIPTS += plugin_test_2.sh
1398
check_DATA += plugin_test_2.err
1399
MOSTLYCLEANFILES += plugin_test_2.err
1400
plugin_test_2: two_file_test_main.o two_file_test_1.syms two_file_test_1b.syms two_file_shared_2.so gcctestdir/ld plugin_test.so
1401
        $(CXXLINK) -Bgcctestdir/ -Wl,--no-demangle,-R,.,--plugin,"./plugin_test.so" two_file_test_main.o two_file_test_1.syms two_file_test_1b.syms two_file_shared_2.so 2>plugin_test_2.err
1402
plugin_test_2.err: plugin_test_2
1403
        @touch plugin_test_2.err
1404
 
1405
check_PROGRAMS += plugin_test_3
1406
check_SCRIPTS += plugin_test_3.sh
1407
check_DATA += plugin_test_3.err
1408
MOSTLYCLEANFILES += plugin_test_3.err
1409
plugin_test_3: two_file_test_main.o two_file_test_1.syms two_file_test_1b.syms two_file_test_2.syms empty.syms gcctestdir/ld plugin_test.so
1410
        $(CXXLINK) -Bgcctestdir/ -Wl,--export-dynamic -Wl,--no-demangle,--plugin,"./plugin_test.so",--plugin-opt,"_Z4f13iv" two_file_test_main.o two_file_test_1.syms two_file_test_1b.syms two_file_test_2.syms empty.syms 2>plugin_test_3.err
1411
plugin_test_3.err: plugin_test_3
1412
        @touch plugin_test_3.err
1413
 
1414
check_PROGRAMS += plugin_test_4
1415
check_SCRIPTS += plugin_test_4.sh
1416
check_DATA += plugin_test_4.err
1417
MOSTLYCLEANFILES += plugin_test_4.a plugin_test_4.err
1418
plugin_test_4: two_file_test_main.o plugin_test_4.a gcctestdir/ld plugin_test.so
1419
        $(CXXLINK) -Bgcctestdir/ -Wl,--no-demangle,--plugin,"./plugin_test.so",--plugin-opt,"_Z4f13iv" two_file_test_main.o -Wl,--whole-archive,plugin_test_4.a,--no-whole-archive 2>plugin_test_4.err
1420
plugin_test_4.err: plugin_test_4
1421
        @touch plugin_test_4.err
1422
 
1423
plugin_test_4.a: two_file_test_1.syms two_file_test_1b.syms two_file_test_2.syms
1424
        $(TEST_AR) cr $@ $^
1425
 
1426
check_PROGRAMS += plugin_test_5
1427
plugin_test_5: two_file_test_main.o two_file_test_1.syms two_file_test_1b.syms two_file_test_2.syms unused.syms gcctestdir/ld plugin_test.so
1428
        $(CXXLINK) -Bgcctestdir/ -Wl,--no-demangle,--plugin,"./plugin_test.so",--plugin-opt,"_Z4f13iv",--gc-sections two_file_test_main.o two_file_test_1.syms two_file_test_1b.syms two_file_test_2.syms unused.syms
1429
 
1430
check_PROGRAMS += plugin_test_6
1431
check_SCRIPTS += plugin_test_6.sh
1432
check_DATA += plugin_test_6.err
1433
MOSTLYCLEANFILES += plugin_test_6.err
1434
plugin_test_6: plugin_common_test_1.syms plugin_common_test_2.syms gcctestdir/ld plugin_test.so
1435
        $(CXXLINK) -Bgcctestdir/ -Wl,--no-demangle,--plugin,"./plugin_test.so" plugin_common_test_1.syms plugin_common_test_2.syms 2>plugin_test_6.err
1436
plugin_test_6.err: plugin_test_6
1437
        @touch plugin_test_6.err
1438
 
1439
check_PROGRAMS += plugin_test_7
1440
check_SCRIPTS += plugin_test_7.sh
1441
check_DATA += plugin_test_7.err plugin_test_7.syms
1442
MOSTLYCLEANFILES += plugin_test_7.err
1443
plugin_test_7: plugin_test_7_1.o plugin_test_7_1.syms plugin_test_7_2.o gcctestdir/ld plugin_test.so
1444
        $(LINK) -Bgcctestdir/ -Wl,--no-demangle,--plugin,"./plugin_test.so",--gc-sections,--print-gc-sections plugin_test_7_1.syms plugin_test_7_2.o 2>plugin_test_7.err
1445
plugin_test_7.syms: plugin_test_7
1446
        $(TEST_READELF) -sW $< >$@ 2>/dev/null
1447
plugin_test_7_1.o: plugin_test_7_1.c
1448
        $(COMPILE) -DLTO -O0 -c -ffunction-sections -fdata-sections -o $@ $<
1449
plugin_test_7_1_orig.o: plugin_test_7_1.c
1450
        $(COMPILE) -O0 -c -ffunction-sections -fdata-sections -o $@ $<
1451
plugin_test_7_1.syms: plugin_test_7_1_orig.o
1452
        $(TEST_READELF) -sW $< >$@ 2>/dev/null
1453
plugin_test_7_2.o: plugin_test_7_2.c
1454
        $(COMPILE) -O0 -c -ffunction-sections -fdata-sections -o $@ $<
1455
plugin_test_7.err: plugin_test_7
1456
 
1457
# Test plugins with -r.
1458
check_PROGRAMS += plugin_test_8
1459
plugin_test_8.o: two_file_test_main.o two_file_test_1.syms two_file_test_1b.syms two_file_test_2.o ../ld-new plugin_test.so
1460
        ../ld-new -r -o $@ --no-demangle --plugin "./plugin_test.so" two_file_test_main.o two_file_test_1.syms two_file_test_1b.syms two_file_test_2.o
1461
plugin_test_8: plugin_test_8.o gcctestdir/ld
1462
        $(CXXLINK) -Bgcctestdir/ -Wl,--no-demangle plugin_test_8.o
1463
 
1464
# Test that symbols known in the IR file but not in the replacement file
1465
# produce an unresolved symbol error.
1466
check_DATA += plugin_test_9.err
1467
MOSTLYCLEANFILES += plugin_test_9.err
1468
plugin_test_9.err: two_file_test_main.o two_file_test_1c.syms two_file_test_2.syms gcctestdir/ld plugin_test.so
1469
        @echo $(CXXLINK) -Bgcctestdir/ -o plugin_test_9 -Wl,--no-demangle,--plugin,"./plugin_test.so" two_file_test_main.o two_file_test_1c.syms two_file_test_2.syms "2>$@"
1470
        @if $(CXXLINK) -Bgcctestdir/ -o plugin_test_9 -Wl,--no-demangle,--plugin,"./plugin_test.so" two_file_test_main.o two_file_test_1c.syms two_file_test_2.syms 2>$@; then \
1471
          echo 1>&2 "Link of plugin_test_9 should have failed"; \
1472
          rm -f $@; \
1473
          exit 1; \
1474
        fi
1475
# Make a .syms file that claims to define the symbol _Z4t16av.
1476
two_file_test_1c.syms: two_file_test_1.syms two_file_test_1c.o
1477
        cp two_file_test_1.syms $@.tmp
1478
        grep "_Z4t16av" two_file_test_1b.syms >> $@.tmp
1479
        mv -f $@.tmp $@
1480
# Make a copy of two_file_test_1.o, which does not define the symbol _Z4t16av.
1481
MOSTLYCLEANFILES += two_file_test_1c.o
1482
two_file_test_1c.o: two_file_test_1.o
1483
        cp two_file_test_1.o $@
1484
 
1485
plugin_test.so: plugin_test.o
1486
        $(LINK) -Bgcctestdir/ -shared plugin_test.o
1487
plugin_test.o: plugin_test.c
1488
        $(COMPILE) -O0 -c -fpic -o $@ $<
1489
 
1490
two_file_test_main.syms: two_file_test_main.o
1491
        $(TEST_READELF) -sW $< >$@ 2>/dev/null
1492
two_file_test_1.syms: two_file_test_1.o
1493
        $(TEST_READELF) -sW $< >$@ 2>/dev/null
1494
two_file_test_1b.syms: two_file_test_1b.o
1495
        $(TEST_READELF) -sW $< >$@ 2>/dev/null
1496
two_file_test_2.syms: two_file_test_2.o
1497
        $(TEST_READELF) -sW $< >$@ 2>/dev/null
1498
plugin_common_test_1.syms: plugin_common_test_1.o
1499
        $(TEST_READELF) -sW $< >$@ 2>/dev/null
1500
plugin_common_test_2.syms: plugin_common_test_2.o
1501
        $(TEST_READELF) -sW $< >$@ 2>/dev/null
1502
 
1503
empty.syms:
1504
        @echo "" >$@
1505
        @echo "Symbol table" >>$@
1506
 
1507
MOSTLYCLEANFILES += unused.c
1508
unused.syms: unused.o
1509
        $(TEST_READELF) -sW $< >$@ 2>/dev/null
1510
        @echo "     1: 00000000     4 FUNC    GLOBAL DEFAULT    1 UNUSED" >>$@
1511
unused.o: unused.c
1512
        $(COMPILE) -c -o $@ $<
1513
unused.c:
1514
        @cp /dev/null $@
1515
 
1516 163 khays
check_SCRIPTS += plugin_final_layout.sh
1517
check_DATA += plugin_final_layout.stdout
1518
plugin_final_layout.o: plugin_final_layout.cc
1519
        $(CXXCOMPILE) -O0 -c -ffunction-sections  -fdata-sections -g -o $@ $<
1520
plugin_final_layout: plugin_final_layout.o plugin_section_order.so gcctestdir/ld
1521
        $(CXXLINK) -Bgcctestdir/ -Wl,--plugin,"./plugin_section_order.so" plugin_final_layout.o
1522
plugin_final_layout.stdout: plugin_final_layout
1523
        $(TEST_NM) -n plugin_final_layout > plugin_final_layout.stdout
1524
 
1525
plugin_section_order.so: plugin_section_order.o
1526
        $(LINK) -Bgcctestdir/ -shared plugin_section_order.o
1527
plugin_section_order.o: plugin_section_order.c
1528
        $(COMPILE) -O0 -c -fpic -o $@ $<
1529
 
1530 27 khays
endif PLUGINS
1531
 
1532
check_PROGRAMS += exclude_libs_test
1533
check_SCRIPTS += exclude_libs_test.sh
1534
check_DATA += exclude_libs_test.syms
1535
MOSTLYCLEANFILES += exclude_libs_test.syms libexclude_libs_test_1.a \
1536
        libexclude_libs_test_2.a alt/libexclude_libs_test_3.a
1537
exclude_libs_test_SOURCES = exclude_libs_test.c
1538
exclude_libs_test_DEPENDENCIES = gcctestdir/ld libexclude_libs_test_1.a \
1539
        libexclude_libs_test_2.a alt/libexclude_libs_test_3.a
1540
exclude_libs_test_LDFLAGS = -Bgcctestdir/ -L. -Lalt \
1541
        -Wl,--exclude-libs,dummy:libexclude_libs_test_1 \
1542
        -Wl,--exclude-libs,libexclude_libs_test_3
1543
exclude_libs_test_LDADD = -lexclude_libs_test_1 -lexclude_libs_test_2 \
1544
        alt/libexclude_libs_test_3.a
1545
exclude_libs_test.syms: exclude_libs_test
1546
        $(TEST_READELF) -sW $< >$@ 2>/dev/null
1547
libexclude_libs_test_1.a: exclude_libs_test_1.o
1548
        $(TEST_AR) rc $@ $^
1549
libexclude_libs_test_2.a: exclude_libs_test_2.o
1550
        $(TEST_AR) rc $@ $^
1551
alt/libexclude_libs_test_3.a: exclude_libs_test_3.o
1552
        test -d alt || mkdir -p alt
1553
        $(TEST_AR) rc $@ $^
1554
 
1555
check_PROGRAMS += local_labels_test
1556
local_labels_test.o: ver_test_6.c
1557
        $(COMPILE) -g -c -Wa,-L -o $@ $<
1558
local_labels_test: local_labels_test.o
1559
        $(LINK) -Bgcctestdir/ local_labels_test.o
1560
 
1561
check_PROGRAMS += discard_locals_test
1562
check_SCRIPTS += discard_locals_test.sh
1563
check_DATA += discard_locals_test.syms \
1564
        discard_locals_relocatable_test1.syms \
1565
        discard_locals_relocatable_test2.syms
1566
MOSTLYCLEANFILES += discard_locals_test.syms \
1567
        discard_locals_relocatable_test1.syms \
1568
        discard_locals_relocatable_test2.syms \
1569
        discard_locals_relocatable_test1.out \
1570
        discard_locals_relocatable_test2.out
1571
discard_locals_test_SOURCES = discard_locals_test.c
1572
discard_locals_test_LDFLAGS = -Bgcctestdir/ -Wl,--discard-locals
1573
discard_locals_test.syms: discard_locals_test
1574
        $(TEST_READELF) -sW $< >$@ 2>/dev/null
1575
# '-Wa,-L' is required to preserve the local label used for testing.
1576
discard_locals_test.o: discard_locals_test.c
1577
        $(COMPILE) -c -Wa,-L -o $@ $<
1578
 
1579
discard_locals_relocatable_test1.syms: discard_locals_relocatable_test1.out
1580
        $(TEST_READELF) -sW $< >$@ 2>/dev/null
1581
discard_locals_relocatable_test.o: discard_locals_relocatable_test.c
1582
        $(COMPILE) -c -Wa,-L -fPIC -o $@ $<
1583
discard_locals_relocatable_test1.out: discard_locals_relocatable_test.o ../ld-new
1584
        ../ld-new --discard-locals -relocatable -o $@ $<
1585
 
1586
discard_locals_relocatable_test2.syms: discard_locals_relocatable_test2.out
1587
        $(TEST_READELF) -sW $< >$@ 2>/dev/null
1588
discard_locals_relocatable_test2.out: discard_locals_relocatable_test.o ../ld-new
1589
        ../ld-new --discard-all -relocatable -o $@ $<
1590
 
1591
if MCMODEL_MEDIUM
1592
check_PROGRAMS += large
1593
large_SOURCES = large.c
1594
large_CFLAGS = -mcmodel=medium
1595
large_DEPENDENCIES = gcctestdir/ld
1596
large_LDFLAGS = -Bgcctestdir/
1597
large_LDADD =
1598
endif MCMODEL_MEDIUM
1599
 
1600
# Test that hidden and internal symbols in the main program cannot be
1601
# referenced by a shared library.
1602
check_SCRIPTS += hidden_test.sh
1603
check_DATA += hidden_test.err
1604
MOSTLYCLEANFILES += hidden_test hidden_test.err
1605
libhidden.so: hidden_test_1.c gcctestdir/ld
1606
        $(COMPILE) -Bgcctestdir/ -g -shared -fPIC -w -o $@ $(srcdir)/hidden_test_1.c
1607
hidden_test: hidden_test_main.o libhidden.so gcctestdir/ld
1608
        $(LINK) -Bgcctestdir/ -Wl,-R,. hidden_test_main.o libhidden.so 2>hidden_test.err
1609
hidden_test.err: hidden_test
1610
        @touch hidden_test.err
1611
 
1612
# Test -retain-symbols-file.
1613
check_SCRIPTS += retain_symbols_file_test.sh
1614
check_DATA += retain_symbols_file_test.stdout
1615
MOSTLYCLEANFILES += retain_symbols_file_test retain_symbols_file_test.in \
1616
                    retain_symbols_file_test.stdout
1617
retain_symbols_file_test.so: basic_pic_test.o gcctestdir/ld
1618
        echo 'main' > retain_symbols_file_test.in
1619
        echo 't1' >> retain_symbols_file_test.in
1620
        echo '_ZN4t16bC1Ev' >> retain_symbols_file_test.in
1621
        echo '_ZNK4t20a3getEv' >> retain_symbols_file_test.in
1622
        echo '_Z3t18v' >> retain_symbols_file_test.in
1623
        echo '__tcf_0' >> retain_symbols_file_test.in
1624
        $(CXXLINK) -Bgcctestdir/ -shared -Wl,-retain-symbols-file,retain_symbols_file_test.in basic_pic_test.o
1625
retain_symbols_file_test.stdout: retain_symbols_file_test.so
1626
        $(TEST_NM) -C retain_symbols_file_test.so > $@
1627
 
1628
 
1629
# Test that if the output file already exists and is empty,
1630
# it will get execute permission.
1631
check_PROGRAMS += permission_test
1632
permission_test: basic_test.o gcctestdir/ld
1633
        umask 022; \
1634
        rm -f $@; \
1635
        touch $@; \
1636
        chmod 600 $@; \
1637
        $(CXXLINK) -Bgcctestdir/ basic_test.o
1638
 
1639
# Check -l:foo.a
1640
check_PROGRAMS += searched_file_test
1641
MOSTLYCLEANFILES += searched_file_test searched_file_test_lib.o \
1642
                    alt/searched_file_test_lib.a
1643
searched_file_test_SOURCES = searched_file_test.cc
1644
searched_file_test_DEPENDENCIES = alt/searched_file_test_lib.a
1645
searched_file_test_LDFLAGS = -Bgcctestdir/ -Lalt
1646
searched_file_test_LDADD = -l:searched_file_test_lib.a
1647
searched_file_test_lib.o: searched_file_test_lib.cc
1648
        $(CXXCOMPILE) -c -o $@ $<
1649
alt/searched_file_test_lib.a: searched_file_test_lib.o
1650
        test -d alt || mkdir -p alt
1651
        $(TEST_AR) rc $@ $^
1652
 
1653
# Test that no .gnu.version sections are created when
1654
# symbol versioning is not used.
1655
check_SCRIPTS += no_version_test.sh
1656
check_DATA += no_version_test.stdout
1657
MOSTLYCLEANFILES += libno_version_test.so no_version_test.stdout
1658
# We invoke the linker directly since gcc may include additional objects that
1659
# uses symbol versioning.
1660
libno_version_test.so: no_version_test.o gcctestdir/ld
1661
        gcctestdir/ld -shared -o $@ no_version_test.o
1662
no_version_test.o: no_version_test.c
1663
        $(COMPILE) -o $@ -c -fPIC $<
1664
no_version_test.stdout: libno_version_test.so
1665
        $(TEST_OBJDUMP) -h $< > $@
1666
 
1667
# Test STT_GNU_IFUNC symbols.
1668
if IFUNC
1669
 
1670
ifuncmod1.o: ifuncmod1.c
1671
        $(COMPILE) -c -fpic -o $@ $<
1672
ifuncmod1.so: ifuncmod1.o gcctestdir/ld
1673
        $(LINK) -Bgcctestdir/ -shared ifuncmod1.o
1674
 
1675
ifuncdep1.o: ifuncmod1.c
1676
        $(COMPILE) -c -o $@ $<
1677
 
1678
ifuncmain1pic.o: ifuncmain1.c
1679
        $(COMPILE) -c -fpic -o $@ $<
1680
ifuncmain1pie.o: ifuncmain1.c
1681
        $(COMPILE) -c -fpie -o $@ $<
1682
 
1683 159 khays
if HAVE_STATIC
1684 163 khays
if IFUNC_STATIC
1685 27 khays
check_PROGRAMS += ifuncmain1static
1686
ifuncmain1static_SOURCES = ifuncmain1.c
1687
ifuncmain1static_DEPENDENCIES = gcctestdir/ld ifuncdep1.o
1688
ifuncmain1static_LDFLAGS = -Bgcctestdir/ -static
1689
ifuncmain1static_LDADD = ifuncdep1.o
1690
 
1691
check_PROGRAMS += ifuncmain1picstatic
1692
ifuncmain1picstatic: ifuncmain1pic.o ifuncmod1.o gcctestdir/ld
1693
        $(LINK) -Bgcctestdir/ -static ifuncmain1pic.o ifuncmod1.o
1694 159 khays
endif
1695 163 khays
endif
1696 27 khays
 
1697
check_PROGRAMS += ifuncmain1
1698
ifuncmain1_SOURCES = ifuncmain1.c
1699
ifuncmain1_DEPENDENCIES = gcctestdir/ld ifuncmod1.so
1700
ifuncmain1_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1701
ifuncmain1_LDADD = ifuncmod1.so
1702
 
1703
check_PROGRAMS += ifuncmain1pic
1704
ifuncmain1pic: ifuncmain1pic.o ifuncmod1.so gcctestdir/ld
1705
        $(LINK) -Bgcctestdir/ ifuncmain1pic.o ifuncmod1.so -Wl,-R,.
1706
 
1707
check_PROGRAMS += ifuncmain1vis
1708
ifuncmain1vis_SOURCES = ifuncmain1vis.c
1709
ifuncmain1vis_DEPENDENCIES = gcctestdir/ld ifuncmod1.so
1710
ifuncmain1vis_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1711
ifuncmain1vis_LDADD = ifuncmod1.so
1712
 
1713
check_PROGRAMS += ifuncmain1vispic
1714
ifuncmain1vispic.o: ifuncmain1vis.c
1715
        $(COMPILE) -c -fpic -o $@ $<
1716
ifuncmain1vispic: ifuncmain1vispic.o ifuncmod1.so gcctestdir/ld
1717
        $(LINK) -Bgcctestdir/ ifuncmain1pic.o ifuncmod1.so -Wl,-R,.
1718
 
1719
check_PROGRAMS += ifuncmain1staticpic
1720
ifuncmain1staticpic: ifuncmain1pic.o ifuncmod1.o gcctestdir/ld
1721
        $(LINK) -Bgcctestdir/ ifuncmain1pic.o ifuncmod1.o
1722
 
1723
check_PROGRAMS += ifuncmain1pie
1724
ifuncmain1pie: ifuncmain1pie.o ifuncmod1.so gcctestdir/ld
1725
        $(LINK) -Bgcctestdir/ -pie ifuncmain1pie.o ifuncmod1.so -Wl,-R,.
1726
 
1727
check_PROGRAMS += ifuncmain1vispie
1728
ifuncmain1vispie.o: ifuncmain1vis.c
1729
        $(COMPILE) -c -fpie -o $@ $<
1730
ifuncmain1vispie: ifuncmain1vispie.o ifuncmod1.so gcctestdir/ld
1731
        $(LINK) -Bgcctestdir/ -pie ifuncmain1vispie.o ifuncmod1.so -Wl,-R,.
1732
 
1733
check_PROGRAMS += ifuncmain1staticpie
1734
ifuncmain1staticpie: ifuncmain1pie.o ifuncmod1.o gcctestdir/ld
1735
        $(LINK) -Bgcctestdir/ -pie ifuncmain1pie.o ifuncmod1.o
1736
 
1737
ifuncmain2pic.o: ifuncmain2.c
1738
        $(COMPILE) -c -fpic -o $@ $<
1739
 
1740
ifuncdep2pic.o: ifuncdep2.c
1741
        $(COMPILE) -c -fpic -o $@ $<
1742
 
1743 159 khays
if HAVE_STATIC
1744 163 khays
if IFUNC_STATIC
1745 27 khays
check_PROGRAMS += ifuncmain2static
1746
ifuncmain2static_SOURCES = ifuncmain2.c ifuncdep2.c
1747
ifuncmain2static_DEPENDENCIES = gcctestdir/ld
1748
ifuncmain2static_LDFLAGS = -Bgcctestdir/ -static
1749
ifuncmain2static_LDADD =
1750
 
1751
check_PROGRAMS += ifuncmain2picstatic
1752
ifuncmain2picstatic: ifuncmain2pic.o ifuncdep2pic.o gcctestdir/ld
1753
        $(LINK) -Bgcctestdir/ -static ifuncmain2pic.o ifuncdep2pic.o
1754 159 khays
endif
1755 163 khays
endif
1756 27 khays
 
1757
check_PROGRAMS += ifuncmain2
1758
ifuncmain2_SOURCES = ifuncmain2.c ifuncdep2.c
1759
ifuncmain2_DEPENDENCIES = gcctestdir/ld
1760
ifuncmain2_LDFLAGS = -Bgcctestdir/
1761
ifuncmain2_LDADD =
1762
 
1763
check_PROGRAMS += ifuncmain2pic
1764
ifuncmain2pic: ifuncmain2pic.o ifuncdep2pic.o gcctestdir/ld
1765
        $(LINK) -Bgcctestdir/ ifuncmain2pic.o ifuncdep2pic.o
1766
 
1767
ifuncmod3.o: ifuncmod3.c
1768
        $(COMPILE) -c -fpic -o $@ $<
1769
ifuncmod3.so: ifuncmod3.o gcctestdir/ld
1770
        $(LINK) -Bgcctestdir/ -shared ifuncmod3.o
1771
 
1772
check_PROGRAMS += ifuncmain3
1773
ifuncmain3_SOURCES = ifuncmain3.c
1774
ifuncmain3_DEPENDENCIES = gcctestdir/ld ifuncmod3.so
1775
ifuncmain3_LDFLAGS = -Bgcctestdir/ -Wl,--export-dynamic -Wl,-R,.
1776
ifuncmain3_LDADD = -ldl
1777
 
1778
ifuncmain4pic.o: ifuncmain4.c
1779
        $(COMPILE) -c -fpic -o $@ $<
1780
 
1781 159 khays
if HAVE_STATIC
1782 163 khays
if IFUNC_STATIC
1783 27 khays
check_PROGRAMS += ifuncmain4static
1784
ifuncmain4static_SOURCES = ifuncmain4.c
1785
ifuncmain4static_DEPENDENCIES = gcctestdir/ld
1786
ifuncmain4static_LDFLAGS = -Bgcctestdir/ -static
1787
ifuncmain4static_LDADD =
1788
 
1789
check_PROGRAMS += ifuncmain4picstatic
1790
ifuncmain4picstatic: ifuncmain4pic.o gcctestdir/ld
1791
        $(LINK) -Bgcctestdir/ -static ifuncmain4pic.o
1792 159 khays
endif
1793 163 khays
endif
1794 27 khays
 
1795
check_PROGRAMS += ifuncmain4
1796
ifuncmain4_SOURCES = ifuncmain4.c
1797
ifuncmain4_DEPENDENCIES = gcctestdir/ld
1798
ifuncmain4_LDFLAGS = -Bgcctestdir/
1799
ifuncmain4_LDADD =
1800
 
1801
ifuncmain5pic.o: ifuncmain5.c
1802
        $(COMPILE) -c -fpic -o $@ $<
1803
 
1804
ifuncmain5pie.o: ifuncmain5.c
1805
        $(COMPILE) -c -fpie -o $@ $<
1806
 
1807
ifuncmod5.o: ifuncmod5.c
1808
        $(COMPILE) -c -fpic -o $@ $<
1809
ifuncmod5.so: ifuncmod5.o gcctestdir/ld
1810
        $(LINK) -Bgcctestdir/ -shared ifuncmod5.o
1811
 
1812
ifuncdep5.o: ifuncmod5.c
1813
        $(COMPILE) -c -o $@ $<
1814
 
1815 159 khays
if HAVE_STATIC
1816 163 khays
if IFUNC_STATIC
1817 27 khays
check_PROGRAMS += ifuncmain5static
1818
ifuncmain5static_SOURCES = ifuncmain5.c
1819
ifuncmain5static_DEPENDENCIES = gcctestdir/ld ifuncdep5.o
1820
ifuncmain5static_LDFLAGS = -Bgcctestdir/ -static
1821
ifuncmain5static_LDADD = ifuncdep5.o
1822
 
1823
check_PROGRAMS += ifuncmain5picstatic
1824
ifuncmain5picstatic: ifuncmain5pic.o ifuncmod5.o gcctestdir/ld
1825
        $(LINK) -Bgcctestdir/ -static ifuncmain5pic.o ifuncmod5.o
1826 159 khays
endif
1827 163 khays
endif
1828 27 khays
 
1829
check_PROGRAMS += ifuncmain5
1830
ifuncmain5_SOURCES = ifuncmain5.c
1831
ifuncmain5_DEPENDENCIES = gcctestdir/ld ifuncmod5.so
1832
ifuncmain5_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1833
ifuncmain5_LDADD = ifuncmod5.so
1834
 
1835
check_PROGRAMS += ifuncmain5pic
1836
ifuncmain5pic: ifuncmain5pic.o ifuncmod5.so gcctestdir/ld
1837
        $(LINK) -Bgcctestdir/ ifuncmain5pic.o ifuncmod5.so -Wl,-R,.
1838
 
1839
check_PROGRAMS += ifuncmain5staticpic
1840
ifuncmain5staticpic: ifuncmain5pic.o ifuncmod5.o gcctestdir/ld
1841
        $(LINK) -Bgcctestdir/ ifuncmain5pic.o ifuncmod5.o
1842
 
1843
check_PROGRAMS += ifuncmain5pie
1844
ifuncmain5pie: ifuncmain5pie.o ifuncmod5.so gcctestdir/ld
1845
        $(LINK) -Bgcctestdir/ -pie ifuncmain5pie.o ifuncmod5.so -Wl,-R,.
1846
 
1847
ifuncmain6pie.o: ifuncmain6pie.c
1848
        $(COMPILE) -c -fpie -o $@ $<
1849
 
1850
ifuncmod6.o: ifuncmod6.c
1851
        $(COMPILE) -c -fpic -o $@ $<
1852
ifuncmod6.so: ifuncmod6.o gcctestdir/ld
1853
        $(LINK) -Bgcctestdir/ -shared ifuncmod6.o
1854
 
1855
check_PROGRAMS += ifuncmain6pie
1856
ifuncmain6pie: ifuncmain6pie.o ifuncmod6.so gcctestdir/ld
1857
        $(LINK) -Bgcctestdir/ -pie ifuncmain6pie.o ifuncmod6.so -Wl,-R,.
1858
 
1859
ifuncmain7pic.o: ifuncmain7.c
1860
        $(COMPILE) -c -fpic -o $@ $<
1861
 
1862
ifuncmain7pie.o: ifuncmain7.c
1863
        $(COMPILE) -c -fpie -o $@ $<
1864
 
1865 159 khays
if HAVE_STATIC
1866 163 khays
if IFUNC_STATIC
1867 27 khays
check_PROGRAMS += ifuncmain7static
1868
ifuncmain7static_SOURCES = ifuncmain7.c
1869
ifuncmain7static_DEPENDENCIES = gcctestdir/ld
1870
ifuncmain7static_LDFLAGS = -Bgcctestdir/ -static
1871
ifuncmain7static_LDADD =
1872
 
1873
check_PROGRAMS += ifuncmain7picstatic
1874
ifuncmain7picstatic: ifuncmain7pic.o gcctestdir/ld
1875
        $(LINK) -Bgcctestdir/ -static ifuncmain7pic.o
1876 159 khays
endif
1877 163 khays
endif
1878 27 khays
 
1879
check_PROGRAMS += ifuncmain7
1880
ifuncmain7_SOURCES = ifuncmain7.c
1881
ifuncmain7_DEPENDENCIES = gcctestdir/ld
1882
ifuncmain7_LDFLAGS = -Bgcctestdir/
1883
ifuncmain7_LDADD =
1884
 
1885
check_PROGRAMS += ifuncmain7pic
1886
ifuncmain7pic: ifuncmain7pic.o gcctestdir/ld
1887
        $(LINK) -Bgcctestdir/ ifuncmain7pic.o
1888
 
1889
check_PROGRAMS += ifuncmain7pie
1890
ifuncmain7pie: ifuncmain7pie.o gcctestdir/ld
1891
        $(LINK) -Bgcctestdir/ -pie ifuncmain7pie.o
1892
 
1893 159 khays
check_PROGRAMS += ifuncvar
1894
ifuncvar1_pic.o: ifuncvar1.c
1895
        $(COMPILE) -c -fpic -o $@ $<
1896
ifuncvar2_pic.o: ifuncvar2.c
1897
        $(COMPILE) -c -fpic -o $@ $<
1898
ifuncvar.so: ifuncvar1_pic.o ifuncvar2_pic.o gcctestdir/ld
1899
        $(LINK) -Bgcctestdir/ -shared ifuncvar1_pic.o ifuncvar2_pic.o
1900
ifuncvar_SOURCES = ifuncvar3.c
1901
ifuncvar_DEPENDENCIES = gcctestdir/ld ifuncvar.so
1902
ifuncvar_LDFLAGS = -Bgcctestdir/ -Wl,-R,.
1903
ifuncvar_LDADD = ifuncvar.so
1904
 
1905 27 khays
endif IFUNC
1906
 
1907
# Test that strong reference to a weak symbol in a DSO remains strong.
1908
check_SCRIPTS += strong_ref_weak_def.sh
1909
check_DATA += strong_ref_weak_def.stdout
1910
MOSTLYCLEANFILES += strong_ref_weak_def_1.so strong_ref_weak_def_2.so \
1911
        strong_ref_weak_def.stdout
1912
strong_ref_weak_def_2.o: strong_ref_weak_def_2.c
1913
        $(COMPILE) -o $@ -c -fPIC $<
1914
strong_ref_weak_def_2.so: strong_ref_weak_def_2.o gcctestdir/ld
1915
        gcctestdir/ld -shared -o $@ strong_ref_weak_def_2.o
1916
strong_ref_weak_def_1.o: strong_ref_weak_def_1.c
1917
        $(COMPILE) -o $@ -c -fPIC $<
1918
strong_ref_weak_def_1.so: strong_ref_weak_def_1.o strong_ref_weak_def_2.so \
1919
        gcctestdir/ld
1920
        gcctestdir/ld -shared -o $@ strong_ref_weak_def_1.o \
1921
                strong_ref_weak_def_2.so
1922
strong_ref_weak_def.stdout: strong_ref_weak_def_1.so
1923
        $(TEST_READELF) -sWD $< > $@
1924
 
1925
# Test that a strong weak reference remains strong if there is another
1926
# weak reference in a DSO.
1927
check_SCRIPTS += dyn_weak_ref.sh
1928
check_DATA += dyn_weak_ref.stdout
1929
MOSTLYCLEANFILES += dyn_weak_ref_1.so dyn_weak_ref_2.so \
1930
        dyn_weak_ref.stdout
1931
dyn_weak_ref_2.o: dyn_weak_ref_2.c
1932
        $(COMPILE) -o $@ -c -fPIC $<
1933
dyn_weak_ref_2.so: dyn_weak_ref_2.o gcctestdir/ld
1934
        gcctestdir/ld -shared -o $@ dyn_weak_ref_2.o
1935
dyn_weak_ref_1.o: dyn_weak_ref_1.c
1936
        $(COMPILE) -o $@ -c -fPIC $<
1937
# We intentionally put dyn_weak_ref_2.so in front of dyn_weak_ref_1.o
1938
# so that the weak ref there goes to gold's symbol table first.
1939
dyn_weak_ref_1.so: dyn_weak_ref_1.o dyn_weak_ref_2.so gcctestdir/ld
1940
        gcctestdir/ld -shared -o $@ dyn_weak_ref_2.so dyn_weak_ref_1.o
1941
dyn_weak_ref.stdout: dyn_weak_ref_1.so
1942
        $(TEST_READELF) -sWD $< > $@
1943
 
1944
 
1945
# Test that --start-lib and --end-lib function correctly.
1946
check_PROGRAMS += start_lib_test
1947
start_lib_test: start_lib_test_main.o libstart_lib_test.a start_lib_test_2.o start_lib_test_3.o \
1948
        gcctestdir/ld
1949
        $(LINK) -Bgcctestdir/ -o $@ start_lib_test_main.o -L. -lstart_lib_test \
1950
                -Wl,--start-lib start_lib_test_2.o start_lib_test_3.o -Wl,--end-lib
1951
libstart_lib_test.a: start_lib_test_1.o
1952
        $(TEST_AR) rc $@ $^
1953
 
1954
# Test that MEMORY region support works.
1955
check_SCRIPTS += memory_test.sh
1956
check_DATA += memory_test.stdout
1957
MOSTLYCLEANFILES += memory_test.stdout memory_test memory_test.o
1958
memory_test.o: memory_test.s
1959
        $(COMPILE) -o $@ -c $<
1960
memory_test: memory_test.o gcctestdir/ld $(srcdir)/memory_test.t
1961
        $(LINK) -Bgcctestdir/ -nostartfiles -nostdlib -T $(srcdir)/memory_test.t -o $@ memory_test.o
1962
memory_test.stdout: memory_test
1963
        $(TEST_READELF) -lWS  $< > $@
1964
 
1965
# End-to-end incremental linking tests.
1966
# Incremental linking is currently supported only on the x86_64 target.
1967
 
1968
if DEFAULT_TARGET_X86_64
1969
 
1970 159 khays
two_file_test_1_v1_ndebug.o: two_file_test_1_v1.cc
1971
        $(CXXCOMPILE) -O0 -g0 -c -o $@ $<
1972
two_file_test_1_ndebug.o: two_file_test_1.cc
1973
        $(CXXCOMPILE) -O0 -g0 -c -o $@ $<
1974
two_file_test_1b_ndebug.o: two_file_test_1b.cc
1975
        $(CXXCOMPILE) -O0 -g0 -c -o $@ $<
1976
two_file_test_2_ndebug.o: two_file_test_2.cc
1977
        $(CXXCOMPILE) -O0 -g0 -c -o $@ $<
1978
two_file_test_main_ndebug.o: two_file_test_main.cc
1979
        $(CXXCOMPILE) -O0 -g0 -c -o $@ $<
1980
 
1981 27 khays
check_PROGRAMS += incremental_test_2
1982
MOSTLYCLEANFILES += two_file_test_tmp_2.o
1983 159 khays
incremental_test_2: two_file_test_1_v1_ndebug.o two_file_test_1_ndebug.o two_file_test_1b_ndebug.o \
1984
                    two_file_test_2_ndebug.o two_file_test_main_ndebug.o gcctestdir/ld
1985
        cp -f two_file_test_1_v1_ndebug.o two_file_test_tmp_2.o
1986
        $(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ two_file_test_tmp_2.o two_file_test_1b_ndebug.o two_file_test_2_ndebug.o two_file_test_main_ndebug.o
1987 27 khays
        @sleep 1
1988 159 khays
        cp -f two_file_test_1_ndebug.o two_file_test_tmp_2.o
1989
        $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_tmp_2.o two_file_test_1b_ndebug.o two_file_test_2_ndebug.o two_file_test_main_ndebug.o
1990 27 khays
 
1991
check_PROGRAMS += incremental_test_3
1992
MOSTLYCLEANFILES += two_file_test_tmp_3.o
1993
incremental_test_3: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \
1994
                    two_file_test_2.o two_file_test_main.o gcctestdir/ld
1995
        cp -f two_file_test_1b_v1.o two_file_test_tmp_3.o
1996 159 khays
        $(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ two_file_test_1.o two_file_test_tmp_3.o two_file_test_2.o two_file_test_main.o
1997 27 khays
        @sleep 1
1998
        cp -f two_file_test_1b.o two_file_test_tmp_3.o
1999
        $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_1.o two_file_test_tmp_3.o two_file_test_2.o two_file_test_main.o
2000
 
2001
check_PROGRAMS += incremental_test_4
2002
MOSTLYCLEANFILES += incremental_test_4.base two_file_test_tmp_4.o
2003
incremental_test_4: two_file_test_1.o two_file_test_1b.o two_file_test_2_v1.o \
2004
                    two_file_test_2.o two_file_test_main.o gcctestdir/ld
2005
        cp -f two_file_test_2_v1.o two_file_test_tmp_4.o
2006 159 khays
        $(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ two_file_test_1.o two_file_test_1b.o two_file_test_tmp_4.o two_file_test_main.o
2007 27 khays
        mv -f incremental_test_4 incremental_test_4.base
2008
        @sleep 1
2009
        cp -f two_file_test_2.o two_file_test_tmp_4.o
2010
        $(CXXLINK) -Wl,--incremental-update,--incremental-base=incremental_test_4.base -Bgcctestdir/ two_file_test_1.o two_file_test_1b.o two_file_test_tmp_4.o two_file_test_main.o
2011
 
2012 159 khays
check_PROGRAMS += incremental_test_5
2013
MOSTLYCLEANFILES += two_file_test_5.a
2014
incremental_test_5: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \
2015
                    two_file_test_2.o two_file_test_main.o gcctestdir/ld
2016
        cp -f two_file_test_1b_v1.o two_file_test_tmp_5.o
2017
        $(TEST_AR) rc two_file_test_5.a two_file_test_1.o two_file_test_tmp_5.o two_file_test_2.o
2018
        $(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ two_file_test_main.o two_file_test_5.a
2019
        @sleep 1
2020
        cp -f two_file_test_1b.o two_file_test_tmp_5.o
2021
        $(TEST_AR) rc two_file_test_5.a two_file_test_1.o two_file_test_tmp_5.o two_file_test_2.o
2022
        $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_main.o two_file_test_5.a
2023
 
2024
# Test the --incremental-unchanged flag with an archive library.
2025
# The second link should not update the library.
2026
check_PROGRAMS += incremental_test_6
2027
MOSTLYCLEANFILES += two_file_test_6.a
2028
incremental_test_6: two_file_test_1.o two_file_test_1b_v1.o two_file_test_1b.o \
2029
                    two_file_test_2.o two_file_test_main.o gcctestdir/ld
2030
        cp -f two_file_test_1b.o two_file_test_tmp_6.o
2031
        $(TEST_AR) rc two_file_test_6.a two_file_test_1.o two_file_test_tmp_6.o two_file_test_2.o
2032
        $(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ two_file_test_main.o two_file_test_6.a
2033
        @sleep 1
2034
        cp -f two_file_test_1b_v1.o two_file_test_tmp_6.o
2035
        $(TEST_AR) rc two_file_test_6.a two_file_test_1.o two_file_test_tmp_6.o two_file_test_2.o
2036
        $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ two_file_test_main.o -Wl,--incremental-unchanged two_file_test_6.a -Wl,--incremental-unknown
2037
 
2038 148 khays
check_PROGRAMS += incremental_copy_test
2039
incremental_copy_test: copy_test_v1.o copy_test.o copy_test_1.so copy_test_2.so
2040
        cp -f copy_test_v1.o copy_test_tmp.o
2041 159 khays
        $(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ -Wl,-R,. copy_test_tmp.o copy_test_1.so copy_test_2.so
2042 148 khays
        @sleep 1
2043
        cp -f copy_test.o copy_test_tmp.o
2044
        $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ -Wl,-R,. copy_test_tmp.o copy_test_1.so copy_test_2.so
2045
 
2046
check_PROGRAMS += incremental_common_test_1
2047
incremental_common_test_1: common_test_1_v1.o common_test_1_v2.o gcctestdir/ld
2048
        cp -f common_test_1_v1.o common_test_1_tmp.o
2049 159 khays
        $(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ common_test_1_tmp.o
2050 148 khays
        @sleep 1
2051
        cp -f common_test_1_v2.o common_test_1_tmp.o
2052
        $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ common_test_1_tmp.o
2053
 
2054 163 khays
check_PROGRAMS += incremental_comdat_test_1
2055
incremental_comdat_test_1: incr_comdat_test_1.o incr_comdat_test_2_v1.o incr_comdat_test_2_v2.o incr_comdat_test_2_v3.o gcctestdir/ld
2056
        cp -f incr_comdat_test_2_v1.o incr_comdat_test_1_tmp.o
2057
        $(CXXLINK) -Wl,--incremental-full,--incremental-patch=100 -Bgcctestdir/ incr_comdat_test_1.o incr_comdat_test_1_tmp.o
2058
        @sleep 1
2059
        cp -f incr_comdat_test_2_v2.o incr_comdat_test_1_tmp.o
2060
        $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ incr_comdat_test_1.o incr_comdat_test_1_tmp.o
2061
        @sleep 1
2062
        cp -f incr_comdat_test_2_v3.o incr_comdat_test_1_tmp.o
2063
        $(CXXLINK) -Wl,--incremental-update -Bgcctestdir/ incr_comdat_test_1.o incr_comdat_test_1_tmp.o
2064
 
2065 27 khays
endif DEFAULT_TARGET_X86_64
2066
 
2067
endif GCC
2068
endif NATIVE_LINKER
2069
 
2070
# These tests work with native and cross linkers.
2071
 
2072
if NATIVE_OR_CROSS_LINKER
2073
 
2074
# Test script section order.
2075
check_SCRIPTS += script_test_10.sh
2076
check_DATA += script_test_10.stdout
2077
script_test_10.o: script_test_10.s
2078
        $(TEST_AS) -o $@ $<
2079
script_test_10: $(srcdir)/script_test_10.t script_test_10.o gcctestdir/ld
2080
        gcctestdir/ld -o $@ script_test_10.o -T $(srcdir)/script_test_10.t
2081
script_test_10.stdout: script_test_10
2082
        $(TEST_READELF) -SW script_test_10 > $@
2083
 
2084
# These tests work with cross linkers only.
2085
 
2086
if DEFAULT_TARGET_I386
2087
 
2088
check_SCRIPTS += split_i386.sh
2089
check_DATA += split_i386_1.stdout split_i386_2.stdout \
2090
        split_i386_3.stdout split_i386_4.stdout split_i386_r.stdout
2091
SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200
2092
split_i386_1.o: split_i386_1.s
2093
        $(TEST_AS) -o $@ $<
2094
split_i386_2.o: split_i386_2.s
2095
        $(TEST_AS) -o $@ $<
2096
split_i386_3.o: split_i386_3.s
2097
        $(TEST_AS) -o $@ $<
2098
split_i386_4.o: split_i386_4.s
2099
        $(TEST_AS) -o $@ $<
2100
split_i386_n.o: split_i386_n.s
2101
        $(TEST_AS) -o $@ $<
2102
split_i386_1: split_i386_1.o split_i386_n.o ../ld-new
2103
        ../ld-new $(SPLIT_DEFSYMS) -o $@ split_i386_1.o split_i386_n.o
2104
split_i386_1.stdout: split_i386_1
2105
        $(TEST_OBJDUMP) -d $< > $@
2106
split_i386_2: split_i386_2.o split_i386_n.o ../ld-new
2107
        ../ld-new $(SPLIT_DEFSYMS) -o $@ split_i386_2.o split_i386_n.o
2108
split_i386_2.stdout: split_i386_2
2109
        $(TEST_OBJDUMP) -d $< > $@
2110
split_i386_3.stdout: split_i386_3.o split_i386_n.o ../ld-new
2111
        ../ld-new $(SPLIT_DEFSYMS) -o split_i386_3 split_i386_3.o split_i386_n.o > $@ 2>&1 || exit 0
2112
split_i386_4: split_i386_4.o split_i386_n.o ../ld-new
2113
        ../ld-new $(SPLIT_DEFSYMS) -o $@ split_i386_4.o split_i386_n.o
2114
split_i386_4.stdout: split_i386_4
2115
        $(TEST_OBJDUMP) -d $< > $@
2116
split_i386_r.stdout: split_i386_1.o split_i386_n.o ../ld-new
2117
        ../ld-new -r split_i386_1.o split_i386_n.o -o split_i386_r > $@ 2>&1 || exit 0
2118
MOSTLYCLEANFILES += split_i386_1 split_i386_2 split_i386_3 \
2119
        split_i386_4 split_i386_r
2120
 
2121
endif DEFAULT_TARGET_I386
2122
 
2123
if DEFAULT_TARGET_X86_64
2124
 
2125
check_SCRIPTS += split_x86_64.sh
2126
check_DATA += split_x86_64_1.stdout split_x86_64_2.stdout \
2127
        split_x86_64_3.stdout split_x86_64_4.stdout split_x86_64_r.stdout
2128
SPLIT_DEFSYMS = --defsym __morestack=0x100 --defsym __morestack_non_split=0x200
2129
split_x86_64_1.o: split_x86_64_1.s
2130
        $(TEST_AS) -o $@ $<
2131
split_x86_64_2.o: split_x86_64_2.s
2132
        $(TEST_AS) -o $@ $<
2133
split_x86_64_3.o: split_x86_64_3.s
2134
        $(TEST_AS) -o $@ $<
2135
split_x86_64_4.o: split_x86_64_4.s
2136
        $(TEST_AS) -o $@ $<
2137
split_x86_64_n.o: split_x86_64_n.s
2138
        $(TEST_AS) -o $@ $<
2139
split_x86_64_1: split_x86_64_1.o split_x86_64_n.o ../ld-new
2140
        ../ld-new $(SPLIT_DEFSYMS) -o $@ split_x86_64_1.o split_x86_64_n.o
2141
split_x86_64_1.stdout: split_x86_64_1
2142
        $(TEST_OBJDUMP) -d $< > $@
2143
split_x86_64_2: split_x86_64_2.o split_x86_64_n.o ../ld-new
2144
        ../ld-new $(SPLIT_DEFSYMS) -o $@ split_x86_64_2.o split_x86_64_n.o
2145
split_x86_64_2.stdout: split_x86_64_2
2146
        $(TEST_OBJDUMP) -d $< > $@
2147
split_x86_64_3.stdout: split_x86_64_3.o split_x86_64_n.o ../ld-new
2148
        ../ld-new $(SPLIT_DEFSYMS) -o split_x86_64_3 split_x86_64_3.o split_x86_64_n.o > $@ 2>&1 || exit 0
2149
split_x86_64_4: split_x86_64_4.o split_x86_64_n.o ../ld-new
2150
        ../ld-new $(SPLIT_DEFSYMS) -o $@ split_x86_64_4.o split_x86_64_n.o
2151
split_x86_64_4.stdout: split_x86_64_4
2152
        $(TEST_OBJDUMP) -d $< > $@
2153
split_x86_64_r.stdout: split_x86_64_1.o split_x86_64_n.o ../ld-new
2154
        ../ld-new -r split_x86_64_1.o split_x86_64_n.o -o split_x86_64_r > $@ 2>&1 || exit 0
2155
MOSTLYCLEANFILES += split_x86_64_1 split_x86_64_2 split_x86_64_3 \
2156
        split_x86_64_4 split_x86_64_r
2157
 
2158
endif DEFAULT_TARGET_X86_64
2159
 
2160
if DEFAULT_TARGET_ARM
2161
 
2162
check_SCRIPTS += arm_abs_global.sh
2163
check_DATA += arm_abs_global.stdout
2164
arm_abs_lib.o: arm_abs_lib.s
2165
        $(TEST_AS) -march=armv7-a -o $@ $<
2166
libarm_abs.so: arm_abs_lib.o ../ld-new
2167
        ../ld-new -shared -o $@ arm_abs_lib.o
2168
arm_abs_global.o: arm_abs_global.s
2169
        $(TEST_AS) -march=armv7-a -o $@ $<
2170
arm_abs_global: arm_abs_global.o libarm_abs.so ../ld-new
2171
        ../ld-new -o $@ arm_abs_global.o -L. -larm_abs
2172
arm_abs_global.stdout: arm_abs_global
2173
        $(TEST_READELF) -r $< > $@
2174
 
2175
MOSTLYCLEANFILES += arm_abs_global
2176
 
2177
check_SCRIPTS += arm_branch_in_range.sh arm_branch_out_of_range.sh
2178
check_DATA += arm_bl_in_range.stdout arm_bl_out_of_range.stdout \
2179
        thumb_bl_in_range.stdout thumb_bl_out_of_range.stdout \
2180
        thumb2_bl_in_range.stdout thumb2_bl_out_of_range.stdout \
2181
        thumb_blx_in_range.stdout thumb_blx_out_of_range.stdout \
2182
        thumb2_blx_in_range.stdout thumb2_blx_out_of_range.stdout \
2183 159 khays
        thumb_bl_out_of_range_local.stdout arm_thm_jump11.stdout \
2184
        arm_thm_jump8.stdout
2185 27 khays
 
2186
arm_bl_in_range.stdout: arm_bl_in_range
2187
        $(TEST_OBJDUMP) -D $< > $@
2188
 
2189
arm_bl_in_range: arm_bl_in_range.o ../ld-new
2190
        ../ld-new -T $(srcdir)/arm_branch_range.t -o $@ $<
2191
 
2192
arm_bl_in_range.o: arm_bl_in_range.s
2193
        $(TEST_AS) -o $@ $<
2194
 
2195
arm_bl_out_of_range.stdout: arm_bl_out_of_range
2196
        $(TEST_OBJDUMP) -S $< > $@
2197
 
2198
arm_bl_out_of_range: arm_bl_out_of_range.o ../ld-new
2199
        ../ld-new -T $(srcdir)/arm_branch_range.t -o $@ $<
2200
 
2201
arm_bl_out_of_range.o: arm_bl_out_of_range.s
2202
        $(TEST_AS) -o $@ $<
2203
 
2204
thumb_bl_in_range.stdout: thumb_bl_in_range
2205
        $(TEST_OBJDUMP) -D $< > $@
2206
 
2207
thumb_bl_in_range: thumb_bl_in_range.o ../ld-new
2208 163 khays
        ../ld-new --no-fix-arm1176 -T $(srcdir)/thumb_branch_range.t -o $@ $<
2209 27 khays
 
2210
thumb_bl_in_range.o: thumb_bl_in_range.s
2211
        $(TEST_AS) -o $@ -march=armv5te $<
2212
 
2213
thumb_bl_out_of_range.stdout: thumb_bl_out_of_range
2214
        $(TEST_OBJDUMP) -D $< > $@
2215
 
2216
thumb_bl_out_of_range: thumb_bl_out_of_range.o ../ld-new
2217 163 khays
        ../ld-new --no-fix-arm1176 -T $(srcdir)/thumb_branch_range.t -o $@ $<
2218 27 khays
 
2219
thumb_bl_out_of_range.o: thumb_bl_out_of_range.s
2220
        $(TEST_AS) -o $@ -march=armv5te $<
2221
 
2222
thumb2_bl_in_range.stdout: thumb2_bl_in_range
2223
        $(TEST_OBJDUMP) -D $< > $@
2224
 
2225
thumb2_bl_in_range: thumb2_bl_in_range.o ../ld-new
2226
        ../ld-new -T $(srcdir)/thumb2_branch_range.t -o $@ $<
2227
 
2228
thumb2_bl_in_range.o: thumb_bl_in_range.s
2229
        $(TEST_AS) -o $@ -march=armv7-a $<
2230
 
2231
thumb2_bl_out_of_range.stdout: thumb2_bl_out_of_range
2232
        $(TEST_OBJDUMP) -D $< > $@
2233
 
2234
thumb2_bl_out_of_range: thumb2_bl_out_of_range.o ../ld-new
2235
        ../ld-new -T $(srcdir)/thumb2_branch_range.t -o $@ $<
2236
 
2237
thumb2_bl_out_of_range.o: thumb_bl_out_of_range.s
2238
        $(TEST_AS) -o $@ -march=armv7-a $<
2239
 
2240
thumb_blx_in_range.stdout: thumb_blx_in_range
2241
        $(TEST_OBJDUMP) -D $< > $@
2242
 
2243
thumb_blx_in_range: thumb_blx_in_range.o ../ld-new
2244 163 khays
        ../ld-new --no-fix-arm1176 -T $(srcdir)/thumb_branch_range.t -o $@ $<
2245 27 khays
 
2246
thumb_blx_in_range.o: thumb_blx_in_range.s
2247
        $(TEST_AS) -o $@ -march=armv5te $<
2248
 
2249
thumb_blx_out_of_range.stdout: thumb_blx_out_of_range
2250
        $(TEST_OBJDUMP) -D $< > $@
2251
 
2252
thumb_blx_out_of_range: thumb_blx_out_of_range.o ../ld-new
2253 163 khays
        ../ld-new --no-fix-arm1176 -T $(srcdir)/thumb_branch_range.t -o $@ $<
2254 27 khays
 
2255
thumb_blx_out_of_range.o: thumb_blx_out_of_range.s
2256
        $(TEST_AS) -o $@ -march=armv5te $<
2257
 
2258
thumb2_blx_in_range.stdout: thumb2_blx_in_range
2259
        $(TEST_OBJDUMP) -D $< > $@
2260
 
2261
thumb2_blx_in_range: thumb2_blx_in_range.o ../ld-new
2262
        ../ld-new -T $(srcdir)/thumb2_branch_range.t -o $@ $<
2263
 
2264
thumb2_blx_in_range.o: thumb_blx_in_range.s
2265
        $(TEST_AS) -o $@ -march=armv7-a $<
2266
 
2267
thumb2_blx_out_of_range.stdout: thumb2_blx_out_of_range
2268
        $(TEST_OBJDUMP) -D $< > $@
2269
 
2270
thumb2_blx_out_of_range: thumb2_blx_out_of_range.o ../ld-new
2271
        ../ld-new -T $(srcdir)/thumb2_branch_range.t -o $@ $<
2272
 
2273
thumb2_blx_out_of_range.o: thumb_blx_out_of_range.s
2274
        $(TEST_AS) -o $@ -march=armv7-a $<
2275
 
2276
thumb_bl_out_of_range_local.stdout: thumb_bl_out_of_range_local
2277
        $(TEST_OBJDUMP) -D $< > $@
2278
 
2279
thumb_bl_out_of_range_local: thumb_bl_out_of_range_local.o ../ld-new
2280 163 khays
        ../ld-new --no-fix-arm1176 -T $(srcdir)/thumb_branch_range.t -o $@ $<
2281 27 khays
 
2282
thumb_bl_out_of_range_local.o: thumb_bl_out_of_range_local.s
2283
        $(TEST_AS) -o $@ -march=armv5te $<
2284
 
2285 159 khays
arm_thm_jump11.stdout: arm_thm_jump11
2286
        $(TEST_OBJDUMP) -D $< > $@
2287
 
2288
arm_thm_jump11: arm_thm_jump11.o ../ld-new
2289
        ../ld-new -T $(srcdir)/arm_thm_jump11.t -o $@ $<
2290
 
2291
arm_thm_jump11.o: arm_thm_jump11.s
2292
        $(TEST_AS) -o $@ $<
2293
 
2294
arm_thm_jump8.stdout: arm_thm_jump8
2295
        $(TEST_OBJDUMP) -D $< > $@
2296
 
2297
arm_thm_jump8: arm_thm_jump8.o ../ld-new
2298
        ../ld-new -T $(srcdir)/arm_thm_jump8.t -o $@ $<
2299
 
2300
arm_thm_jump8.o: arm_thm_jump8.s
2301
        $(TEST_AS) -o $@ $<
2302
 
2303 27 khays
MOSTLYCLEANFILES += arm_bl_in_range arm_bl_out_of_range thumb_bl_in_range \
2304
        thumb_bl_out_of_range thumb2_bl_in_range thumb2_bl_out_of_range \
2305
        thumb_blx_in_range thumb_blx_out_of_range thumb2_blx_in_range \
2306 159 khays
        thumb2_blx_out_of_range thumb_bl_out_of_range_local arm_thm_jump11 \
2307
        arm_thm_jump8
2308 27 khays
 
2309
check_SCRIPTS += arm_fix_v4bx.sh
2310
check_DATA += arm_fix_v4bx.stdout arm_fix_v4bx_interworking.stdout \
2311
        arm_no_fix_v4bx.stdout
2312
 
2313
arm_fix_v4bx.stdout: arm_fix_v4bx
2314
        $(TEST_OBJDUMP) -D -j.text $< > $@
2315
 
2316
arm_fix_v4bx: arm_fix_v4bx.o ../ld-new
2317 163 khays
        ../ld-new --no-fix-arm1176 --fix-v4bx -o $@ $<
2318 27 khays
 
2319
arm_fix_v4bx.o: arm_fix_v4bx.s
2320
        $(TEST_AS) -o $@ $<
2321
 
2322
arm_fix_v4bx_interworking.stdout: arm_fix_v4bx_interworking
2323
        $(TEST_OBJDUMP) -D -j.text $< > $@
2324
 
2325
arm_fix_v4bx_interworking: arm_fix_v4bx.o ../ld-new
2326 163 khays
        ../ld-new --no-fix-arm1176 --fix-v4bx-interworking -o $@ $<
2327 27 khays
 
2328
arm_no_fix_v4bx.stdout: arm_no_fix_v4bx
2329
        $(TEST_OBJDUMP) -D -j.text $< > $@
2330
 
2331
arm_no_fix_v4bx: arm_fix_v4bx.o ../ld-new
2332 163 khays
        ../ld-new --no-fix-arm1176 -o $@ $<
2333 27 khays
 
2334
MOSTLYCLEANFILES += arm_fix_v4bx arm_fix_v4bx_interworking arm_no_fix_v4bx
2335
 
2336
check_SCRIPTS += arm_attr_merge.sh
2337
check_DATA += arm_attr_merge_6.stdout arm_attr_merge_6r.stdout \
2338
        arm_attr_merge_7.stdout
2339
 
2340
arm_attr_merge_6.stdout: arm_attr_merge_6
2341
        $(TEST_READELF) -A $< > $@
2342
 
2343
arm_attr_merge_6: arm_attr_merge_6a.o arm_attr_merge_6b.o
2344
        ../ld-new -o $@ arm_attr_merge_6a.o arm_attr_merge_6b.o
2345
 
2346
arm_attr_merge_6a.o: arm_attr_merge_6a.s
2347
        $(TEST_AS) -o $@ $<
2348
 
2349
arm_attr_merge_6b.o: arm_attr_merge_6b.s
2350
        $(TEST_AS) -o $@ $<
2351
 
2352
arm_attr_merge_6r.stdout: arm_attr_merge_6r
2353
        $(TEST_READELF) -A $< > $@
2354
 
2355
arm_attr_merge_6r: arm_attr_merge_6b.o arm_attr_merge_6a.o
2356
        ../ld-new -o $@ arm_attr_merge_6b.o arm_attr_merge_6a.o
2357
 
2358
arm_attr_merge_7.stdout: arm_attr_merge_7
2359
        $(TEST_READELF) -A $< > $@
2360
 
2361
arm_attr_merge_7: arm_attr_merge_7a.o arm_attr_merge_7b.o
2362
        ../ld-new -o $@ arm_attr_merge_7a.o arm_attr_merge_7b.o
2363
 
2364
arm_attr_merge_7a.o: arm_attr_merge_7a.s
2365
        $(TEST_AS) -o $@ $<
2366
 
2367
arm_attr_merge_7b.o: arm_attr_merge_7b.s
2368
        $(TEST_AS) -o $@ $<
2369
 
2370
MOSTLYCLEANFILES += arm_attr_merge_6 arm_attr_merge_6r arm_attr_merge_7
2371
 
2372 163 khays
# ARM1176 workaround test.
2373
check_SCRIPTS += arm_fix_1176.sh
2374
check_DATA += arm_fix_1176_default_v6z.stdout arm_fix_1176_on_v6z.stdout \
2375
        arm_fix_1176_off_v6z.stdout arm_fix_1176_default_v5te.stdout \
2376
        arm_fix_1176_default_v7a.stdout arm_fix_1176_default_1156t2f_s.stdout
2377
 
2378
arm_fix_1176_default_v6z.stdout: arm_fix_1176_default_v6z
2379
        $(TEST_OBJDUMP) -D -j.foo $< > $@
2380
 
2381
arm_fix_1176_default_v6z: arm_fix_1176_default_v6z.o ../ld-new
2382
        ../ld-new --section-start=.foo=0x2001014 -o $@ $<
2383
 
2384
arm_fix_1176_default_v6z.o: arm_fix_1176.s
2385
        $(TEST_AS) -march=armv6z -o $@ $<
2386
 
2387
arm_fix_1176_on_v6z.stdout: arm_fix_1176_on_v6z
2388
        $(TEST_OBJDUMP) -D -j.foo $< > $@
2389
 
2390
arm_fix_1176_on_v6z: arm_fix_1176_on_v6z.o ../ld-new
2391
        ../ld-new --section-start=.foo=0x2001014 --fix-arm1176 -o $@ $<
2392
 
2393
arm_fix_1176_on_v6z.o: arm_fix_1176.s
2394
        $(TEST_AS) -march=armv6z -o $@ $<
2395
 
2396
arm_fix_1176_off_v6z.stdout: arm_fix_1176_off_v6z
2397
        $(TEST_OBJDUMP) -D -j.foo $< > $@
2398
 
2399
arm_fix_1176_off_v6z: arm_fix_1176_off_v6z.o ../ld-new
2400
        ../ld-new --section-start=.foo=0x2001014 --no-fix-arm1176 -o $@ $<
2401
 
2402
arm_fix_1176_off_v6z.o: arm_fix_1176.s
2403
        $(TEST_AS) -march=armv6z -o $@ $<
2404
 
2405
arm_fix_1176_default_v5te.stdout: arm_fix_1176_default_v5te
2406
        $(TEST_OBJDUMP) -D -j.foo $< > $@
2407
 
2408
arm_fix_1176_default_v5te: arm_fix_1176_default_v5te.o ../ld-new
2409
        ../ld-new --section-start=.foo=0x2001014 -o $@ $<
2410
 
2411
arm_fix_1176_default_v5te.o: arm_fix_1176.s
2412
        $(TEST_AS) -march=armv5te -o $@ $<
2413
 
2414
arm_fix_1176_default_v7a.stdout: arm_fix_1176_default_v7a
2415
        $(TEST_OBJDUMP) -D -j.foo $< > $@
2416
 
2417
arm_fix_1176_default_v7a: arm_fix_1176_default_v7a.o ../ld-new
2418
        ../ld-new --section-start=.foo=0x2001014 -o $@ $<
2419
 
2420
arm_fix_1176_default_v7a.o: arm_fix_1176.s
2421
        $(TEST_AS) -march=armv7-a -o $@ $<
2422
 
2423
arm_fix_1176_default_1156t2f_s.stdout: arm_fix_1176_default_1156t2f_s
2424
        $(TEST_OBJDUMP) -D -j.foo $< > $@
2425
 
2426
arm_fix_1176_default_1156t2f_s: arm_fix_1176_default_1156t2f_s.o ../ld-new
2427
        ../ld-new --section-start=.foo=0x2001014 -o $@ $<
2428
 
2429
arm_fix_1176_default_1156t2f_s.o: arm_fix_1176.s
2430
        $(TEST_AS) -mcpu=arm1156t2f-s -o $@ $<
2431
 
2432
MOSTLYCLEANFILES += arm_fix_1176_default_v6z arm_fix_1176_on_v6z arm_fix_1176_off_v6z \
2433
        arm_fix_1176_default_v5te arm_fix_1176_default_v7a arm_fix_1176_default_1156t2f_s
2434
 
2435 27 khays
# Cortex-A8 workaround test.
2436
 
2437
check_SCRIPTS += arm_cortex_a8.sh
2438
check_DATA += arm_cortex_a8_b_cond.stdout arm_cortex_a8_b.stdout \
2439
        arm_cortex_a8_bl.stdout arm_cortex_a8_blx.stdout \
2440
        arm_cortex_a8_local.stdout arm_cortex_a8_local_reloc.stdout
2441
 
2442
arm_cortex_a8_b_cond.stdout: arm_cortex_a8_b_cond
2443
        $(TEST_OBJDUMP) -D -j.text $< > $@
2444
 
2445
arm_cortex_a8_b_cond: arm_cortex_a8_b_cond.o ../ld-new
2446
        ../ld-new -o $@ $<
2447
 
2448
arm_cortex_a8_b_cond.o: arm_cortex_a8_b_cond.s
2449
        $(TEST_AS) -o $@ $<
2450
 
2451
arm_cortex_a8_b.stdout: arm_cortex_a8_b
2452
        $(TEST_OBJDUMP) -D -j.text $< > $@
2453
 
2454
arm_cortex_a8_b: arm_cortex_a8_b.o ../ld-new
2455
        ../ld-new --fix-cortex-a8 -o $@ $<
2456
 
2457
arm_cortex_a8_b.o: arm_cortex_a8_b.s
2458
        $(TEST_AS) -o $@ $<
2459
 
2460
arm_cortex_a8_bl.stdout: arm_cortex_a8_bl
2461
        $(TEST_OBJDUMP) -D -j.text $< > $@
2462
 
2463
arm_cortex_a8_bl: arm_cortex_a8_bl.o ../ld-new
2464
        ../ld-new -o $@ $<
2465
 
2466
arm_cortex_a8_bl.o: arm_cortex_a8_bl.s
2467
        $(TEST_AS) -o $@ $<
2468
 
2469
arm_cortex_a8_blx.stdout: arm_cortex_a8_blx
2470
        $(TEST_OBJDUMP) -D -j.text $< > $@
2471
 
2472
arm_cortex_a8_blx: arm_cortex_a8_blx.o ../ld-new
2473
        ../ld-new -o $@ $<
2474
 
2475
arm_cortex_a8_blx.o: arm_cortex_a8_blx.s
2476
        $(TEST_AS) -o $@ $<
2477
 
2478
arm_cortex_a8_local.stdout: arm_cortex_a8_local
2479
        $(TEST_OBJDUMP) -D -j.text $< > $@
2480
 
2481
arm_cortex_a8_local: arm_cortex_a8_local.o ../ld-new
2482
        ../ld-new -o $@ $<
2483
 
2484
arm_cortex_a8_local.o: arm_cortex_a8_local.s
2485
        $(TEST_AS) -o $@ $<
2486
 
2487
arm_cortex_a8_local_reloc.stdout: arm_cortex_a8_local_reloc
2488
        $(TEST_OBJDUMP) -D -j.text $< > $@
2489
 
2490
arm_cortex_a8_local_reloc: arm_cortex_a8_local_reloc.o ../ld-new
2491
        ../ld-new -o $@ $<
2492
 
2493
arm_cortex_a8_local_reloc.o: arm_cortex_a8_local_reloc.s
2494
        $(TEST_AS) -o $@ $<
2495
 
2496
MOSTLYCLEANFILES += arm_cortex_a8_b_cond arm_cortex_a8_b arm_cortex_a8_bl \
2497
        arm_cortex_a8_blx arm_cortex_a8_local arm_cortex_a8_local_reloc
2498
 
2499
check_SCRIPTS += arm_exidx_test.sh
2500
check_DATA += arm_exidx_test.stdout
2501
 
2502
arm_exidx_test.stdout: arm_exidx_test.so
2503
        $(TEST_READELF) -S $< > $@
2504
 
2505
arm_exidx_test.so: arm_exidx_test.o ../ld-new
2506
        ../ld-new -shared -o $@ $<
2507
 
2508
arm_exidx_test.o: arm_exidx_test.s
2509
        $(TEST_AS) -o $@ $<
2510
 
2511
check_SCRIPTS += pr12826.sh
2512
check_DATA += pr12826.stdout
2513
 
2514
pr12826.stdout: pr12826.so
2515
        $(TEST_READELF) -A $< > $@
2516
 
2517
pr12826.so: pr12826_1.o pr12826_2.o ../ld-new
2518
        ../ld-new -shared -o $@ $<
2519
 
2520
pr12826_1.o: pr12826_1.s
2521
        $(TEST_AS) -o $@ $<
2522
 
2523
pr12826_2.o: pr12826_2.s
2524
        $(TEST_AS) -o $@ $<
2525
 
2526 159 khays
check_SCRIPTS += arm_unaligned_reloc.sh
2527 163 khays
check_DATA += arm_unaligned_reloc.stdout arm_unaligned_reloc_r.stdout
2528 159 khays
 
2529
arm_unaligned_reloc.stdout: arm_unaligned_reloc
2530
        $(TEST_OBJDUMP) -D $< > $@
2531
 
2532 163 khays
arm_unaligned_reloc_r.stdout: arm_unaligned_reloc_r
2533
        $(TEST_OBJDUMP) -Dr $< > $@
2534
 
2535 159 khays
arm_unaligned_reloc: arm_unaligned_reloc.o ../ld-new
2536
        ../ld-new -o $@ $<
2537
 
2538 163 khays
arm_unaligned_reloc_r: arm_unaligned_reloc.o ../ld-new
2539
        ../ld-new -r -o $@ $<
2540
 
2541 159 khays
arm_unaligned_reloc.o: arm_unaligned_reloc.s
2542
        $(TEST_AS) -o $@ $<
2543
 
2544 163 khays
MOSTLYCLEANFILES += arm_unaligned_reloc arm_unaligned_reloc_r
2545 159 khays
 
2546 163 khays
# Check ARM to ARM farcall veneers
2547
 
2548
check_SCRIPTS += arm_farcall_arm_arm.sh
2549
check_DATA += arm_farcall_arm_arm.stdout
2550
 
2551
arm_farcall_arm_arm.stdout: arm_farcall_arm_arm
2552
        $(TEST_OBJDUMP) -d $< > $@
2553
 
2554
arm_farcall_arm_arm: arm_farcall_arm_arm.o ../ld-new
2555
        ../ld-new --no-fix-arm1176 --section-start .text=0x1000 --section-start .foo=0x2001020 -o $@ $<
2556
 
2557
arm_farcall_arm_arm.o: arm_farcall_arm_arm.s
2558
        $(TEST_AS) -o $@ $<
2559
 
2560
MOSTLYCLEANFILES += arm_farcall_arm_arm
2561
 
2562
# Check ARM to Thumb farcall veneers
2563
 
2564
check_SCRIPTS += arm_farcall_arm_thumb.sh
2565
check_DATA += arm_farcall_arm_thumb.stdout arm_farcall_arm_thumb_5t.stdout
2566
 
2567
arm_farcall_arm_thumb.stdout: arm_farcall_arm_thumb
2568
        $(TEST_OBJDUMP) -D $< > $@
2569
 
2570
arm_farcall_arm_thumb: arm_farcall_arm_thumb.o ../ld-new
2571
        ../ld-new --section-start .text=0x1000 --section-start .foo=0x2001014 -o $@ $<
2572
 
2573
arm_farcall_arm_thumb.o: arm_farcall_arm_thumb.s
2574
        $(TEST_AS) -o $@ $<
2575
 
2576
arm_farcall_arm_thumb_5t.stdout: arm_farcall_arm_thumb_5t
2577
        $(TEST_OBJDUMP) -D $< > $@
2578
 
2579
arm_farcall_arm_thumb_5t: arm_farcall_arm_thumb_5t.o ../ld-new
2580
        ../ld-new --no-fix-arm1176 --section-start .text=0x1000 --section-start .foo=0x2001014 -o $@ $<
2581
 
2582
arm_farcall_arm_thumb_5t.o: arm_farcall_arm_thumb.s
2583
        $(TEST_AS) -march=armv5t -o $@ $<
2584
 
2585
MOSTLYCLEANFILES += arm_farcall_arm_thumb arm_farcall_arm_thumb_5t
2586
 
2587
# Check Thumb to Thumb farcall veneers
2588
 
2589
check_SCRIPTS += arm_farcall_thumb_thumb.sh
2590
check_DATA += arm_farcall_thumb_thumb.stdout \
2591
              arm_farcall_thumb_thumb_5t.stdout \
2592
              arm_farcall_thumb_thumb_7m.stdout \
2593
              arm_farcall_thumb_thumb_6m.stdout
2594
 
2595
arm_farcall_thumb_thumb.stdout: arm_farcall_thumb_thumb
2596
        $(TEST_OBJDUMP) -D $< > $@
2597
 
2598
arm_farcall_thumb_thumb: arm_farcall_thumb_thumb.o ../ld-new
2599
        ../ld-new --section-start .text=0x1000 --section-start .foo=0x2001014 -o $@ $<
2600
 
2601
arm_farcall_thumb_thumb.o: arm_farcall_thumb_thumb.s
2602
        $(TEST_AS) -march=armv4t -o $@ $<
2603
 
2604
arm_farcall_thumb_thumb_5t.stdout: arm_farcall_thumb_thumb_5t
2605
        $(TEST_OBJDUMP) -D $< > $@
2606
 
2607
arm_farcall_thumb_thumb_5t: arm_farcall_thumb_thumb_5t.o ../ld-new
2608
        ../ld-new --no-fix-arm1176 --section-start .text=0x1000 --section-start .foo=0x2001014 -o $@ $<
2609
 
2610
arm_farcall_thumb_thumb_5t.o: arm_farcall_thumb_thumb.s
2611
        $(TEST_AS) -march=armv5t -o $@ $<
2612
 
2613
arm_farcall_thumb_thumb_7m.stdout: arm_farcall_thumb_thumb_7m
2614
        $(TEST_OBJDUMP) -D $< > $@
2615
 
2616
arm_farcall_thumb_thumb_7m: arm_farcall_thumb_thumb_7m.o ../ld-new
2617
        ../ld-new --section-start .text=0x1000 --section-start .foo=0x2001014 -o $@ $<
2618
 
2619
arm_farcall_thumb_thumb_7m.o: arm_farcall_thumb_thumb.s
2620
        $(TEST_AS) -march=armv7-m -o $@ $<
2621
 
2622
arm_farcall_thumb_thumb_6m.stdout: arm_farcall_thumb_thumb_6m
2623
        $(TEST_OBJDUMP) -D $< > $@
2624
 
2625
arm_farcall_thumb_thumb_6m: arm_farcall_thumb_thumb_6m.o ../ld-new
2626
        ../ld-new --section-start .text=0x1000 --section-start .foo=0x2001014 -o $@ $<
2627
 
2628
arm_farcall_thumb_thumb_6m.o: arm_farcall_thumb_thumb.s
2629
        $(TEST_AS) -march=armv6-m -o $@ $<
2630
 
2631
MOSTLYCLEANFILES += arm_farcall_thumb_thumb arm_farcall_thumb_thumb_5t \
2632
                    arm_farcall_thumb_thumb_7m arm_farcall_thumb_thumb_6m
2633
 
2634
# Check Thumb to ARM farcall veneers
2635
 
2636
check_SCRIPTS += arm_farcall_thumb_arm.sh
2637
check_DATA += arm_farcall_thumb_arm.stdout \
2638
              arm_farcall_thumb_arm_5t.stdout
2639
 
2640
arm_farcall_thumb_arm.stdout: arm_farcall_thumb_arm
2641
        $(TEST_OBJDUMP) -D $< > $@
2642
 
2643
arm_farcall_thumb_arm: arm_farcall_thumb_arm.o ../ld-new
2644
        ../ld-new --section-start .text=0x1c01010 --section-start .foo=0x2001014 -o $@ $<
2645
 
2646
arm_farcall_thumb_arm.o: arm_farcall_thumb_arm.s
2647
        $(TEST_AS) -o $@ $<
2648
 
2649
arm_farcall_thumb_arm_5t.stdout: arm_farcall_thumb_arm_5t
2650
        $(TEST_OBJDUMP) -D $< > $@
2651
 
2652
arm_farcall_thumb_arm_5t: arm_farcall_thumb_arm_5t.o ../ld-new
2653
        ../ld-new --no-fix-arm1176 --section-start .text=0x1c01010 --section-start .foo=0x2001014 -o $@ $<
2654
 
2655
arm_farcall_thumb_arm_5t.o: arm_farcall_thumb_arm.s
2656
        $(TEST_AS) -march=armv5t -o $@ $<
2657
 
2658
MOSTLYCLEANFILES += arm_farcall_thumb_arm arm_farcall_thumb_arm_5t
2659
 
2660 27 khays
endif DEFAULT_TARGET_ARM
2661
 
2662
endif NATIVE_OR_CROSS_LINKER
2663
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.