Commit | Line | Data |
---|---|---|
16a57284 | 1 | # Expect script for ld-weak tests |
5940a93c TS |
2 | # Copyright 2001, 2002, 2003, 2004, 2005, 2007, 2010 |
3 | # Free Software Foundation, Inc. | |
16a57284 | 4 | # |
f96b4a7b NC |
5 | # This file is part of the GNU Binutils. |
6 | # | |
7 | # This program is free software; you can redistribute it and/or modify | |
16a57284 | 8 | # it under the terms of the GNU General Public License as published by |
f96b4a7b | 9 | # the Free Software Foundation; either version 3 of the License, or |
16a57284 | 10 | # (at your option) any later version. |
f96b4a7b | 11 | # |
16a57284 L |
12 | # This program is distributed in the hope that it will be useful, |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | # GNU General Public License for more details. | |
f96b4a7b | 16 | # |
16a57284 L |
17 | # You should have received a copy of the GNU General Public License |
18 | # along with this program; if not, write to the Free Software | |
f96b4a7b NC |
19 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, |
20 | # MA 02110-1301, USA. | |
16a57284 L |
21 | # |
22 | # Written by H.J. Lu (hjl@gnu.org) | |
23 | # Eric Youngdale (eric@andante.jic.com) | |
24 | # | |
25 | ||
26 | # This test can only be run if ld generates native executables. | |
27 | if ![isnative] then {return} | |
28 | ||
29 | # This test can only be run on a couple of ELF platforms. | |
30 | # Square bracket expressions seem to confuse istarget. | |
31 | # This is similar to the test that is used in ld-shared, BTW. | |
5c449c3f | 32 | if { ![istarget alpha*-*-linux*] \ |
59758b1c | 33 | && ![istarget arm*-*-linux*] \ |
5c449c3f | 34 | && ![istarget hppa*64*-*-hpux*] \ |
19c7c582 AM |
35 | && ![istarget hppa*-*-linux*] \ |
36 | && ![istarget i?86-*-sysv4*] \ | |
16a57284 L |
37 | && ![istarget i?86-*-unixware] \ |
38 | && ![istarget i?86-*-elf*] \ | |
39 | && ![istarget i?86-*-linux*] \ | |
5940a93c | 40 | && ![istarget i?86-*-gnu*] \ |
16a57284 L |
41 | && ![istarget ia64-*-elf*] \ |
42 | && ![istarget ia64-*-linux*] \ | |
43 | && ![istarget m68k-*-linux*] \ | |
44 | && ![istarget mips*-*-irix5*] \ | |
59758b1c | 45 | && ![istarget mips*-*-linux*] \ |
24b01a74 AM |
46 | && ![istarget powerpc*-*-elf*] \ |
47 | && ![istarget powerpc*-*-linux*] \ | |
48 | && ![istarget powerpc*-*-sysv4*] \ | |
59758b1c | 49 | && ![istarget sh\[34\]*-*-linux*] \ |
16a57284 L |
50 | && ![istarget sparc*-*-elf] \ |
51 | && ![istarget sparc*-*-solaris2*] \ | |
59758b1c | 52 | && ![istarget sparc*-*-linux*] } { |
16a57284 L |
53 | return |
54 | } | |
55 | ||
56 | if { [istarget i?86-*-linux*aout*] \ | |
57 | || [istarget i?86-*-linux*oldld*] \ | |
58 | || [istarget m68k-*-linux*aout*] } { | |
59 | return | |
60 | } | |
61 | ||
62 | if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } { | |
63 | return | |
64 | } | |
65 | ||
66 | set diff diff | |
67 | set tmpdir tmpdir | |
68 | set DOBJDUMP_FLAGS --dynamic-syms | |
69 | set SOBJDUMP_FLAGS --syms | |
70 | set shared --shared | |
71 | ||
5940a93c TS |
72 | |
73 | # <http://www.gnu.org/software/hurd/open_issues/binutils/testsuite.html#weak> | |
74 | proc setup_xfail_gnu_hurd {} { | |
75 | global target_triplet | |
76 | # Be cautious to not XFAIL for *-*-linux-gnu*, *-*-kfreebsd-gnu*, etc. | |
77 | switch -regexp $target_triplet { | |
78 | ^\[^-\]*-\[^-\]*-gnu.*$ { | |
79 | setup_xfail "*-*-*" | |
80 | } | |
81 | } | |
82 | } | |
83 | ||
16a57284 L |
84 | # |
85 | # objdump_symstuff | |
86 | # Dump non-dynamic symbol stuff and make sure that it is sane. | |
87 | # | |
88 | proc objdump_symstuff { objdump object expectfile } { | |
89 | global SOBJDUMP_FLAGS | |
90 | global version_output | |
91 | global diff | |
92 | global tmpdir | |
93 | ||
94 | if ![info exists SOBJDUMP_FLAGS] { set SOBJDUMP_FLAGS "" } | |
95 | ||
96 | verbose -log "$objdump $SOBJDUMP_FLAGS $object | grep foo$ > $tmpdir/objdump.out" | |
97 | ||
98 | catch "exec $objdump $SOBJDUMP_FLAGS $object | grep foo$ > $tmpdir/objdump.out" exec_output | |
99 | set exec_output [prune_warnings $exec_output] | |
100 | if [string match "" $exec_output] then { | |
101 | ||
102 | # Now do a line-by-line comparison to effectively diff the darned things | |
103 | # The stuff coming from the expectfile is actually a regex, so we can | |
104 | # skip over the actual addresses and so forth. This is currently very | |
105 | # simpleminded - it expects a one-to-one correspondence in terms of line | |
106 | # numbers. | |
107 | ||
108 | if [file exists $expectfile] then { | |
109 | set file_a [open $expectfile r] | |
110 | } else { | |
111 | perror "$expectfile doesn't exist" | |
112 | return 0 | |
113 | } | |
114 | ||
115 | if [file exists $tmpdir/objdump.out] then { | |
116 | set file_b [open $tmpdir/objdump.out r] | |
117 | } else { | |
118 | perror "$tmpdir/objdump.out doesn't exist" | |
119 | return 0 | |
120 | } | |
121 | ||
122 | verbose "# Diff'ing: $expectfile $tmpdir/objdump.out" 2 | |
123 | ||
124 | set eof -1 | |
125 | set differences 0 | |
126 | ||
127 | while { [gets $file_a line] != $eof } { | |
128 | if [regexp "^#.*$" $line] then { | |
129 | continue | |
130 | } else { | |
131 | lappend list_a $line | |
132 | } | |
133 | } | |
134 | close $file_a | |
135 | ||
136 | while { [gets $file_b line] != $eof } { | |
137 | if [regexp "^#.*$" $line] then { | |
138 | continue | |
139 | } else { | |
140 | lappend list_b $line | |
141 | } | |
142 | } | |
143 | close $file_b | |
144 | ||
145 | for { set i 0 } { $i < [llength $list_a] } { incr i } { | |
146 | set line_a [lindex $list_a $i] | |
147 | set line_b [lindex $list_b $i] | |
148 | ||
149 | ||
150 | verbose "\t$expectfile: $i: $line_a" 3 | |
151 | verbose "\t/tmp/objdump.out: $i: $line_b" 3 | |
152 | if [regexp $line_a $line_b] then { | |
153 | continue | |
154 | } else { | |
155 | verbose -log "\t$expectfile: $i: $line_a" | |
156 | verbose -log "\t$tmpdir/objdump.out: $i: $line_b" | |
157 | ||
158 | return 0 | |
159 | } | |
160 | } | |
161 | ||
162 | if { [llength $list_a] != [llength $list_b] } { | |
163 | verbose -log "Line count" | |
164 | return 0 | |
165 | } | |
166 | ||
167 | if $differences<1 then { | |
168 | return 1 | |
169 | } | |
170 | ||
171 | return 0 | |
172 | } else { | |
173 | verbose -log "$exec_output" | |
174 | return 0 | |
175 | } | |
176 | ||
177 | } | |
178 | ||
179 | # | |
180 | # objdump_dymsymstuff | |
181 | # Dump dynamic symbol stuff and make sure that it is sane. | |
182 | # | |
183 | proc objdump_dynsymstuff { objdump object expectfile } { | |
184 | global DOBJDUMP_FLAGS | |
185 | global version_output | |
186 | global diff | |
187 | global tmpdir | |
188 | ||
189 | if ![info exists DOBJDUMP_FLAGS] { set DOBJDUMP_FLAGS "" } | |
190 | ||
191 | verbose -log "$objdump $DOBJDUMP_FLAGS $object | grep foo$ > $tmpdir/objdump.out" | |
192 | ||
193 | catch "exec $objdump $DOBJDUMP_FLAGS $object | grep foo$ > $tmpdir/objdump.out" exec_output | |
194 | set exec_output [prune_warnings $exec_output] | |
195 | if [string match "" $exec_output] then { | |
196 | ||
197 | # Now do a line-by-line comparison to effectively diff the darned things | |
198 | # The stuff coming from the expectfile is actually a regex, so we can | |
199 | # skip over the actual addresses and so forth. This is currently very | |
200 | # simpleminded - it expects a one-to-one correspondence in terms of line | |
201 | # numbers. | |
202 | ||
203 | if [file exists $expectfile] then { | |
204 | set file_a [open $expectfile r] | |
205 | } else { | |
206 | warning "$expectfile doesn't exist" | |
207 | return 0 | |
208 | } | |
209 | ||
210 | if [file exists $tmpdir/objdump.out] then { | |
211 | set file_b [open $tmpdir/objdump.out r] | |
212 | } else { | |
213 | fail "$tmpdir/objdump.out doesn't exist" | |
214 | return 0 | |
215 | } | |
216 | ||
217 | verbose "# Diff'ing: $expectfile $tmpdir/objdump.out" 2 | |
218 | ||
219 | set eof -1 | |
220 | set differences 0 | |
221 | ||
222 | while { [gets $file_a line] != $eof } { | |
223 | if [regexp "^#.*$" $line] then { | |
224 | continue | |
225 | } else { | |
226 | lappend list_a $line | |
227 | } | |
228 | } | |
229 | close $file_a | |
230 | ||
231 | while { [gets $file_b line] != $eof } { | |
232 | if [regexp "^#.*$" $line] then { | |
233 | continue | |
234 | } else { | |
235 | lappend list_b $line | |
236 | } | |
237 | } | |
238 | close $file_b | |
239 | ||
240 | for { set i 0 } { $i < [llength $list_b] } { incr i } { | |
241 | set line_b [lindex $list_b $i] | |
242 | ||
243 | # The tests are rigged so that we should never export a symbol with the | |
244 | # word 'hide' in it. Thus we just search for it, and bail if we find it. | |
245 | if [regexp "hide" $line_b] then { | |
246 | verbose -log "\t$tmpdir/objdump.out: $i: $line_b" | |
247 | ||
248 | return 0 | |
249 | } | |
250 | ||
251 | verbose "\t$expectfile: $i: $line_b" 3 | |
252 | ||
253 | # We can't assume that the sort is consistent across | |
254 | # systems, so we must check each regexp. When we find a | |
255 | # regexp, we null it out, so we don't match it twice. | |
256 | for { set j 0 } { $j < [llength $list_a] } { incr j } { | |
257 | set line_a [lindex $list_a $j] | |
258 | ||
259 | if [regexp $line_a $line_b] then { | |
260 | lreplace $list_a $j $j "CAN NOT MATCH" | |
261 | break | |
262 | } | |
263 | } | |
264 | ||
265 | if { $j >= [llength $list_a] } { | |
266 | verbose -log "\t$tmpdir/objdump.out: $i: $line_b" | |
267 | ||
268 | return 0 | |
269 | } | |
270 | } | |
271 | ||
272 | if { [llength $list_a] != [llength $list_b] } { | |
273 | verbose -log "Line count" | |
274 | return 0 | |
275 | } | |
276 | ||
277 | if $differences<1 then { | |
278 | return 1 | |
279 | } | |
280 | ||
281 | return 0 | |
282 | } else { | |
283 | verbose -log "$exec_output" | |
284 | return 0 | |
285 | } | |
286 | ||
287 | } | |
288 | ||
bd7c9df6 | 289 | proc build_lib {test libname objs dynsymexp} { |
b765d4e3 | 290 | global CC |
16a57284 L |
291 | global objdump |
292 | global tmpdir | |
293 | global shared | |
294 | global srcdir | |
295 | global subdir | |
296 | ||
bd7c9df6 L |
297 | set files "" |
298 | foreach obj $objs { | |
299 | set files "$files $tmpdir/$obj" | |
300 | } | |
301 | ||
b765d4e3 | 302 | if {![ld_simple_link $CC $tmpdir/$libname.so "$shared $files"]} { |
16a57284 L |
303 | fail $test |
304 | return | |
305 | } | |
306 | ||
a664545d L |
307 | if {![string match "" $dynsymexp] \ |
308 | && ![objdump_dynsymstuff $objdump $tmpdir/$libname.so $srcdir/$subdir/$dynsymexp]} { | |
16a57284 L |
309 | fail $test |
310 | return | |
311 | } | |
312 | pass $test | |
313 | } | |
314 | ||
bd7c9df6 | 315 | proc build_exec { test execname objs flags dat dynsymexp symexp} { |
b765d4e3 | 316 | global CC |
16a57284 L |
317 | global objdump |
318 | global tmpdir | |
319 | global shared | |
320 | global srcdir | |
321 | global subdir | |
322 | global exec_output | |
323 | ||
bd7c9df6 L |
324 | set files "" |
325 | foreach obj $objs { | |
326 | set files "$files $tmpdir/$obj" | |
327 | } | |
328 | ||
b765d4e3 | 329 | if {![ld_simple_link $CC $tmpdir/$execname "$flags $files"]} { |
16a57284 L |
330 | fail "$test" |
331 | return | |
332 | } | |
333 | ||
334 | if {![string match "" $dynsymexp]} then { | |
335 | if {![objdump_dynsymstuff $objdump $tmpdir/$execname $srcdir/$subdir/$dynsymexp]} { | |
336 | fail $test | |
337 | return | |
338 | } | |
339 | } | |
340 | ||
341 | if {![string match "" $symexp]} then { | |
342 | if {![objdump_symstuff $objdump $tmpdir/$execname $srcdir/$subdir/$symexp]} { | |
343 | fail $test | |
344 | return | |
345 | } | |
346 | } | |
347 | ||
348 | # Run the resulting program | |
349 | send_log "$tmpdir/$execname >$tmpdir/$execname.out\n" | |
350 | verbose "$tmpdir/$execname >$tmpdir/$execname.out" | |
351 | catch "exec $tmpdir/$execname >$tmpdir/$execname.out" exec_output | |
352 | if ![string match "" $exec_output] then { | |
353 | send_log "$exec_output\n" | |
354 | verbose "$exec_output" | |
355 | fail $test | |
356 | return | |
357 | } | |
358 | ||
359 | send_log "diff $tmpdir/$execname.out $srcdir/$subdir/$dat.dat\n" | |
360 | verbose "diff $tmpdir/$execname.out $srcdir/$subdir/$dat.dat" | |
361 | catch "exec diff $tmpdir/$execname.out $srcdir/$subdir/$dat.dat" exec_output | |
362 | set exec_output [prune_warnings $exec_output] | |
363 | ||
364 | if {![string match "" $exec_output]} then { | |
365 | send_log "$exec_output\n" | |
366 | verbose "$exec_output" | |
367 | fail $test | |
368 | return | |
369 | } | |
370 | ||
371 | pass $test | |
372 | } | |
373 | ||
374 | if [istarget mips*-*-*] { | |
375 | set picflag "" | |
376 | } else { | |
377 | # Unfortunately, the gcc argument is -fpic and the cc argument is | |
378 | # -KPIC. We have to try both. | |
379 | set picflag "-fpic" | |
380 | send_log "$CC $picflag\n" | |
381 | verbose "$CC $picflag" | |
382 | catch "exec $CC $picflag" exec_output | |
383 | send_log "$exec_output\n" | |
384 | verbose "--" "$exec_output" | |
385 | if { [string match "*illegal option*" $exec_output] \ | |
386 | || [string match "*option ignored*" $exec_output] \ | |
387 | || [string match "*unrecognized option*" $exec_output] \ | |
388 | || [string match "*passed to ld*" $exec_output] } { | |
389 | if [istarget *-*-sunos4*] { | |
390 | set picflag "-pic" | |
391 | } else { | |
392 | set picflag "-KPIC" | |
393 | } | |
394 | } | |
395 | } | |
396 | verbose "Using $picflag to compile PIC code" | |
397 | ||
398 | if ![ld_compile "$CC $CFLAGS $picflag" $srcdir/$subdir/foo.c $tmpdir/foo.o] { | |
399 | unresolved "ELF weak" | |
400 | return | |
401 | } | |
402 | ||
403 | if ![ld_compile "$CC $CFLAGS $picflag" $srcdir/$subdir/bar.c $tmpdir/bar.o] { | |
404 | unresolved "ELF weak" | |
405 | return | |
406 | } | |
407 | ||
408 | if ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/main.c $tmpdir/main.o] { | |
409 | unresolved "ELF weak" | |
410 | return | |
411 | } | |
412 | ||
b765d4e3 | 413 | if {![ld_simple_link $CC $tmpdir/libbar.so "$shared $tmpdir/bar.o"]} { |
bd7c9df6 L |
414 | fail "ELF weak" |
415 | return | |
416 | } | |
417 | ||
418 | if ![ld_compile "$CC $CFLAGS $picflag" $srcdir/$subdir/foo1a.c $tmpdir/foo1a.o] { | |
419 | unresolved "ELF weak" | |
420 | return | |
421 | } | |
422 | ||
423 | if ![ld_compile "$CC $CFLAGS $picflag" $srcdir/$subdir/foo1b.c $tmpdir/foo1b.o] { | |
424 | unresolved "ELF weak" | |
425 | return | |
426 | } | |
427 | ||
b765d4e3 | 428 | if ![ld_compile "$CC $CFLAGS $picflag" $srcdir/$subdir/bar1a.c $tmpdir/bar1a.o] { |
bd7c9df6 L |
429 | unresolved "ELF weak" |
430 | return | |
431 | } | |
432 | ||
b765d4e3 | 433 | if ![ld_compile "$CC $CFLAGS $picflag" $srcdir/$subdir/bar1b.c $tmpdir/bar1b.o] { |
bd7c9df6 L |
434 | unresolved "ELF weak" |
435 | return | |
436 | } | |
437 | ||
b765d4e3 | 438 | if ![ld_compile "$CC $CFLAGS $picflag" $srcdir/$subdir/bar1c.c $tmpdir/bar1c.o] { |
bd7c9df6 L |
439 | unresolved "ELF weak" |
440 | return | |
441 | } | |
442 | ||
443 | if ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/main1.c $tmpdir/main1.o] { | |
444 | unresolved "ELF weak" | |
445 | return | |
446 | } | |
447 | ||
b765d4e3 | 448 | if {![ld_simple_link $CC $tmpdir/libfoo1a.so "$shared $tmpdir/foo1a.o"]} { |
bd7c9df6 L |
449 | fail "ELF weak" |
450 | return | |
451 | } | |
452 | ||
b765d4e3 | 453 | if {![ld_simple_link $CC $tmpdir/libfoo1b.so "$shared $tmpdir/foo1b.o"]} { |
16a57284 L |
454 | fail "ELF weak" |
455 | return | |
456 | } | |
457 | ||
b765d4e3 | 458 | if {![ld_simple_link $CC $tmpdir/libbar1a.so "$shared $tmpdir/bar1a.o $tmpdir/libfoo1a.so"]} { |
0c52a746 L |
459 | fail "ELF weak" |
460 | return | |
461 | } | |
462 | ||
bd7c9df6 L |
463 | build_lib "ELF DSO weak func first" libfoo "foo.o bar.o" dso.dsym |
464 | build_lib "ELF DSO weak func last" libfoo "bar.o foo.o" dso.dsym | |
bd7c9df6 | 465 | build_lib "ELF DSO weak func first DSO" libfoo "foo.o libbar.so" dsow.dsym |
bd7c9df6 L |
466 | build_lib "ELF DSO weak func last DSO" libfoo "libbar.so foo.o" dsow.dsym |
467 | build_exec "ELF weak func first" foo "main.o bar.o" "" strong "" strong.sym | |
468 | build_exec "ELF weak func last" foo "bar.o main.o" "" strong "" strong.sym | |
5940a93c | 469 | setup_xfail_gnu_hurd |
b765d4e3 | 470 | build_exec "ELF weak func first DSO" foo "main.o libbar.so" "-Wl,-rpath,." weak weak.dsym "" |
5940a93c | 471 | setup_xfail_gnu_hurd |
b765d4e3 | 472 | build_exec "ELF weak func last DSO" foo "libbar.so main.o" "-Wl,-rpath,." weak weak.dsym "" |
bd7c9df6 L |
473 | |
474 | build_lib "ELF DSO weak data first" libfoo "bar1a.o foo1a.o" dsodata.dsym | |
475 | build_lib "ELF DSO weak data last" libfoo "foo1a.o bar1a.o" dsodata.dsym | |
0c52a746 | 476 | build_lib "ELF DSO weak data first DSO" libfoo "main1.o libfoo1a.so" dsowdata.dsym |
0c52a746 | 477 | build_lib "ELF DSO weak data last DSO" libfoo "libfoo1a.so main1.o" dsowdata.dsym |
0c52a746 | 478 | build_lib "ELF DSO weak data first DSO common" libfoo "main1.o libfoo1b.so" dsowdata.dsym |
0c52a746 | 479 | build_lib "ELF DSO weak data last DSO common" libfoo "libfoo1b.so main1.o" dsowdata.dsym |
bd7c9df6 L |
480 | build_exec "ELF weak data first" foo "main1.o bar1a.o foo1a.o" "" strongdata "" strongdata.sym |
481 | build_exec "ELF weak data last" foo "foo1a.o main1.o bar1a.o" "" strongdata "" strongdata.sym | |
482 | build_exec "ELF weak data first common" foo "main1.o bar1a.o foo1b.o" "" strongdata "" strongcomm.sym | |
483 | build_exec "ELF weak data last common" foo "foo1b.o main1.o bar1a.o" "" strongdata "" strongcomm.sym | |
5940a93c | 484 | setup_xfail_gnu_hurd |
b765d4e3 | 485 | build_exec "ELF weak data first DSO" foo "main1.o libbar1a.so libfoo1a.so" "-Wl,-rpath,." weakdata weakdata.dsym "" |
5940a93c | 486 | setup_xfail_gnu_hurd |
b765d4e3 | 487 | build_exec "ELF weak data last DSO" foo "libfoo1a.so main1.o libbar1a.so" "-Wl,-rpath,." weakdata weakdata.dsym "" |
5940a93c | 488 | setup_xfail_gnu_hurd |
b765d4e3 | 489 | build_exec "ELF weak data first DSO common" foo "main1.o libbar1a.so libfoo1b.so" "-Wl,-rpath,." weakdata weakdata.dsym "" |
5940a93c | 490 | setup_xfail_gnu_hurd |
b765d4e3 | 491 | build_exec "ELF weak data last DSO common" foo "libfoo1b.so main1.o libbar1a.so" "-Wl,-rpath,." weakdata weakdata.dsym "" |
a664545d L |
492 | |
493 | if ![ld_compile "$CC $CFLAGS $picflag" $srcdir/$subdir/size_foo.c $tmpdir/size_foo.o] { | |
494 | unresolved "ELF weak (size)" | |
495 | return | |
496 | } | |
497 | ||
498 | if ![ld_compile "$CC $CFLAGS $picflag" $srcdir/$subdir/size_bar.c $tmpdir/size_bar.o] { | |
499 | unresolved "ELF weak (size)" | |
500 | return | |
501 | } | |
502 | ||
503 | build_lib "ELF DSO small bar (size)" libsize_bar "size_bar.o" "" | |
504 | build_lib "ELF DSO foo with small bar (size)" libsize_foo "size_foo.o libsize_bar.so" "" | |
505 | ||
506 | if ![ld_compile "$CC $CFLAGS $picflag -DSIZE_BIG" $srcdir/$subdir/size_bar.c $tmpdir/size_bar.o] { | |
507 | unresolved "ELF weak (size)" | |
508 | return | |
509 | } | |
510 | ||
511 | build_lib "ELF DSO big bar (size)" libsize_bar "size_bar.o" "" | |
512 | ||
513 | if ![ld_compile "$CC $CFLAGS" $srcdir/$subdir/size_main.c $tmpdir/size_main.o] { | |
514 | unresolved "ELF weak (size)" | |
515 | return | |
516 | } | |
517 | ||
518 | build_exec "ELF weak size" size_main "size_main.o libsize_foo.so libsize_bar.so" "-Wl,-rpath,." size "" "" | |
5cfd5a0c PB |
519 | |
520 | verbose "size2" | |
521 | run_dump_test $srcdir/$subdir/size2 |