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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [gas/] [testsuite/] [gas/] [mep/] [complex-relocs.exp] - Blame information for rev 832

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

Line No. Rev Author Line
1 38 julius
# complex relocations testsuite
2
 
3
proc 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
 
8
proc ld_test_error { objects ldflags dest test } {
9
    set ld_output [target_link $objects $dest $ldflags]
10
    if [string match "" $ld_output] then { fail $test } else { pass $test }
11
}
12
 
13
proc objdump_test { exec flags dest test } {
14
    set objdump [find_binutils_prog objdump]
15
    verbose -log "$objdump $flags $exec > $dest"
16
    catch "exec $objdump $flags $exec > $dest" objdump_output
17
    if [string match "" $objdump_output] then { pass $test } else { fail $test }
18
}
19
 
20
proc regexp_test { file1 file2 test } {
21
    if [regexp_diff $file1 $file2] then { fail $test } else { pass $test }
22
}
23
 
24
 
25
global srcdir subdir
26
if [istarget mep*-*-*] {
27
 
28
    # test that complex relocs between files work, generally
29
    gas_test relocs-junk1.s {-mconfig=fmax -o relocs-junk1.o} {} {assembling relocs-junk1}
30
    gas_test relocs-syms.s {-mconfig=fmax -o relocs-syms.o} {} {assembling relocs-syms}
31
    gas_test relocs-junk2.s {-mconfig=fmax -o relocs-junk2.o} {} {assembling relocs-junk2}
32
    gas_test relocs-refs.s {-mconfig=fmax -o relocs-refs.o} {} {assembling relocs-refs}
33
    ld_test {relocs-junk1.o relocs-syms.o relocs-junk2.o relocs-refs.o} {--defsym __stack=0x1ffff0 --defsym __sbss_end=0x1000 -e 1233} {relocs.x} {linking relocs.x}
34
    objdump_test {relocs.x} {-dzs} {relocs.dump} {disassembling relocs.x}
35
    regexp_test {relocs.dump} "$srcdir/$subdir/relocs.d" {matching disassembly for relocs.x}
36
 
37
    foreach test {3} {
38
        # perform specific negative boundary tests
39
        gas_test "relocs-bad$test.s" [list -mconfig=fmax -o "relocs-bad$test.o"] {} [list assembling "relocs-bad$test"]
40
        ld_test_error "relocs-bad$test.o" {-e 1233} "relocs-bad$test.x" [list linking "relocs-bad$test"]
41
    }
42
}

powered by: WebSVN 2.1.0

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