Update PR ld/14962 testcase
[deliverable/binutils-gdb.git] / gas / testsuite / gas / microblaze / reloc_sym.exp
CommitLineData
28ad2e2d
ME
1# Relocation test.
2
3proc ld_test { objects ldflags dest test } {
4 set ld_output [target_link $objects $dest $ldflags]
5 if [string match "" $ld_output] then { pass $test } else { fail $test }
6}
7
8proc objdump_test { exec flags dest test } {
9 set objcopy [find_binutils_prog objdump]
10 verbose -log "$objcopy $flags $exec > $dest"
11 catch "exec $objcopy $flags $exec > $dest" objdump_output
12 if [string match "" $objdump_output] then { pass $test } else { fail $test }
13}
14
15proc regexp_test { file1 file2 test } {
16 if [regexp_diff $file1 $file2] then { fail $test } else { pass $test }
17}
18
19
20global srcdir subdir
21if [istarget microblaze*-*-*] {
22 gas_test "reloc_strongsym.s" {-o reloc_strongsym.o} {} {assembling reloc_strongsym}
23 gas_test "reloc_weaksym.s" {-o reloc_weaksym.o} {} {assembling reloc_weaksym}
24 ld_test {reloc_strongsym.o reloc_weaksym.o} {-e 0 -section-start .text=0x10000054 -section-start .testsection=0x4} {reloc_sym.x} {linking reloc_sym.x}
25 objdump_test {reloc_sym.x} {-d --section=.text --section=.testsection} {reloc_sym.dump} {disassembling reloc_sym.x}
26 regexp_test {reloc_sym.dump} "$srcdir/$subdir/reloc_sym.d" {matching disassembly}
27}
This page took 0.03274 seconds and 4 git commands to generate.