• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## Process this file with automake to create Makefile.in
2##
3## Copyright (C) 1996-2019 Red Hat, Inc.
4## This file is part of elfutils.
5##
6## This file is free software; you can redistribute it and/or modify
7## it under the terms of the GNU General Public License as published by
8## the Free Software Foundation; either version 3 of the License, or
9## (at your option) any later version.
10##
11## elfutils is distributed in the hope that it will be useful, but
12## WITHOUT ANY WARRANTY; without even the implied warranty of
13## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14## GNU General Public License for more details.
15##
16## You should have received a copy of the GNU General Public License
17## along with this program.  If not, see <http://www.gnu.org/licenses/>.
18##
19include $(top_srcdir)/config/eu.am
20BUILD_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf
21
22AM_LDFLAGS =
23
24if !STANDALONE
25AM_CPPFLAGS += -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \
26	    -I$(top_srcdir)/libdwfl -I$(top_srcdir)/libdwelf \
27	    -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \
28	    -I$(top_srcdir)/lib -I..
29AM_LDFLAGS += -Wl,-rpath-link,../libasm:../libdw:../libelf
30endif
31
32if TESTS_RPATH
33AM_LDFLAGS += -Wl,-rpath,$(BUILD_RPATH)
34tests_rpath = yes
35else
36tests_rpath = no
37endif
38
39check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \
40		  showptable update1 update2 update3 update4 test-nlist \
41		  show-die-info get-files next-files get-lines next-lines \
42		  get-pubnames \
43		  get-aranges allfcts line2addr addrscopes funcscopes \
44		  show-abbrev hash newscn ecp dwflmodtest \
45		  find-prologues funcretval allregs rdwrmmap \
46		  dwfl-bug-addr-overflow arls dwfl-bug-fd-leak \
47		  dwfl-addr-sect dwfl-bug-report early-offscn \
48		  dwfl-bug-getmodules dwarf-getmacros dwarf-ranges addrcfi \
49		  dwarfcfi \
50		  test-flag-nobits dwarf-getstring rerequest_tag \
51		  alldts typeiter typeiter2 low_high_pc \
52		  test-elf_cntl_gelf_getshdr dwflsyms dwfllines \
53		  dwfl-report-elf-align varlocs backtrace backtrace-child \
54		  backtrace-data backtrace-dwarf debuglink debugaltlink \
55		  buildid deleted deleted-lib.so aggregate_size peel_type \
56		  vdsosyms \
57		  getsrc_die strptr newdata elfstrtab dwfl-proc-attach \
58		  elfshphehdr elfstrmerge dwelfgnucompressed elfgetchdr \
59		  elfgetzdata elfputzdata zstrptr emptyfile vendorelf \
60		  fillfile dwarf_default_lower_bound dwarf-die-addr-die \
61		  get-units-invalid get-units-split attr-integrate-skel \
62		  all-dwarf-ranges unit-info next_cfi \
63		  elfcopy addsections xlate_notes elfrdwrnop \
64		  dwelf_elf_e_machine_string
65
66asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
67	    asm-tst6 asm-tst7 asm-tst8 asm-tst9
68
69if BIARCH
70check_PROGRAMS += backtrace-child-biarch
71endif
72
73# Substitute $(COMPILE).
74backtrace-child-biarch$(EXEEXT): backtrace-child.c
75	$(AM_V_CC)$(CC_BIARCH) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
76		     $(AM_CPPFLAGS) $(CPPFLAGS) \
77		     $(AM_CFLAGS) $(CFLAGS) $(backtrace_child_CFLAGS) \
78		     $(AM_LDFLAGS) $(LDFLAGS) $(backtrace_child_LDFLAGS) \
79		     -o $@ $<
80
81TESTS = run-arextract.sh run-arsymtest.sh run-ar.sh newfile test-nlist \
82	update1 update2 update3 update4 \
83	run-show-die-info.sh run-get-files.sh run-get-lines.sh \
84	run-next-files.sh run-next-lines.sh \
85	run-get-pubnames.sh run-get-aranges.sh run-allfcts.sh \
86	run-show-abbrev.sh run-line2addr.sh hash \
87	run-large-elf-file.sh \
88	newscn run-strip-test.sh run-strip-test2.sh \
89	run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \
90	run-strip-test6.sh run-strip-test7.sh run-strip-test8.sh \
91	run-strip-test9.sh run-strip-test10.sh run-strip-test11.sh \
92	run-strip-test12.sh \
93	run-strip-nothing.sh run-strip-g.sh run-annobingroup.sh \
94	run-strip-groups.sh run-strip-reloc.sh run-strip-strmerge.sh \
95	run-strip-nobitsalign.sh run-strip-remove-keep.sh \
96	run-unstrip-test.sh run-unstrip-test2.sh run-unstrip-test3.sh \
97	run-unstrip-test4.sh run-unstrip-M.sh run-elfstrmerge-test.sh \
98	run-ecp-test.sh run-ecp-test2.sh run-alldts.sh \
99	run-elflint-test.sh run-elflint-self.sh run-ranlib-test.sh \
100	run-ranlib-test2.sh run-ranlib-test3.sh run-ranlib-test4.sh \
101	run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
102	run-find-prologues.sh run-allregs.sh run-addrcfi.sh \
103	run-dwarfcfi.sh \
104	run-nm-self.sh run-readelf-self.sh run-readelf-info-plus.sh \
105	run-readelf-compressed.sh \
106	run-readelf-const-values.sh \
107	run-varlocs-self.sh run-exprlocs-self.sh \
108	run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \
109	run-readelf-test4.sh run-readelf-twofiles.sh \
110	run-readelf-macro.sh run-readelf-loc.sh run-readelf-ranges.sh \
111	run-readelf-aranges.sh run-readelf-line.sh run-readelf-z.sh \
112	run-readelf-n.sh \
113	run-native-test.sh run-bug1-test.sh \
114	run-debuglink.sh run-debugaltlink.sh run-buildid.sh \
115	dwfl-bug-addr-overflow run-addrname-test.sh \
116	dwfl-bug-fd-leak dwfl-bug-report \
117	run-dwfl-bug-offline-rel.sh run-dwfl-addr-sect.sh \
118	run-disasm-x86.sh run-disasm-x86-64.sh \
119	run-early-offscn.sh run-dwarf-getmacros.sh run-dwarf-ranges.sh \
120	run-test-flag-nobits.sh run-prelink-addr-test.sh \
121	run-dwarf-getstring.sh run-rerequest_tag.sh run-typeiter.sh \
122	run-readelf-d.sh run-readelf-gdb_index.sh run-unstrip-n.sh \
123	run-low_high_pc.sh run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \
124	run-test-archive64.sh run-readelf-vmcoreinfo.sh \
125	run-readelf-mixed-corenote.sh run-dwfllines.sh \
126	run-readelf-variant.sh \
127	run-dwfl-report-elf-align.sh run-addr2line-test.sh \
128	run-addr2line-i-test.sh run-addr2line-i-lex-test.sh \
129	run-addr2line-i-demangle-test.sh run-addr2line-alt-debugpath.sh \
130	run-varlocs.sh run-exprlocs.sh run-funcretval.sh \
131	run-backtrace-native.sh run-backtrace-data.sh run-backtrace-dwarf.sh \
132	run-backtrace-native-biarch.sh run-backtrace-native-core.sh \
133	run-backtrace-native-core-biarch.sh run-backtrace-core-x86_64.sh \
134	run-backtrace-fp-core-x86_64.sh \
135	run-backtrace-fp-core-aarch64.sh \
136	run-backtrace-fp-core-ppc64le.sh \
137	run-backtrace-core-x32.sh \
138	run-backtrace-core-i386.sh run-backtrace-fp-core-i386.sh \
139	run-backtrace-core-ppc.sh \
140	run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \
141	run-backtrace-core-aarch64.sh run-backtrace-core-sparc.sh \
142	run-backtrace-demangle.sh run-stack-d-test.sh run-stack-i-test.sh \
143	run-stack-demangled-test.sh run-readelf-zx.sh run-readelf-zp.sh \
144	run-readelf-addr.sh run-readelf-str.sh \
145	run-readelf-types.sh \
146	run-readelf-dwz-multi.sh run-allfcts-multi.sh run-deleted.sh \
147	run-linkmap-cut.sh run-aggregate-size.sh run-peel-type.sh \
148	vdsosyms run-readelf-A.sh \
149	run-getsrc-die.sh run-strptr.sh newdata elfstrtab dwfl-proc-attach \
150	elfshphehdr run-lfs-symbols.sh run-dwelfgnucompressed.sh \
151	run-elfgetchdr.sh \
152	run-elfgetzdata.sh run-elfputzdata.sh run-zstrptr.sh \
153	run-compress-test.sh \
154	run-readelf-zdebug.sh run-readelf-zdebug-rel.sh \
155	emptyfile vendorelf fillfile dwarf_default_lower_bound \
156	run-dwarf-die-addr-die.sh \
157	run-get-units-invalid.sh run-get-units-split.sh \
158	run-attr-integrate-skel.sh \
159	run-all-dwarf-ranges.sh run-unit-info.sh \
160	run-reloc-bpf.sh \
161	run-next-cfi.sh run-next-cfi-self.sh \
162	run-reverse-sections.sh run-reverse-sections-self.sh \
163	run-copyadd-sections.sh run-copymany-sections.sh \
164	run-typeiter-many.sh run-strip-test-many.sh \
165	run-strip-version.sh run-xlate-note.sh \
166	run-readelf-discr.sh \
167	run-dwelf_elf_e_machine_string.sh \
168	run-elfclassify.sh run-elfclassify-self.sh \
169	run-disasm-riscv64.sh
170
171if !BIARCH
172export ELFUTILS_DISABLE_BIARCH = 1
173endif
174
175if !DEMANGLE
176export ELFUTILS_DISABLE_DEMANGLE = 1
177endif
178
179if !STANDALONE
180check_PROGRAMS += msg_tst system-elf-libelf-test
181TESTS += msg_tst system-elf-libelf-test
182endif
183
184if LZMA
185TESTS += run-readelf-s.sh run-dwflsyms.sh
186endif
187
188if HAVE_LIBASM
189check_PROGRAMS += $(asm_TESTS)
190TESTS += $(asm_TESTS) run-disasm-bpf.sh
191endif
192
193if DEBUGINFOD
194check_PROGRAMS += debuginfod_build_id_find
195TESTS += run-debuginfod-find.sh
196endif
197
198EXTRA_DIST = run-arextract.sh run-arsymtest.sh run-ar.sh \
199	     run-show-die-info.sh run-get-files.sh run-get-lines.sh \
200	     run-next-files.sh run-next-lines.sh testfile-only-debug-line.bz2 \
201	     run-get-pubnames.sh run-get-aranges.sh \
202	     run-show-abbrev.sh run-strip-test.sh \
203	     run-strip-test2.sh run-ecp-test.sh run-ecp-test2.sh \
204	     testfile.bz2 testfile2.bz2 testfile3.bz2 testfile4.bz2 \
205	     testfile5.bz2 testfile6.bz2 testfile7.bz2 testfile8.bz2 \
206	     testfile9.bz2 testfile10.bz2 testfile11.bz2 testfile12.bz2 \
207	     testfile13.bz2 run-strip-test3.sh run-allfcts.sh \
208	     testfile_class_func.bz2 testfile_nested_funcs.bz2 \
209	     run-line2addr.sh run-elflint-test.sh testfile14.bz2 \
210	     run-strip-test4.sh run-strip-test5.sh run-strip-test6.sh \
211	     run-strip-test7.sh run-strip-test8.sh run-strip-groups.sh \
212	     run-strip-test9.sh run-strip-test10.sh run-strip-test11.sh \
213	     run-strip-test12.sh \
214	     run-strip-nothing.sh run-strip-remove-keep.sh run-strip-g.sh \
215	     run-annobingroup.sh testfile-annobingroup.o.bz2 \
216	     testfile-annobingroup-i386.o.bz2 \
217	     testfile-annobingroup-x86_64.o.bz2 \
218	     run-strip-strmerge.sh run-strip-nobitsalign.sh \
219	     testfile-nobitsalign.bz2 testfile-nobitsalign.strip.bz2 \
220	     run-strip-reloc.sh hello_i386.ko.bz2 hello_x86_64.ko.bz2 \
221	     hello_ppc64.ko.bz2 hello_s390.ko.bz2 hello_aarch64.ko.bz2 \
222	     hello_m68k.ko.bz2 hello_riscv64.ko.bz2 hello_csky.ko.bz2 \
223	     run-unstrip-test.sh run-unstrip-test2.sh \
224	     testfile-info-link.bz2 testfile-info-link.debuginfo.bz2 \
225	     testfile-info-link.stripped.bz2 run-unstrip-test3.sh \
226	     run-unstrip-test4.sh testfile-strtab.bz2 \
227	     testfile-strtab.stripped.bz2 testfile-strtab.debuginfo.bz2 \
228	     run-unstrip-M.sh run-elfstrmerge-test.sh \
229	     run-elflint-self.sh run-ranlib-test.sh run-ranlib-test2.sh \
230	     run-ranlib-test3.sh run-ranlib-test4.sh \
231	     run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
232	     run-nm-self.sh run-readelf-self.sh run-readelf-info-plus.sh \
233	     run-readelf-compressed.sh \
234	     run-readelf-const-values.sh testfile-const-values.debug.bz2 \
235	     run-addrcfi.sh run-dwarfcfi.sh \
236	     testfile11-debugframe.bz2 testfile12-debugframe.bz2 \
237	     testfileaarch64-debugframe.bz2 testfilearm-debugframe.bz2 \
238	     testfileppc32-debugframe.bz2 testfileppc64-debugframe.bz2 \
239	     testfilecsky.bz2 \
240	     run-varlocs-self.sh run-exprlocs-self.sh \
241	     run-find-prologues.sh run-allregs.sh run-native-test.sh \
242	     run-addrname-test.sh run-dwfl-bug-offline-rel.sh \
243	     run-dwfl-addr-sect.sh run-early-offscn.sh \
244	     run-dwarf-getmacros.sh \
245	     run-dwarf-ranges.sh debug-ranges-no-lowpc.o.bz2 \
246	     testfileranges4.debug.bz2 testfileranges5.debug.bz2 \
247	     testfilesplitranges5.debug.bz2 \
248	     testfile-ranges-hello5.dwo.bz2 testfile-ranges-world5.dwo.bz2 \
249	     run-test-flag-nobits.sh \
250	     run-dwarf-getstring.sh run-rerequest_tag.sh run-alldts.sh \
251	     testfile15.bz2 testfile15.debug.bz2 \
252	     testfile16.bz2 testfile16.debug.bz2 \
253	     testfile17.bz2 testfile17.debug.bz2 \
254	     testfile18.bz2 testfile19.bz2 testfile19.index.bz2 \
255	     testfile20.bz2 testfile20.index.bz2 \
256	     testfile21.bz2 testfile21.index.bz2 \
257	     testfile22.bz2 testfile23.bz2 testfile24.bz2 testfile25.bz2 \
258	     testfile26.bz2 testfile27.bz2 \
259	     coverage.sh test-subr.sh test-wrapper.sh \
260	     run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \
261	     run-readelf-test4.sh run-readelf-twofiles.sh \
262	     run-bug1-test.sh testfile28.bz2 testfile28.rdwr.bz2 \
263	     run-debuglink.sh run-debugaltlink.sh run-buildid.sh \
264	     testfile29.bz2 testfile29.rdwr.bz2 \
265	     testfile30.bz2 testfile31.bz2 testfile32.bz2 testfile33.bz2 \
266	     testfile34.bz2 testfile35.bz2 testfile35.debug.bz2 \
267	     testfile36.bz2 testfile36.debug.bz2 \
268	     testfile37.bz2 testfile37.debug.bz2 \
269	     testfile38.bz2 testfile39.bz2 testfile40.bz2 testfile40.debug.bz2 \
270	     testfile41.bz2 testfile42.bz2 testfile42_noshdrs.bz2 \
271	     testfile43.bz2 \
272	     testfile44.S.bz2 testfile44.expect.bz2 run-disasm-x86.sh \
273	     testfile45.S.bz2 testfile45.expect.bz2 run-disasm-x86-64.sh \
274	     testfile46.bz2 testfile47.bz2 testfile48.bz2 testfile48.debug.bz2 \
275	     testfile49.bz2 testfile50.bz2 testfile51.bz2 \
276	     testfile-macros-0xff.bz2 \
277	     run-readelf-macro.sh testfilemacro.bz2 \
278	     run-readelf-loc.sh testfileloc.bz2 \
279	     splitdwarf4-not-split4.dwo.bz2 \
280	     testfile-splitdwarf4-not-split4.debug.bz2 \
281	     run-readelf-ranges.sh \
282	     run-readelf-aranges.sh run-readelf-line.sh testfilefoobarbaz.bz2 \
283	     testfile-ppc64-min-instr.bz2 \
284	     testfile-dwarf-45.source \
285	     testfile-dwarf-4.bz2 testfile-dwarf-5.bz2 \
286	     run-readelf-z.sh \
287	     run-readelf-dwz-multi.sh libtestfile_multi_shared.so.bz2 \
288	     testfile_multi.dwz.bz2 testfile_multi_main.bz2 \
289	     testfile-dwzstr.bz2 testfile-dwzstr.multi.bz2 \
290	     run-readelf-addr.sh run-readelf-str.sh \
291	     run-readelf-types.sh \
292	     run-readelf-n.sh \
293	     testfile-gnu-property-note.bz2 testfile-gnu-property-note.o.bz2 \
294	     testfile_gnu_props.32le.o.bz2 \
295	     testfile_gnu_props.64le.o.bz2 \
296	     testfile_gnu_props.32be.o.bz2 \
297	     testfile_gnu_props.64be.o.bz2 \
298	     run-allfcts-multi.sh \
299	     test-offset-loop.bz2 test-offset-loop.alt.bz2 \
300	     run-prelink-addr-test.sh \
301	     testfile52-32.so.bz2 testfile52-32.so.debug.bz2 \
302	     testfile52-32.prelink.so.bz2 testfile52-32.noshdrs.so.bz2 \
303	     testfile52-64.so.bz2 testfile52-64.so.debug.bz2 \
304	     testfile52-64.prelink.so.bz2 testfile52-64.noshdrs.so.bz2 \
305	     testfile53-32.bz2 testfile53-32.debug.bz2 \
306	     testfile53-32.prelink.bz2 testfile53-64.bz2 \
307	     testfile53-64.debug.bz2 testfile53-64.prelink.bz2 \
308	     testfile54-32.so.bz2 testfile54-32.so.debug.bz2 \
309	     testfile54-32.prelink.so.bz2 testfile54-32.noshdrs.so.bz2 \
310	     testfile54-64.so.bz2 testfile54-64.so.debug.bz2 \
311	     testfile54-64.prelink.so.bz2 testfile54-64.noshdrs.so.bz2 \
312	     testfile55-32.bz2 testfile55-32.debug.bz2 \
313	     testfile55-32.prelink.bz2 testfile55-64.bz2 \
314	     testfile55-64.debug.bz2 testfile55-64.prelink.bz2 \
315	     testfile56.bz2 testfile57.bz2 testfile58.bz2 \
316	     run-typeiter.sh testfile59.bz2 \
317	     run-readelf-d.sh testlib_dynseg.so.bz2 \
318	     testfile-s390x-hash-both.bz2 \
319	     run-readelf-gdb_index.sh testfilegdbindex5.bz2 \
320	     testfilegdbindex7.bz2 \
321	     run-readelf-s.sh testfilebazdbg.bz2 testfilebazdyn.bz2 \
322	     testfilebazmin.bz2 testfilebazdbg.debug.bz2 testfilebazmdb.bz2 \
323	     testfilebaztab.bz2 testfilebasmin.bz2 testfilebaxmin.bz2 \
324	     testfilebazdbg_pl.bz2 testfilebazmin_pl.bz2 \
325	     testfilebazdbg_plr.bz2 testfilebazmin_plr.bz2 \
326	     testfilebazdbgppc64.bz2 testfilebazdbgppc64.debug.bz2 \
327	     testfilebazdbgppc64_pl.bz2 testfilebazdbgppc64_plr.bz2 \
328	     testfilebazdynppc64.bz2 testfilebazmdbppc64.bz2 \
329	     testfilebazminppc64.bz2 testfilebazminppc64_pl.bz2 \
330	     testfilebazminppc64_plr.bz2 testfilebaztabppc64.bz2 \
331	     run-readelf-variant.sh testfile-ada-variant.bz2 \
332	     run-dwflsyms.sh \
333	     run-unstrip-n.sh testcore-rtlib.bz2 testcore-rtlib-ppc.bz2 \
334	     run-low_high_pc.sh testfile_low_high_pc.bz2 \
335	     run-macro-test.sh testfile-macinfo.bz2 testfile-macros.bz2 \
336	     run-elf_cntl_gelf_getshdr.sh \
337	     run-test-archive64.sh testarchive64.a.bz2 \
338	     testfile60.bz2 testfile61.bz2 \
339	     run-readelf-vmcoreinfo.sh testfile62.bz2 \
340	     run-readelf-mixed-corenote.sh testfile63.bz2 testfile64.bz2 \
341	     testfile65.bz2 testfile67.bz2 testfile68.bz2 \
342	     testfile69.core.bz2 testfile69.so.bz2 \
343	     testfile70.core.bz2 testfile70.exec.bz2 testfile71.bz2 \
344	     run-dwfllines.sh run-dwfl-report-elf-align.sh \
345	     testfile-dwfl-report-elf-align-shlib.so.bz2 \
346	     testfilenolines.bz2 test-core-lib.so.bz2 test-core.core.bz2 \
347	     test-core.exec.bz2 run-addr2line-test.sh \
348	     run-addr2line-i-test.sh testfile-inlines.bz2 \
349	     run-addr2line-i-lex-test.sh testfile-lex-inlines.bz2 \
350	     run-addr2line-i-demangle-test.sh run-addr2line-alt-debugpath.sh \
351	     testfileppc32.bz2 testfileppc64.bz2 \
352	     testfiles390.bz2 testfiles390x.bz2 \
353	     testfilearm.bz2 testfileaarch64.bz2 \
354	     run-varlocs.sh run-exprlocs.sh testfile-stridex.bz2 \
355	     testfile_const_type.c testfile_const_type.bz2 \
356	     testfile_implicit_pointer.c testfile_implicit_pointer.bz2 \
357	     testfile_parameter_ref.c testfile_parameter_ref.bz2 \
358	     testfile_entry_value.c testfile_entry_value.bz2 \
359	     testfile_implicit_value.c testfile_implicit_value.bz2 \
360	     testfile_aarch64_core.bz2 testfile_i686_core.bz2 \
361	     addrx_constx-4.dwo.bz2 addrx_constx-5.dwo.bz2 \
362	     testfile-addrx_constx-4.bz2 testfile-addrx_constx-5.bz2 \
363	     run-funcretval.sh funcretval_test.c funcretval_test_aarch64.bz2 \
364	     run-backtrace-data.sh run-backtrace-dwarf.sh cleanup-13.c \
365	     run-backtrace-native.sh run-backtrace-native-biarch.sh \
366	     run-backtrace-native-core.sh run-backtrace-native-core-biarch.sh \
367	     run-backtrace-core-x86_64.sh run-backtrace-core-i386.sh \
368	     run-backtrace-fp-core-x86_64.sh \
369	     run-backtrace-core-x32.sh \
370	     run-backtrace-fp-core-aarch64.sh \
371	     backtrace.aarch64.fp.core.bz2 backtrace.aarch64.fp.exec.bz2 \
372	     backtrace-subr.sh backtrace.i386.core.bz2 backtrace.i386.exec.bz2 \
373	     run-backtrace-fp-core-i386.sh \
374	     backtrace.i386.fp.core.bz2 backtrace.i386.fp.exec.bz2 \
375	     run-backtrace-fp-core-ppc64le.sh \
376	     backtrace.ppc64le.fp.core.bz2 backtrace.ppc64le.fp.exec.bz2 \
377	     backtrace.x86_64.core.bz2 backtrace.x86_64.exec.bz2 \
378	     backtrace.x86_64.fp.core.bz2 backtrace.x86_64.fp.exec.bz2 \
379	     backtrace.ppc.core.bz2 backtrace.ppc.exec.bz2 \
380	     run-backtrace-core-ppc.sh testfile66.bz2 testfile66.core.bz2 \
381	     backtrace.s390x.core.bz2 backtrace.s390x.exec.bz2 \
382	     backtrace.s390.core.bz2 backtrace.s390.exec.bz2 \
383	     run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \
384	     run-backtrace-core-aarch64.sh \
385	     backtrace.aarch64.core.bz2 backtrace.aarch64.exec.bz2 \
386	     run-backtrace-core-sparc.sh \
387	     backtrace.sparc.core.bz2 backtrace.sparc.exec.bz2 \
388	     run-backtrace-demangle.sh testfile-backtrace-demangle.bz2 \
389	     testfile-backtrace-demangle.cc \
390	     testfile-backtrace-demangle.core.bz2 \
391	     run-stack-d-test.sh run-stack-i-test.sh \
392	     run-stack-demangled-test.sh \
393	     testfiledwarfinlines.bz2 testfiledwarfinlines.core.bz2 \
394	     run-readelf-zdebug.sh testfile-debug.bz2 testfile-zdebug.bz2 \
395	     run-readelf-zdebug-rel.sh testfile-debug-rel.o.bz2 \
396	     testfile-debug-rel-g.o.bz2 testfile-debug-rel-z.o.bz2 \
397	     run-readelf-zx.sh run-readelf-zp.sh \
398	     run-deleted.sh run-linkmap-cut.sh linkmap-cut-lib.so.bz2 \
399	     linkmap-cut.bz2 linkmap-cut.core.bz2 \
400	     run-aggregate-size.sh testfile-sizes1.o.bz2 testfile-sizes2.o.bz2 \
401	     testfile-sizes3.o.bz2 testfile-sizes4.o.bz2 testfile-sizes4.s \
402	     run-peel-type.sh \
403	     run-readelf-A.sh testfileppc32attrs.o.bz2 \
404	     testfilesparc64attrs.o.bz2 testfileppc64attrs.o.bz2 \
405	     testfile-debug-types.bz2 \
406	     run-getsrc-die.sh run-strptr.sh \
407	     testfile-x32-core.bz2 testfile-x32.bz2 \
408	     backtrace.x32.core.bz2 backtrace.x32.exec.bz2 \
409	     testfile-x32-s.bz2 testfile-x32-d.bz2 testfile-x32-debug.bz2 \
410	     run-lfs-symbols.sh lfs-symbols testfile-nolfs.bz2 \
411	     testfile-zgnu32.bz2 testfile-zgnu64.bz2 \
412	     testfile-zgnu32be.bz2 testfile-zgnu64be.bz2 \
413	     run-dwelfgnucompressed.sh \
414	     testfile-zgabi32.bz2 testfile-zgabi64.bz2 \
415	     testfile-zgabi32be.bz2 testfile-zgabi64be.bz2 \
416	     run-elfgetchdr.sh run-elfgetzdata.sh run-elfputzdata.sh \
417	     run-zstrptr.sh run-compress-test.sh \
418	     run-disasm-bpf.sh \
419	     testfile-bpf-dis1.expect.bz2 testfile-bpf-dis1.o.bz2 \
420	     run-reloc-bpf.sh \
421	     testfile-bpf-reloc.expect.bz2 testfile-bpf-reloc.o.bz2 \
422	     testfile-m68k-core.bz2 testfile-m68k.bz2 testfile-m68k-s.bz2 \
423	     run-dwarf-die-addr-die.sh \
424	     run-get-units-invalid.sh run-get-units-split.sh \
425	     testfile-hello4.dwo.bz2 testfile-hello5.dwo.bz2 \
426	     testfile-splitdwarf-4.bz2 testfile-splitdwarf-5.bz2 \
427	     testfile-world5.dwo.bz2 testfile-world4.dwo.bz2 \
428	     run-attr-integrate-skel.sh \
429	     run-all-dwarf-ranges.sh testfilesplitranges4.debug.bz2 \
430	     testfile-ranges-hello.dwo.bz2 testfile-ranges-world.dwo.bz2 \
431	     run-unit-info.sh run-next-cfi.sh run-next-cfi-self.sh \
432	     testfile-riscv64.bz2 testfile-riscv64-s.bz2 \
433	     testfile-riscv64-core.bz2 \
434	     run-reverse-sections.sh run-reverse-sections-self.sh \
435	     run-copyadd-sections.sh run-copymany-sections.sh \
436	     run-large-elf-file.sh \
437	     run-typeiter-many.sh run-strip-test-many.sh \
438	     testfile-debug-rel-ppc64-g.o.bz2 \
439	     testfile-debug-rel-ppc64-z.o.bz2 \
440	     testfile-debug-rel-ppc64.o.bz2 \
441	     run-strip-version.sh testfile-version.bz2 \
442	     run-xlate-note.sh \
443	     run-readelf-discr.sh \
444	     testfile-rng.debug.bz2 testfile-urng.debug.bz2 \
445	     run-dwelf_elf_e_machine_string.sh \
446	     run-elfclassify.sh run-elfclassify-self.sh \
447	     run-disasm-riscv64.sh \
448	     testfile-riscv64-dis1.o.bz2 testfile-riscv64-dis1.expect.bz2 \
449             run-debuginfod-find.sh \
450	     debuginfod-rpms/fedora30/hello2-1.0-2.src.rpm \
451	     debuginfod-rpms/fedora30/hello2-1.0-2.x86_64.rpm \
452	     debuginfod-rpms/fedora30/hello2-debuginfo-1.0-2.x86_64.rpm \
453	     debuginfod-rpms/fedora30/hello2-debugsource-1.0-2.x86_64.rpm \
454	     debuginfod-rpms/fedora30/hello2-two-1.0-2.x86_64.rpm \
455	     debuginfod-rpms/fedora30/hello2-two-debuginfo-1.0-2.x86_64.rpm \
456	     debuginfod-rpms/hello2.spec. \
457	     debuginfod-rpms/rhel6/hello2-1.0-2.i686.rpm \
458	     debuginfod-rpms/rhel6/hello2-1.0-2.src.rpm \
459	     debuginfod-rpms/rhel6/hello2-debuginfo-1.0-2.i686.rpm \
460	     debuginfod-rpms/rhel6/hello2-two-1.0-2.i686.rpm \
461	     debuginfod-rpms/rhel7/hello2-1.0-2.src.rpm \
462	     debuginfod-rpms/rhel7/hello2-1.0-2.x86_64.rpm \
463	     debuginfod-rpms/rhel7/hello2-debuginfo-1.0-2.x86_64.rpm \
464	     debuginfod-rpms/rhel7/hello2-two-1.0-2.x86_64.rpm
465
466
467
468if USE_VALGRIND
469valgrind_cmd='valgrind -q --leak-check=full --error-exitcode=1'
470endif
471
472
473installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir); \
474			      bindir=$(DESTDIR)$(bindir); \
475			      LC_ALL=C; LANG=C; \
476			      VALGRIND_CMD=$(valgrind_cmd); \
477			      abs_srcdir=$(abs_srcdir); \
478			      abs_builddir=$(abs_builddir); \
479			      abs_top_builddir=$(abs_top_builddir); \
480			      export abs_srcdir; export abs_builddir; \
481			      export abs_top_builddir; \
482			      export libdir; export bindir; \
483			      export LC_ALL; export LANG; export VALGRIND_CMD; \
484			      NM=$(NM); export NM;
485installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
486			 installed $(tests_rpath) \
487			 '$(program_transform_name)'
488if STANDALONE
489TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT)
490LOG_COMPILER = $(installed_LOG_COMPILER)
491else !STANDALONE
492TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \
493		    abs_srcdir=$(abs_srcdir);  abs_builddir=$(abs_builddir); \
494		    abs_top_builddir=$(abs_top_builddir); \
495		    export abs_srcdir; export abs_builddir; \
496		    export abs_top_builddir; \
497		    export LC_ALL; export LANG; export VALGRIND_CMD; \
498		    NM=$(NM); export NM;
499LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \
500	       $(abs_top_builddir)/libdw:$(abs_top_builddir)/backends:$(abs_top_builddir)/libelf:$(abs_top_builddir)/libasm:$(abs_top_builddir)/debuginfod
501
502installcheck-local:
503	$(MAKE) $(AM_MAKEFLAGS) \
504		TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
505		LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
506endif !STANDALONE
507
508if STANDALONE
509libdw = -ldw
510libelf = -lelf
511libasm = -lasm
512libebl = -lebl
513else !STANDALONE
514if BUILD_STATIC
515libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
516libelf = ../libelf/libelf.a -lz
517libasm = ../libasm/libasm.a
518else
519libdw = ../libdw/libdw.so
520libelf = ../libelf/libelf.so
521libasm = ../libasm/libasm.so
522endif
523libebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a
524libeu = ../lib/libeu.a
525endif !STANDALONE
526
527arextract_LDADD = $(libelf)
528arsymtest_LDADD = $(libelf)
529newfile_LDADD = $(libelf)
530saridx_LDADD = $(libelf)
531scnnames_LDADD = $(libelf)
532sectiondump_LDADD = $(libelf)
533showptable_LDADD = $(libelf)
534hash_LDADD = $(libelf)
535test_nlist_LDADD = $(libelf)
536msg_tst_LDADD = $(libelf)
537newscn_LDADD = $(libelf)
538early_offscn_LDADD = $(libelf)
539ecp_LDADD = $(libelf)
540update1_LDADD = $(libelf)
541update2_LDADD = $(libelf)
542update3_LDADD = $(libdw) $(libelf)
543update4_LDADD = $(libdw) $(libelf)
544show_die_info_LDADD = $(libdw) $(libelf)
545get_pubnames_LDADD = $(libdw) $(libelf)
546show_abbrev_LDADD = $(libdw) $(libelf)
547get_lines_LDADD = $(libdw) $(libelf)
548next_lines_LDADD = $(libdw) $(libelf)
549get_files_LDADD = $(libdw) $(libelf)
550next_files_LDADD = $(libdw) $(libelf)
551get_aranges_LDADD = $(libdw) $(libelf)
552allfcts_LDADD = $(libdw) $(libelf)
553line2addr_LDADD = $(libdw) $(argp_LDADD)
554addrscopes_LDADD = $(libdw) $(argp_LDADD)
555funcscopes_LDADD = $(libdw) $(argp_LDADD)
556funcretval_LDADD = $(libdw) $(argp_LDADD)
557allregs_LDADD = $(libdw) $(argp_LDADD)
558find_prologues_LDADD = $(libdw) $(argp_LDADD)
559#show_ciefde_LDADD = ../libdwarf/libdwarf.so $(libelf)
560asm_tst1_LDADD = $(libasm) $(libebl) $(libelf) $(libdw)
561asm_tst2_LDADD = $(libasm) $(libebl) $(libelf) $(libdw)
562asm_tst3_LDADD = $(libasm) $(libebl) $(libelf) $(libdw)
563asm_tst4_LDADD = $(libasm) $(libebl) $(libelf) $(libdw)
564asm_tst5_LDADD = $(libasm) $(libebl) $(libelf) $(libdw)
565asm_tst6_LDADD = $(libasm) $(libebl) $(libelf) $(libdw)
566asm_tst7_LDADD = $(libasm) $(libebl) $(libelf) $(libdw)
567asm_tst8_LDADD = $(libasm) $(libebl) $(libelf) $(libdw)
568asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libdw)
569dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD)
570rdwrmmap_LDADD = $(libelf)
571dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf)
572arls_LDADD = $(libelf)
573dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf)
574dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf)
575dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf)
576dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD)
577dwarf_getmacros_LDADD = $(libdw)
578dwarf_ranges_LDADD = $(libdw)
579dwarf_getstring_LDADD = $(libdw)
580addrcfi_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD)
581dwarfcfi_LDADD = $(libdw) $(libelf)
582test_flag_nobits_LDADD = $(libelf)
583rerequest_tag_LDADD = $(libdw)
584alldts_LDADD = $(libdw) $(libelf)
585typeiter_LDADD = $(libdw) $(libelf)
586typeiter2_LDADD = $(libdw) $(libelf)
587low_high_pc_LDADD = $(libdw) $(libelf) $(argp_LDADD)
588test_elf_cntl_gelf_getshdr_LDADD = $(libelf)
589dwflsyms_LDADD = $(libdw) $(libelf) $(argp_LDADD)
590dwfllines_LDADD = $(libdw) $(libelf) $(argp_LDADD)
591dwfl_report_elf_align_LDADD = $(libdw)
592varlocs_LDADD = $(libdw) $(libelf) $(argp_LDADD)
593backtrace_LDADD = $(libdw) $(libelf) $(argp_LDADD)
594# backtrace-child-biarch also uses those *_CFLAGS and *_LDLAGS variables:
595backtrace_child_CFLAGS = $(fpie_CFLAGS)
596backtrace_child_LDFLAGS = -pie -pthread
597backtrace_child_biarch_SOURCES = backtrace-child.c
598backtrace_data_LDADD = $(libdw) $(libelf)
599backtrace_dwarf_CFLAGS = -Wno-unused-parameter
600backtrace_dwarf_LDADD = $(libdw) $(libelf)
601debuglink_LDADD = $(libdw) $(libelf)
602debugaltlink_LDADD = $(libdw) $(libelf)
603buildid_LDADD = $(libdw) $(libelf)
604deleted_LDADD = ./deleted-lib.so
605deleted_lib_so_LDFLAGS = -shared
606deleted_lib_so_CFLAGS = $(fpic_CFLAGS) -fasynchronous-unwind-tables
607aggregate_size_LDADD = $(libdw) $(libelf) $(argp_LDADD)
608peel_type_LDADD = $(libdw) $(libelf) $(argp_LDADD)
609vdsosyms_LDADD = $(libdw) $(libelf)
610getsrc_die_LDADD = $(libdw) $(libelf)
611strptr_LDADD = $(libelf)
612newdata_LDADD = $(libelf)
613elfstrtab_LDADD = $(libelf)
614dwfl_proc_attach_LDADD = $(libdw)
615dwfl_proc_attach_LDFLAGS = -pthread $(AM_LDFLAGS)
616elfshphehdr_LDADD =$(libelf)
617elfstrmerge_LDADD = $(libdw) $(libelf)
618dwelfgnucompressed_LDADD = $(libelf) $(libdw)
619elfgetchdr_LDADD = $(libelf) $(libdw)
620elfgetzdata_LDADD = $(libelf)
621elfputzdata_LDADD = $(libelf)
622zstrptr_LDADD = $(libelf)
623emptyfile_LDADD = $(libelf)
624vendorelf_LDADD = $(libelf)
625fillfile_LDADD = $(libelf)
626dwarf_default_lower_bound_LDADD = $(libdw)
627dwarf_die_addr_die_LDADD = $(libdw)
628get_units_invalid_LDADD = $(libdw)
629get_units_split_LDADD = $(libdw)
630attr_integrate_skel_LDADD = $(libdw)
631all_dwarf_ranges_LDADD = $(libdw)
632unit_info_LDADD = $(libdw)
633next_cfi_LDADD = $(libelf) $(libdw)
634elfcopy_LDADD = $(libelf)
635addsections_LDADD = $(libelf)
636debuginfod_build_id_find_LDADD = $(libelf) $(libdw)
637xlate_notes_LDADD = $(libelf)
638elfrdwrnop_LDADD = $(libelf)
639dwelf_elf_e_machine_string_LDADD = $(libelf) $(libdw)
640
641# We want to test the libelf header against the system elf.h header.
642# Don't include any -I CPPFLAGS. Except when we install our own elf.h.
643if !INSTALL_ELFH
644system_elf_libelf_test_CPPFLAGS =
645else
646system_elf_libelf_test_CPPFLAGS = -I$(top_srcdir)/libelf
647endif
648system_elf_libelf_test_LDADD = $(libelf)
649
650# A lock file used to make sure only one test dumps core at a time
651CLEANFILES += core-dump-backtrace.lock
652
653if GCOV
654check: check-am coverage
655.PHONY: coverage
656coverage:
657	-$(srcdir)/coverage.sh
658endif
659