Automatic date update in version.in
[deliverable/binutils-gdb.git] / binutils / testsuite / lib / binutils-common.exp
CommitLineData
219d1afa 1# Copyright (C) 1993-2018 Free Software Foundation, Inc.
f3097f33
RS
2#
3# This file is part of the GNU Binutils.
4#
5# This file is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
18# MA 02110-1301, USA.
19
20# True if the object format is known to be ELF.
21#
22proc is_elf_format {} {
b3066ae8
AM
23 # config.sub for these targets curiously transforms a target doublet
24 # ending in -elf to -none. eg. m68hc12-elf to m68hc12-unknown-none
25 # They are always elf.
7b4ae824 26 if { [istarget m68hc1*-*] || [istarget s12z*-*] || [istarget xgate-*] } {
b3066ae8
AM
27 return 1;
28 }
679ca975
AM
29# vxworks (and windiss) excluded due to number of ELF tests that need
30# modifying to pass on those targets.
31# && ![istarget *-*-vxworks*]
32# && ![istarget *-*-windiss*]
b3066ae8 33
679ca975
AM
34 if { ![istarget *-*-chorus*]
35 && ![istarget *-*-cloudabi*]
36 && ![istarget *-*-eabi*]
37 && ![istarget *-*-*elf*]
38 && ![istarget *-*-*freebsd*]
39 && ![istarget *-*-fuchsia*]
f3097f33 40 && ![istarget *-*-gnu*]
f3097f33
RS
41 && ![istarget *-*-irix5*]
42 && ![istarget *-*-irix6*]
679ca975
AM
43 && ![istarget *-*-kaos*]
44 && ![istarget *-*-*linux*]
c43b2c54 45 && ![istarget *-*-lynxos*]
4a85cc09 46 && ![istarget *-*-nacl*]
f3097f33 47 && ![istarget *-*-netbsd*]
679ca975 48 && ![istarget *-*-nto*]
f3097f33 49 && ![istarget *-*-openbsd*]
4a85cc09
SKS
50 && ![istarget *-*-rtems*]
51 && ![istarget *-*-solaris2*]
52 && ![istarget *-*-sysv4*]
53 && ![istarget *-*-unixware*]
f96bd6c2 54 && ![istarget *-*-wasm32*]
4a85cc09 55 && ![istarget avr-*-*]
4a85cc09 56 && ![istarget hppa*64*-*-hpux*]
679ca975 57 && ![istarget ia64-*-hpux*] } {
f3097f33
RS
58 return 0
59 }
60
c65c21e1
AM
61 if { [istarget *-*-linux*ecoff*]
62 || [istarget *-*-rtemscoff*] } {
f3097f33
RS
63 return 0
64 }
65
66 if { ![istarget *-*-netbsdelf*]
c65c21e1 67 && ( [istarget vax-*-netbsd*]
f3097f33
RS
68 || [istarget ns32k-*-netbsd*]) } {
69 return 0
70 }
71
4a85cc09 72 if { [istarget arm-*-openbsd*]
f3097f33 73 || [istarget ns32k-*-openbsd*]
f3097f33
RS
74 || [istarget vax-*-openbsd*] } {
75 return 0
76 }
77
78 return 1
79}
80
81# True if the object format is known to be a.out.
82#
83proc is_aout_format {} {
c65c21e1 84 if { [istarget *-*-*aout*]
f3097f33
RS
85 || [istarget *-*-bsd*]
86 || [istarget *-*-msdos*]
f3097f33
RS
87 || [istarget ns32k-*-*]
88 || [istarget pdp11-*-*]
f3097f33
RS
89 || [istarget vax-*-netbsd] } {
90 return 1
91 }
92 return 0
93}
94
95# True if the object format is known to be PE COFF.
96#
97proc is_pecoff_format {} {
98 if { ![istarget *-*-mingw*]
99 && ![istarget *-*-cygwin*]
100 && ![istarget *-*-cegcc*]
101 && ![istarget *-*-pe*] } {
102 return 0
103 }
104
105 return 1
106}
107
0b1352e0
AM
108proc is_som_format {} {
109 if { ![istarget hppa*-*-*] || [istarget hppa*64*-*-*] } {
110 return 0;
111 }
112 if { [istarget *-*-osf*] \
113 || [istarget {*-*-h[ip]ux*}] \
114 || [istarget *-*-mpeix*] \
115 || [istarget *-*-bsd*] } {
116 return 1;
117 }
118 return 0;
119}
120
f3097f33
RS
121# True if the object format is known to be 64-bit ELF.
122#
123proc is_elf64 { binary_file } {
124 global READELF
125 global READELFFLAGS
126
506b86a4 127 set tmpfile [file dirname $binary_file]/readelf.out
f3097f33 128 set readelf_size ""
506b86a4 129 catch "exec $READELF $READELFFLAGS -h $binary_file > $tmpfile" got
f3097f33
RS
130
131 if ![string match "" $got] then {
132 return 0
133 }
134
135 if { ![regexp "\n\[ \]*Class:\[ \]*ELF(\[0-9\]+)\n" \
506b86a4 136 [file_contents $tmpfile] nil readelf_size] } {
f3097f33
RS
137 return 0
138 }
139
140 if { $readelf_size == "64" } {
141 return 1
142 }
143
144 return 0
145}
eb22018c 146
506b86a4
AM
147# True if the object format is known to use RELA relocations.
148#
149proc is_rela { binary_file } {
150 global READELF
151 global READELFFLAGS
152
153 set tmpfile [file dirname $binary_file]/readelf.out
154 catch "exec $READELF $READELFFLAGS -S $binary_file > $tmpfile" got
155
156 if ![string match "" $got] then {
157 return 0
158 }
159
160 if { ![regexp "RELA" [file_contents $tmpfile]] } {
161 return 0
162 }
163
164 return 1
165}
166
6d9dabbb
MR
167# True if the target matches TARGET, specified as a TCL procedure if
168# in square brackets or as machine triplet otherwise.
169#
170proc match_target { target } {
171 if [string match {\[*\]} $target] {
172 return $target
173 } else {
174 return [istarget $target]
175 }
176}
177
a43942db
MR
178# True if the ELF target supports STB_GNU_UNIQUE with the ELF header's
179# OSABI field set to ELFOSABI_GNU.
180#
181# This generally depends on the target OS only, however there are a
182# number of exceptions for bare metal targets as follows. The MSP430
183# and Visium targets set OSABI to ELFOSABI_STANDALONE and cannot
184# support STB_GNU_UNIQUE. Likewise non-EABI ARM targets set OSABI to
185# ELFOSABI_ARM, and TI C6X targets to ELFOSABI_C6000_*. Finally
a8eb42a8 186# rather than `bfd_elf_final_link' AM33/2.0, D30V, DLX, and
a43942db
MR
187# picoJava targets use `_bfd_generic_final_link', which does not
188# support STB_GNU_UNIQUE symbol binding causing assertion failures.
189#
190proc supports_gnu_unique {} {
191 if { [istarget *-*-gnu*]
192 || [istarget *-*-linux*]
193 || [istarget *-*-nacl*] } {
194 return 1
195 }
196 if { [istarget "arm*-*-*eabi*"] } {
197 return 1
198 }
f96bd6c2
PC
199 if { [istarget "wasm32*-*-*"] } {
200 return 1
201 }
a43942db
MR
202 if { ![istarget "*-*-elf*"] } {
203 return 0
204 }
205 if { [istarget "arm*-*-*"]
206 || [istarget "msp430-*-*"]
207 || [istarget "tic6x-*-*"]
208 || [istarget "visium-*-*"] } {
209 return 0
210 }
211 if { [istarget "am33_2.0-*-*"]
212 || [istarget "d30v-*-*"]
213 || [istarget "dlx-*-*"]
be570f06
AM
214 || [istarget "pj*-*-*"]
215 || [istarget "xgate-*-*"] } {
a43942db
MR
216 return 0
217 }
218 return 1
219}
220
9cc0123f
AM
221# True for targets that do not sort .symtab as per the ELF standard.
222# ie. any that have mips_elf32_be_vec, mips_elf32_le_vec,
223# mips_elf32_n_be_vec or mips_elf32_n_le_vec as the primary bfd target
224# vector in config.bfd. When syncing with config.bfd, don't forget that
225# earlier case-matches trump later ones.
226proc is_bad_symtab {} {
227 if { ![istarget "mips*-*-*"] } {
228 return 0;
229 }
230 if { [istarget "*-*-chorus*"]
231 || [istarget "*-*-irix5*"]
232 || [istarget "*-*-irix6*"]
233 || [istarget "*-*-none"]
234 || [istarget "*-*-rtems*"]
235 || [istarget "*-*-windiss"] } {
236 return 1;
237 }
238 if { [istarget "*-*-elf*"]
239 && ![istarget "*-sde-*"]
240 && ![istarget "*-mti-*"]
241 && ![istarget "*-img-*"] } {
242 return 1;
243 }
244 if { [istarget "*-*-openbsd*"]
245 && ![istarget "mips64*-*-*"] } {
246 return 1;
247 }
248 return 0;
249}
250
33ea299c
TP
251# Returns true if -shared is supported on the target
252
253proc check_shared_lib_support { } {
254 global shared_available_saved
255 global ld
256
257 if {![info exists shared_available_saved]} {
258 set ld_output [remote_exec host $ld "-shared"]
259 if { [ string first "not supported" $ld_output ] >= 0 } {
260 set shared_available_saved 0
261 } else {
262 set shared_available_saved 1
263 }
264 }
265 return $shared_available_saved
266}
267
eb22018c
RS
268# Compare two files line-by-line. FILE_1 is the actual output and FILE_2
269# is the expected output. Ignore blank lines in either file.
270#
271# FILE_2 is a series of regexps, comments and # directives. The directives
272# are:
273#
274# #pass
275# Treat the test as a PASS if everything up till this point has
276# matched. Ignore any remaining lines in either FILE_1 or FILE_2.
277#
278# #failif
279# Reverse the sense of the test: expect differences to exist.
280#
281# #...
282# REGEXP
283# Skip all lines in FILE_1 until the first that matches REGEXP.
284#
738f4d98
MR
285# Other # lines are comments. Regexp lines starting with the `!' character
286# specify inverse matching (use `\!' for literal matching against a leading
287# `!'). Skip empty lines in both files.
eb22018c
RS
288#
289# The first optional argument is a list of regexp substitutions of the form:
290#
291# EXP1 SUBSPEC1 EXP2 SUBSPEC2 ...
292#
293# This tells the function to apply each regexp substitution EXPi->SUBSPECi
294# in order to every line of FILE_2.
295#
296# Return nonzero if differences exist.
297proc regexp_diff { file_1 file_2 args } {
298 set eof -1
299 set end_1 0
300 set end_2 0
301 set differences 0
302 set diff_pass 0
303 set fail_if_match 0
304 set ref_subst ""
305 if { [llength $args] > 0 } {
306 set ref_subst [lindex $args 0]
307 }
308 if { [llength $args] > 1 } {
309 perror "Too many arguments to regexp_diff"
310 return 1
311 }
312
313 if [file exists $file_1] then {
314 set file_a [open $file_1 r]
315 } else {
316 perror "$file_1 doesn't exist"
317 return 1
318 }
319
320 if [file exists $file_2] then {
321 set file_b [open $file_2 r]
322 } else {
323 perror "$file_2 doesn't exist"
324 close $file_a
325 return 1
326 }
327
328 verbose " Regexp-diff'ing: $file_1 $file_2" 2
329
330 while { 1 } {
331 set line_a ""
332 set line_b ""
333 while { [string length $line_a] == 0 } {
334 # Ignore blank line in FILE_1.
335 if { [gets $file_a line_a] == $eof } {
336 set end_1 1
337 break
338 }
339 }
340 while { [string length $line_b] == 0 || [string match "#*" $line_b] } {
341 if { [string match "#pass" $line_b] } {
342 set end_2 1
343 set diff_pass 1
344 break
345 } elseif { [string match "#failif" $line_b] } {
346 send_log "fail if no difference\n"
347 verbose "fail if no difference" 3
348 set fail_if_match 1
349 } elseif { [string match "#..." $line_b] } {
350 if { [gets $file_b line_b] == $eof } {
351 set end_2 1
352 set diff_pass 1
353 break
354 }
47a50e5b 355 set negated [expr { [string index $line_b 0] == "!" }]
738f4d98
MR
356 set line_bx [string range $line_b $negated end]
357 set n [expr { $negated ? "! " : "" }]
eb22018c
RS
358 # Substitute on the reference.
359 foreach {name value} $ref_subst {
738f4d98 360 regsub -- $name $line_bx $value line_bx
eb22018c 361 }
738f4d98
MR
362 verbose "looking for $n\"^$line_bx$\"" 3
363 while { [expr [regexp "^$line_bx$" "$line_a"] == $negated] } {
eb22018c
RS
364 verbose "skipping \"$line_a\"" 3
365 if { [gets $file_a line_a] == $eof } {
366 set end_1 1
367 break
368 }
369 }
370 break
371 }
372 if { [gets $file_b line_b] == $eof } {
373 set end_2 1
374 break
375 }
376 }
377
378 if { $diff_pass } {
379 break
380 } elseif { $end_1 && $end_2 } {
381 break
382 } elseif { $end_1 } {
383 send_log "extra regexps in $file_2 starting with \"^$line_b$\"\nEOF from $file_1\n"
384 verbose "extra regexps in $file_2 starting with \"^$line_b$\"\nEOF from $file_1" 3
385 set differences 1
386 break
387 } elseif { $end_2 } {
388 send_log "extra lines in $file_1 starting with \"^$line_a$\"\nEOF from $file_2\n"
389 verbose "extra lines in $file_1 starting with \"^$line_a$\"\nEOF from $file_2\n" 3
390 set differences 1
391 break
392 } else {
47a50e5b 393 set negated [expr { [string index $line_b 0] == "!" }]
738f4d98
MR
394 set line_bx [string range $line_b $negated end]
395 set n [expr { $negated ? "! " : "" }]
396 set s [expr { $negated ? " " : "" }]
eb22018c
RS
397 # Substitute on the reference.
398 foreach {name value} $ref_subst {
738f4d98 399 regsub -- $name $line_bx $value line_bx
eb22018c 400 }
738f4d98
MR
401 verbose "regexp $n\"^$line_bx$\"\nline \"$line_a\"" 3
402 if { [expr [regexp "^$line_bx$" "$line_a"] == $negated] } {
eb22018c 403 send_log "regexp_diff match failure\n"
738f4d98 404 send_log "regexp $n\"^$line_bx$\"\nline $s\"$line_a\"\n"
eb22018c
RS
405 verbose "regexp_diff match failure\n" 3
406 set differences 1
407 }
408 }
409 }
410
411 if { $differences == 0 && !$diff_pass && [eof $file_a] != [eof $file_b] } {
412 send_log "$file_1 and $file_2 are different lengths\n"
413 verbose "$file_1 and $file_2 are different lengths" 3
414 set differences 1
415 }
416
417 if { $fail_if_match } {
418 if { $differences == 0 } {
419 set differences 1
420 } else {
421 set differences 0
422 }
423 }
424
425 close $file_a
426 close $file_b
427
428 return $differences
429}
7dd36a6f
L
430
431# prune_warnings_extra -- delete extra warnings from TEXT.
432#
433# An example is:
434# ld: warning: /lib64/ld-linux-x86-64.so.2: unsupported GNU_PROPERTY_TYPE (5) type : 0xc0010001
435proc prune_warnings_extra { text } {
436 global experimental
437 # Warnings are only pruned from non-experimental code (ie code not
438 # on a release branch). For experimental code we want the warnings
439 # as they indicate that the sources need to be updated to recognise
440 # the new properties.
441 if { "$experimental" == "false" } {
442 # The "\\1" is to try to preserve a "\n" but only if necessary.
443 regsub -all "(^|\n)(\[^\n\]*: warning:\[^\n\]*unsupported GNU_PROPERTY_TYPE\[^\n\]*\n?)+" $text "\\1" text
444 }
445 return $text
446}
447
448# This definition is taken from an unreleased version of DejaGnu. Once
449# that version gets released, and has been out in the world for a few
450# months at least, it may be safe to delete this copy.
451if ![string length [info proc prune_warnings]] {
452 #
453 # prune_warnings -- delete various system verbosities from TEXT
454 #
455 # An example is:
456 # ld.so: warning: /usr/lib/libc.so.1.8.1 has older revision than expected 9
457 #
458 # Sites with particular verbose os's may wish to override this in site.exp.
459 #
460 proc prune_warnings { text } {
461 # This is from sun4's. Do it for all machines for now.
462 # The "\\1" is to try to preserve a "\n" but only if necessary.
463 regsub -all "(^|\n)(ld.so: warning:\[^\n\]*\n?)+" $text "\\1" text
464 # It might be tempting to get carried away and delete blank lines, etc.
465 # Just delete *exactly* what we're ask to, and that's it.
466 set text [prune_warnings_extra $text]
467 return $text
468 }
469} elseif { [info procs saved-prune_warnings] == [list] } {
470 rename prune_warnings saved-prune_warnings
471 proc prune_warnings { text } {
472 set text [saved-prune_warnings $text]
473 set text [prune_warnings_extra $text]
474 return $text
475 }
476}
8ffb70eb
AM
477
478# run_dump_test FILE (optional:) EXTRA_OPTIONS
479#
480# Assemble a .s file, then run some utility on it and check the output.
481#
482# There should be an assembly language file named FILE.s in the test
483# suite directory, and a pattern file called FILE.d. run_dump_test
484# will assemble FILE.s, optionally run objcopy on the object file,
485# optionally run ld, optionally run another objcopy, optionally run
486# another tool under test specified by PROG, then run a dump tool like
487# addr2line, nm, objdump, readelf or size on the object file to produce
488# textual output, and then analyze that with regexps.
489# The FILE.d file specifies what program to run, and what to expect in
490# its output.
491#
492# The FILE.d file begins with zero or more option lines, which specify
493# flags to pass to the assembler, the program to run to dump the
494# assembler's output, and the options it wants. The option lines have
495# the syntax:
496#
497# # OPTION: VALUE
498#
499# OPTION is the name of some option, like "name" or "objdump", and
500# VALUE is OPTION's value. The valid options are described below.
501# Whitespace is ignored everywhere, except within VALUE. The option
502# list ends with the first line that doesn't match the above syntax.
503# However, a line within the options that begins with a #, but doesn't
504# have a recognizable option name followed by a colon, is considered a
505# comment and entirely ignored.
506#
507# The optional EXTRA_OPTIONS argument to `run_dump_test' is a list of
508# two-element lists. The first element of each is an option name, and
509# the second additional arguments to be added on to the end of the
510# option list as given in FILE.d. (If omitted, no additional options
511# are added.)
512#
513# The interesting options are:
514#
515# name: TEST-NAME
516# The name of this test, passed to DejaGNU's `pass' and `fail'
517# commands. If omitted, this defaults to FILE, the root of the
518# .s and .d files' names.
519#
520# as: FLAGS
521# When assembling, pass FLAGS to the assembler.
522# If assembling several files, you can pass different assembler
523# options in the "source" directives. See below.
524#
525# ld: FLAGS
526# Link assembled files using FLAGS, in the order of the "source"
527# directives, when using multiple files.
528#
529# ld_after_inputfiles: FLAGS
530# Similar to "ld", but put FLAGS after all input files.
531#
532# objcopy_objects: FLAGS
533# Run objcopy with the specified flags after assembling any source
534# that has the special marker RUN_OBJCOPY in the source specific
535# flags.
536#
537# objcopy_linked_file: FLAGS
538# Run objcopy on the linked file with the specified flags.
539# This lets you transform the linked file using objcopy, before the
540# result is analyzed by an analyzer program specified below.
541#
542# PROG: PROGRAM-NAME
543# The name of a program under test, to run to modify or analyze the
544# .o file produced by the assembler. Recognised names are: ar,
545# elfedit, nm, objcopy, ranlib, strings, and strip.
546#
547# DUMPPROG: PROGRAM-NAME
548# The name of the program to run to analyze the file produced
549# by the assembler or the linker. This can be omitted;
550# run_dump_test will guess which program to run from which of
551# the flags options below is present.
552#
553# addr2line: FLAGS
554# nm: FLAGS
555# objdump: FLAGS
556# readelf: FLAGS
557# size: FLAGS
558# Use the specified program to analyze the output file, and pass it
559# FLAGS, in addition to the output name. Note that they are run
560# with LC_ALL=C in the environment to give consistent sorting of
561# symbols. If no FLAGS are needed then you can use:
562# DUMPPROG: [nm objdump readelf addr2line]
563# instead, or just pass a flag that happens to be the default.
564# If objdump is the dump tool and we're not dumping binary, nor
565# have run ld, then the standard section names (.text, .data and
566# .bss) are replaced by target ones if any (eg. rx-elf uses "P"
567# instead of .text). The substition is done for both the
568# objdump options (eg: "-j .text" is replaced by "-j P") and the
569# reference file.
570#
571# source: SOURCE [FLAGS]
572# Assemble the file SOURCE.s using the flags in the "as" directive
573# and the (optional) FLAGS. If omitted, the source defaults to
574# FILE.s.
575# This is useful if several .d files want to share a .s file.
576# More than one "source" directive can be given, which is useful
577# when testing linking.
578#
579# dump: DUMP
580# Match against DUMP.d. If omitted, this defaults to FILE.d. This
581# is useful if several .d files differ by options only. Options are
582# always read from FILE.d.
583#
584# target: GLOB|PROC ...
585# Run this test only on a specified list of targets. More precisely,
586# in the space-separated list each glob is passed to "istarget" and
587# each proc is called as a TCL procedure. List items are interpreted
588# such that procs are denoted by surrounding square brackets, and any
589# other items are consired globs. If the call evaluates true for any
590# of them, the test will be run, otherwise it will be marked
591# unsupported.
592#
593# notarget: GLOB|PROC ...
594# Do not run this test on a specified list of targets. Again, each
595# glob in the space-separated list is passed to "istarget" and each
596# proc is called as a TCL procedure, and the test is run if it
597# evaluates *false* for *all* of them. Otherwise it will be marked
598# unsupported.
599#
600# alltargets: GLOB|PROC ...
601# Run this test on a specified list of targets. Again, each
602# glob in the space-separated list is passed to "istarget" and each
603# proc is called as a TCL procedure, and the test is run if it
604# evaluates *true* for *all* of them. Otherwise it will be marked
605# unsupported.
606#
607# skip: GLOB|PROC ...
608# anyskip: GLOB|PROC ...
609# noskip: GLOB|PROC ...
610# These are exactly the same as "notarget", "alltargets" and
611# "target" respectively, except that they do nothing at all if the
612# check fails. They should only be used in groups, to construct a
613# single test which is run on all targets but with variant options
614# or expected output on some targets. (For example, see
615# gas/arm/inst.d and gas/arm/wince_inst.d.)
616#
617# xfail: GLOB|PROC ...
618# Run this test and it is is expected to fail on a specified list
619# of targets.
620#
621# error: REGEX
622# An error with message matching REGEX must be emitted for the test
623# to pass. The DUMPPROG, addr2line, nm, objdump, readelf and size
624# options have no meaning and need not supplied if this is present.
625# Multiple "error" directives append to the expected error message.
626#
627# error_output: FILE
628# Means the same as 'error', except the regular expression lines
629# are contains in FILE.
630#
631# warning: REGEX
632# Expect a warning matching REGEX. It is an error to issue
633# both "error" and "warning". Multiple "warning" directives
634# append to the expected warning message.
635#
636# warning_output: FILE
637# Means the same as 'warning', except the regular expression
638# lines are contains in FILE.
639#
640# map: FILE
641# Adding this option will cause the linker to generate a linker
642# map file, using the -Map=MAPFILE command line option. If
643# there is no -Map=MAPFILE in the 'ld: FLAGS' then one will be
644# added to the linker command line. The contents of the
645# generated MAPFILE are then compared against the regexp lines
646# in FILE using `regexp_diff' (see below for details).
647#
648# section_subst: no
649# Means that the section substitution for objdump is disabled.
650#
651# Each option may occur at most once unless otherwise mentioned.
652#
653# After the option lines come regexp lines. run_dump_test calls
654# regexp_diff to compare the output of the dumping tool against the
655# regexps in FILE.d.
656#
657proc run_dump_test { name {extra_options {}} } {
658 global ADDR2LINE ADDR2LINEFLAGS AS ASFLAGS ELFEDIT ELFEDITFLAGS LD LDFLAGS
659 global NM NMFLAGS OBJCOPY OBJCOPYFLAGS OBJDUMP OBJDUMPFLAGS
660 global READELF READELFFLAGS STRIP STRIPFLAGS
661 global copyfile env ld_elf_shared_opt runtests srcdir subdir verbose
662
663 if [string match "*/*" $name] {
664 set file $name
665 set name [file tail $name]
666 } else {
667 set file "$srcdir/$subdir/$name"
668 }
669
670 if ![runtest_file_p $runtests $name] then {
671 return
672 }
673
674 set opt_array [slurp_options "${file}.d"]
675 if { $opt_array == -1 } {
676 perror "error reading options from $file.d"
677 unresolved $subdir/$name
678 return
679 }
680 set dumpfile tmpdir/dump.out
681 set run_ld 0
682 set run_objcopy 0
683 set objfile_names {}
684 set opts(PROG) {}
685 set opts(DUMPPROG) {}
686 set opts(addr2line) {}
687 set opts(alltargets) {}
688 set opts(anyskip) {}
689 set opts(ar) {}
690 set opts(as) {}
691 set opts(dump) {}
692 set opts(elfedit) {}
693 set opts(error) {}
694 set opts(error_output) {}
695 set opts(ld) {}
696 set opts(ld_after_inputfiles) {}
697 set opts(map) {}
698 set opts(name) {}
699 set opts(nm) {}
700 set opts(noskip) {}
701 set opts(notarget) {}
702 set opts(objcopy) {}
703 set opts(objcopy_linked_file) {}
704 set opts(objcopy_objects) {}
705 set opts(objdump) {}
706 set opts(ranlib) {}
707 set opts(readelf) {}
708 set opts(section_subst) {}
709 set opts(size) {}
710 set opts(strings) {}
711 set opts(strip) {}
712 set opts(skip) {}
713 set opts(source) {}
714 set opts(strip) {}
715 set opts(target) {}
716 set opts(warning) {}
717 set opts(warning_output) {}
718 set opts(xfail) {}
719
720 set in_extra 0
721 foreach i [concat $opt_array {{} {}} $extra_options] {
722 set opt_name [lindex $i 0]
723 set opt_val [lindex $i 1]
724 if { $opt_name == "" } {
725 set in_extra 1
726 continue
727 }
728 if ![info exists opts($opt_name)] {
729 perror "unknown option $opt_name in file $file.d"
730 unresolved $subdir/$name
731 return
732 }
733
734 # Allow more substitutions, including tcl functions, for as and ld.
735 # Not done in general because extra quoting is needed for glob
736 # args used for example in binutils-all/remove-relocs-04.d.
737 if { $opt_name == "as" || $opt_name == "ld" } {
738 set opt_val [subst $opt_val]
739 } else {
740 # Just substitute $srcdir and $subdir
741 regsub -all {\$srcdir} "$opt_val" "$srcdir" opt_val
742 regsub -all {\$subdir} "$opt_val" "$subdir" opt_val
743 }
744
745 switch -- $opt_name {
746 xfail {}
747 target {}
748 alltargets {}
749 notarget {}
750 skip {}
751 anyskip {}
752 noskip {}
753 warning {}
754 error {}
755 source {
756 # Move any source-specific as-flags to a separate list to
757 # simplify processing.
758 if { [llength $opt_val] > 1 } {
759 lappend asflags [lrange $opt_val 1 end]
760 set opt_val [lindex $opt_val 0]
761 } else {
762 lappend asflags {}
763 }
764
765 # Create the object file name based on nothing but the source
766 # file name.
767 set new_objfile \
768 [concat tmpdir/[file rootname [file tail [lindex $opt_val 0]]].o]
769 # But, sometimes, we have the exact same source filename in
770 # different directories (foo/src.s bar/src.s) which would lead
771 # us to try and create two src.o files. We detect this
772 # conflict here, and instead create src.o and src1.o.
773 set j 0
774 while { [lsearch $objfile_names $new_objfile] != -1 } {
775 incr j
776 set new_objfile \
777 [concat tmpdir/[file rootname [file tail [lindex $opt_val 0]]]${j}.o]
778 }
779 lappend objfile_names $new_objfile
780 }
781 default {
782 if { !$in_extra && [string length $opts($opt_name)] } {
783 perror "option $opt_name multiply set in $file.d"
784 unresolved $subdir/$name
785 return
786 }
787
788 # A single "#ld:" with no options should do the right thing.
789 if { $opt_name == "ld" } {
790 set run_ld 1
791 }
792 # Likewise objcopy_linked_file.
793 if { $opt_name == "objcopy_linked_file" } {
794 set run_objcopy 1
795 }
796 }
797 }
798
799 # Append differently whether it's a message (without space) or
800 # an option or list (with space).
801 switch -- $opt_name {
802 warning -
803 error {
804 append opts($opt_name) $opt_val
805 }
806 default {
807 set opts($opt_name) [concat $opts($opt_name) $opt_val]
808 }
809 }
810 }
811
812 foreach opt { as ld } {
813 regsub {\[big_or_little_endian\]} $opts($opt) \
814 [big_or_little_endian] opts($opt)
815 }
816
817 if { $opts(name) == "" } {
818 set testname "$subdir/$name"
819 } else {
820 set testname $opts(name)
821 }
822
823 set err_warn 0
824 foreach opt { warning error warning_output error_output } {
825 if { $opts($opt) != "" } {
826 if { $err_warn } {
827 perror "$testname: bad mix of warning and error test directives"
828 unresolved $testname
829 return
830 }
831 set err_warn 1
832 }
833 }
834
835 # Decide early whether we should run the test for this target.
836 if { [llength $opts(noskip)] > 0 } {
837 set targmatch 0
838 foreach targ $opts(noskip) {
839 if [match_target $targ] {
840 set targmatch 1
841 break
842 }
843 }
844 if { $targmatch == 0 } {
845 return
846 }
847 }
848 foreach targ $opts(anyskip) {
849 if ![match_target $targ] {
850 return
851 }
852 }
853 foreach targ $opts(skip) {
854 if [match_target $targ] {
855 return
856 }
857 }
858 if { [llength $opts(target)] > 0 } {
859 set targmatch 0
860 foreach targ $opts(target) {
861 if [match_target $targ] {
862 set targmatch 1
863 break
864 }
865 }
866 if { $targmatch == 0 } {
867 unsupported $testname
868 return
869 }
870 }
871 foreach targ $opts(alltargets) {
872 if ![match_target $targ] {
873 unsupported $testname
874 return
875 }
876 }
877 foreach targ $opts(notarget) {
878 if [match_target $targ] {
879 unsupported $testname
880 return
881 }
882 }
883
884 set dumpprogram ""
885 # It's meaningless to require an output-testing method when we
886 # expect an error.
887 if { $opts(error) == "" && $opts(error_output) == "" } {
888 if { $opts(DUMPPROG) != "" } {
889 switch -- $opts(DUMPPROG) {
890 addr2line { set dumpprogram addr2line }
891 nm { set dumpprogram nm }
892 objdump { set dumpprogram objdump }
893 readelf { set dumpprogram readelf }
894 size { set dumpprogram size }
895 default {
896 perror "unrecognized DUMPPROG option $opts(DUMPPROG) in $file.d"
897 unresolved $testname
898 return
899 }
900 }
901 } else {
902 # Guess which program to run, by seeing which option was specified.
903 foreach p {addr2line nm objdump readelf size} {
904 if {$opts($p) != ""} {
905 if {$dumpprogram != ""} {
906 perror "ambiguous dump program in $file.d"
907 unresolved $testname
908 return
909 } else {
910 set dumpprogram $p
911 }
912 }
913 }
914 }
915 if { $dumpprogram == "" && $opts(map) == "" && !$err_warn } {
916 perror "dump program unspecified in $file.d"
917 unresolved $testname
918 return
919 }
920 }
921
922 if { $opts(source) == "" } {
923 set sourcefiles [list ${file}.s]
924 set asflags [list ""]
925 set objfile_names [list tmpdir/[file tail ${file}].o]
926 } else {
927 set sourcefiles {}
928 foreach sf $opts(source) {
929 if { [string match "/*" $sf] } {
930 lappend sourcefiles "$sf"
931 } else {
932 lappend sourcefiles "$srcdir/$subdir/$sf"
933 }
934 }
935 }
936
937 if { $opts(dump) == "" } {
938 set dfile ${file}.d
939 } else {
940 set dfile $srcdir/$subdir/$opts(dump)
941 }
942
943 # Time to setup xfailures.
944 foreach targ $opts(xfail) {
945 setup_xfail $targ
946 }
947
948 # Assemble each file.
949 set objfiles {}
950 for { set i 0 } { $i < [llength $sourcefiles] } { incr i } {
951 set sourcefile [lindex $sourcefiles $i]
952 set sourceasflags [lindex $asflags $i]
953 set run_objcopy_objects 0
954
955 if { [string match "*RUN_OBJCOPY*" $sourceasflags] } {
956 set run_objcopy_objects 1
957 }
958 regsub "RUN_OBJCOPY" $sourceasflags "" sourceasflags
959
960 set objfile [lindex $objfile_names $i]
961 catch "exec rm -f $objfile" exec_output
962 lappend objfiles $objfile
963
964 if { $opts(as) == "binary" } {
965 while {[file type $sourcefile] eq "link"} {
966 set newfile [file readlink $sourcefile]
967 if {[string index $newfile 0] ne "/"} {
968 set newfile [file dirname $sourcefile]/$newfile
969 }
970 set sourcefile $newfile
971 }
972 set newfile [remote_download host $sourcefile $objfile]
973 set cmdret 0
974 if { $newfile == "" } {
975 set cmdret 1
976 }
977 } else {
0b1352e0
AM
978 if { [istarget "hppa*-*-*"] \
979 && ![istarget "*-*-linux*"] \
980 && ![istarget "*-*-netbsd*" ] } {
8ffb70eb
AM
981 set cmd "sed -e 's/^\[ \]*\.comm \\(\[^,\]*\\),\\(.*\\)/\\1 .comm \\2/' < $sourcefile > tmpdir/asm.s"
982 send_log "$cmd\n"
983 set cmdret [remote_exec host [concat sh -c [list "$cmd"]]]
984 set cmdret [lindex $cmdret 0]
985 if { $cmdret != 0 } {
986 perror "sed failure"
987 unresolved $testname
988 return
989 }
990 set sourcefile tmpdir/asm.s
991 }
992 set cmd "$AS $ASFLAGS $opts(as) $sourceasflags -o $objfile $sourcefile"
993
994 send_log "$cmd\n"
995 set cmdret [remote_exec host [concat sh -c [list "$cmd 2>&1"]] "" "/dev/null" "dump.tmp"]
996 remote_upload host "dump.tmp"
997 set comp_output [prune_warnings [file_contents "dump.tmp"]]
998 remote_file host delete "dump.tmp"
999 remote_file build delete "dump.tmp"
1000 set cmdret [lindex $cmdret 0]
1001 }
1002 if { $cmdret == 0 && $run_objcopy_objects } {
1003 set cmd "$OBJCOPY $opts(objcopy_objects) $objfile"
1004
1005 send_log "$cmd\n"
1006 set cmdret [remote_exec host [concat sh -c [list "$cmd 2>&1"]] \
1007 "" "/dev/null" "dump.tmp"]
1008 remote_upload host "dump.tmp"
1009 append comp_output [prune_warnings [file_contents "dump.tmp"]]
1010 remote_file host delete "dump.tmp"
1011 remote_file build delete "dump.tmp"
1012 set cmdret [lindex $cmdret 0]
1013 }
1014 }
1015
1016 # Perhaps link the file(s).
1017 if { $cmdret == 0 && $run_ld } {
1018 set objfile "tmpdir/dump"
1019 catch "exec rm -f $objfile" exec_output
1020
1021 set ld_extra_opt ""
33ea299c
TP
1022 global ld
1023 set ld "$LD"
8ffb70eb
AM
1024 if { [is_elf_format] && [check_shared_lib_support] } {
1025 set ld_extra_opt "$ld_elf_shared_opt"
1026 }
1027
1028 # Add -L$srcdir/$subdir so that the linker command can use
1029 # linker scripts in the source directory.
1030 set cmd "$LD $ld_extra_opt $LDFLAGS -L$srcdir/$subdir \
1031 $opts(ld) -o $objfile $objfiles $opts(ld_after_inputfiles)"
1032
1033 # If needed then check for, or add a -Map option.
1034 set mapfile ""
1035 if { $opts(map) != "" } then {
1036 if { [regexp -- "-Map=(\[^ \]+)" $cmd all mapfile] } then {
1037 # Found existing mapfile option
1038 verbose -log "Existing mapfile '$mapfile' found"
1039 } else {
1040 # No mapfile option.
1041 set mapfile "tmpdir/dump.map"
1042 verbose -log "Adding mapfile '$mapfile'"
1043 set cmd "$cmd -Map=$mapfile"
1044 }
1045 }
1046
1047 send_log "$cmd\n"
1048 set cmdret [remote_exec host [concat sh -c [list "$cmd 2>&1"]] "" "/dev/null" "dump.tmp"]
1049 remote_upload host "dump.tmp"
1050 append comp_output [file_contents "dump.tmp"]
1051 remote_file host delete "dump.tmp"
1052 remote_file build delete "dump.tmp"
1053 set cmdret [lindex $cmdret 0]
1054
1055 if { $cmdret == 0 && $run_objcopy } {
1056 set infile $objfile
1057 set objfile "tmpdir/dump1"
1058 remote_file host delete $objfile
1059
1060 # Note that we don't use OBJCOPYFLAGS here; any flags must be
1061 # explicitly specified.
1062 set cmd "$OBJCOPY $opts(objcopy_linked_file) $infile $objfile"
1063
1064 send_log "$cmd\n"
1065 set cmdret [remote_exec host [concat sh -c [list "$cmd 2>&1"]] "" "/dev/null" "dump.tmp"]
1066 remote_upload host "dump.tmp"
1067 append comp_output [file_contents "dump.tmp"]
1068 remote_file host delete "dump.tmp"
1069 remote_file build delete "dump.tmp"
1070 set cmdret [lindex $cmdret 0]
1071 }
1072 } else {
1073 set objfile [lindex $objfiles 0]
1074 }
1075
1076 if { $cmdret == 0 && $opts(PROG) != "" } {
1077 set destopt ${copyfile}.o
1078 switch -- $opts(PROG) {
1079 ar { set program ar }
1080 elfedit {
1081 set program elfedit
1082 set destopt ""
1083 }
1084 nm { set program nm }
1085 objcopy { set program objcopy }
1086 ranlib { set program ranlib }
1087 strings { set program strings }
1088 strip {
1089 set program strip
1090 set destopt "-o $destopt"
1091 }
1092 default {
1093 perror "unrecognized PROG option $opts(PROG) in $file.d"
1094 unresolved $testname
1095 return
1096 }
1097 }
1098
1099 set progopts1 $opts($program)
1100 eval set progopts \$[string toupper $program]FLAGS
1101 eval set binary \$[string toupper $program]
1102
1103 if { ![is_remote host] && [which $binary] == 0 } {
1104 untested $testname
1105 return
1106 }
1107
1108 verbose "running $binary $progopts $progopts1" 3
1109 set cmd "$binary $progopts $progopts1 $objfile $destopt"
1110
1111 # Ensure consistent sorting of symbols
1112 if {[info exists env(LC_ALL)]} {
1113 set old_lc_all $env(LC_ALL)
1114 }
1115 set env(LC_ALL) "C"
1116 send_log "$cmd\n"
1117 set cmdret [remote_exec host [concat sh -c [list "$cmd 2>dump.tmp"]] "" "/dev/null"]
1118 set cmdret [lindex $cmdret 0]
1119 remote_upload host "dump.tmp"
1120 append comp_output [prune_warnings [file_contents "dump.tmp"]]
1121 remote_file host delete "dump.tmp"
1122 remote_file build delete "dump.tmp"
1123 if {[info exists old_lc_all]} {
1124 set env(LC_ALL) $old_lc_all
1125 } else {
1126 unset env(LC_ALL)
1127 }
1128 if { $destopt != "" } {
1129 set objfile ${copyfile}.o
1130 }
1131 }
1132
1133 set want_out(source) ""
1134 set want_out(terminal) 0
1135 if { $err_warn } {
1136 if { $opts(error) != "" || $opts(error_output) != "" } {
1137 set want_out(terminal) 1
1138 }
1139
1140 if { $opts(error) != "" || $opts(warning) != "" } {
1141 set want_out(source) "regex"
1142 if { $opts(error) != "" } {
1143 set want_out(regex) $opts(error)
1144 } else {
1145 set want_out(regex) $opts(warning)
1146 }
1147 } else {
1148 set want_out(source) "file"
1149 if { $opts(error_output) != "" } {
1150 set want_out(file) $opts(error_output)
1151 } else {
1152 set want_out(file) $opts(warning_output)
1153 }
1154 }
1155 }
1156
1157 regsub "\n$" $comp_output "" comp_output
1158 if { $cmdret != 0 || $comp_output != "" || $want_out(source) != "" } {
1159 set exitstat "succeeded"
1160 if { $cmdret != 0 } { set exitstat "failed" }
1161
1162 if { $want_out(source) == "regex" } {
1163 verbose -log "$exitstat with: <$comp_output>, expected: <$want_out(regex)>"
1164 } elseif { $want_out(source) == "file" } {
1165 verbose -log "$exitstat with: <$comp_output>, expected in file $want_out(file)"
1166 set_file_contents "tmpdir/ld.messages" "$comp_output"
1167 } else {
1168 verbose -log "$exitstat with: <$comp_output>, no expected output"
1169 }
1170
1171 if { (($want_out(source) == "") == ($comp_output == "")) \
1172 && (($cmdret == 0) == ($want_out(terminal) == 0)) \
1173 && ((($want_out(source) == "regex") \
1174 && [regexp -- $want_out(regex) $comp_output]) \
1175 || (($want_out(source) == "file") \
1176 && (![regexp_diff "tmpdir/ld.messages" "$srcdir/$subdir/$want_out(file)"]))) } {
1177 # We have the expected output.
1178 if { $want_out(terminal) || $dumpprogram == "" } {
1179 pass $testname
1180 return
1181 }
1182 } else {
1183 fail $testname
1184 return
1185 }
1186 }
1187
1188 # We must not have expected failure if we get here.
1189 if { $opts(error) != "" } {
1190 fail $testname
1191 return
1192 }
1193
1194 if { $opts(map) != "" } then {
1195 # Check the map file matches.
1196 set map_pattern_file $srcdir/$subdir/$opts(map)
1197 verbose -log "Compare '$mapfile' against '$map_pattern_file'"
1198 if { [regexp_diff $mapfile $map_pattern_file] } then {
1199 fail "$testname (map file check)"
1200 } else {
1201 pass "$testname (map file check)"
1202 }
1203
1204 if { $dumpprogram == "" } then {
1205 return
1206 }
1207 }
1208
1209 set progopts1 $opts($dumpprogram)
1210 eval set progopts \$[string toupper $dumpprogram]FLAGS
1211 eval set binary \$[string toupper $dumpprogram]
1212
1213 if { ![is_remote host] && [which $binary] == 0 } {
1214 untested $testname
1215 return
1216 }
1217
1218 # For objdump of gas output, automatically translate standard section names
1219 set sect_names ""
1220 if { !$run_ld && $dumpprogram == "objdump" \
1221 && $opts(section_subst) != "no" \
1222 && ![string match "*-b binary*" $progopts1] } {
1223 set sect_names [get_standard_section_names]
1224 if { $sect_names != ""} {
1225 regsub -- "\\.text" $progopts1 "[lindex $sect_names 0]" progopts1
1226 regsub -- "\\.data" $progopts1 "[lindex $sect_names 1]" progopts1
1227 regsub -- "\\.bss" $progopts1 "[lindex $sect_names 2]" progopts1
1228 }
1229 }
1230
1231 if { $progopts1 == "" } { set $progopts1 "-r" }
1232 verbose "running $binary $progopts $progopts1" 3
1233
1234 set cmd "$binary $progopts $progopts1 $objfile > $dumpfile"
1235
1236 # Ensure consistent sorting of symbols
1237 if {[info exists env(LC_ALL)]} {
1238 set old_lc_all $env(LC_ALL)
1239 }
1240 set env(LC_ALL) "C"
1241 send_log "$cmd\n"
1242 set cmdret [remote_exec host [concat sh -c [list "$cmd 2>dump.tmp"]] "" "/dev/null"]
1243 set cmdret [lindex $cmdret 0]
1244 remote_upload host "dump.tmp"
1245 set comp_output [prune_warnings [file_contents "dump.tmp"]]
1246 remote_file host delete "dump.tmp"
1247 remote_file build delete "dump.tmp"
1248 if {[info exists old_lc_all]} {
1249 set env(LC_ALL) $old_lc_all
1250 } else {
1251 unset env(LC_ALL)
1252 }
1253 if { $cmdret != 0 || $comp_output != "" } {
1254 send_log "exited abnormally with $cmdret, output:$comp_output\n"
1255 fail $testname
1256 return
1257 }
1258
1259 if { $verbose > 2 } then { verbose "output is [file_contents $dumpfile]" 3 }
1260
1261 # Create the substition list for objdump output.
1262 set regexp_subst ""
1263 if { $sect_names != "" } {
1264 set regexp_subst [list "\\\\?\\.text" [lindex $sect_names 0] \
1265 "\\\\?\\.data" [lindex $sect_names 1] \
1266 "\\\\?\\.bss" [lindex $sect_names 2] ]
1267 }
1268
1269 if { [regexp_diff $dumpfile "${dfile}" $regexp_subst] } then {
1270 fail $testname
1271 if { $verbose == 2 } then { verbose "output is [file_contents $dumpfile]" 2 }
1272 return
1273 }
1274
1275 pass $testname
1276}
1277
1278proc slurp_options { file } {
1279 # If options_regsub(foo) is set to {a b}, then the contents of a
1280 # "#foo:" line will have regsub -all applied to replace a with b.
1281 global options_regsub
1282
1283 if [catch { set f [open $file r] } x] {
1284 #perror "couldn't open `$file': $x"
1285 perror "$x"
1286 return -1
1287 }
1288 set opt_array {}
1289 # whitespace expression
1290 set ws {[ ]*}
1291 set nws {[^ ]*}
1292 # whitespace is ignored anywhere except within the options list;
1293 # option names are alphanumeric plus underscore.
1294 set pat "^#${ws}(\[a-zA-Z0-9_\]*)$ws:${ws}(.*)$ws\$"
1295 while { [gets $f line] != -1 } {
1296 set line [string trim $line]
1297 # Whitespace here is space-tab.
1298 if [regexp $pat $line xxx opt_name opt_val] {
1299 # match!
1300 if [info exists options_regsub($opt_name)] {
1301 set subst $options_regsub($opt_name)
1302 regsub -all -- [lindex $subst 0] $opt_val [lindex $subst 1] \
1303 opt_val
1304 }
1305 lappend opt_array [list $opt_name $opt_val]
1306 } elseif {![regexp "^#" $line ]} {
1307 break
1308 }
1309 }
1310 close $f
1311 return $opt_array
1312}
1313
1314proc file_contents { filename } {
1315 set file [open $filename r]
1316 set contents [read $file]
1317 close $file
1318 return $contents
1319}
1320
1321proc set_file_contents { filename contents } {
1322 set file [open $filename w]
1323 puts $file "$contents"
1324 close $file
1325}
1326
1327# Look for big-endian or little-endian switches in the multlib
1328# options and translate these into a -EB or -EL switch. Note
1329# we cannot rely upon proc process_multilib_options to do this
1330# for us because for some targets the compiler does not support
1331# -EB/-EL but it does support -mbig-endian/-mlittle-endian, and
1332# the site.exp file will include the switch "-mbig-endian"
1333# (rather than "big-endian") which is not detected by proc
1334# process_multilib_options.
1335#
1336proc big_or_little_endian {} {
1337
1338 if [board_info [target_info name] exists multilib_flags] {
1339 set tmp_flags " [board_info [target_info name] multilib_flags]"
1340
1341 foreach x $tmp_flags {
1342 case $x in {
1343 {*big*endian eb EB -eb -EB -mb -meb} {
1344 set flags " -EB"
1345 return $flags
1346 }
1347 {*little*endian el EL -el -EL -ml -mel} {
1348 set flags " -EL"
1349 return $flags
1350 }
1351 }
1352 }
1353 }
1354
1355 set flags ""
1356 return $flags
1357}
1358
1359# Internal procedure: return the names of the standard sections
1360#
1361proc get_standard_section_names {} {
1362 if [istarget "rx-*-*"] {
1363 return { "P" "D_1" "B_1" }
1364 }
0b1352e0
AM
1365 if { [istarget "alpha*-*-*vms*"] || [is_som_format] } {
1366 return { {\$CODE\$} {\$DATA\$} {\$BSS\$} }
8ffb70eb
AM
1367 }
1368 return
1369}
This page took 0.373492 seconds and 4 git commands to generate.