mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-23 13:21:43 +08:00
bpf: add missing tests from previous commits
2020-08-07 David Faust <david.faust@oracle.com> * testsuite/ld-bpf/call-3.s: New file. * testsuite/ld-bpf/call-3.d: Likewise.
This commit is contained in:
parent
d844f10ac2
commit
aebda2fbcb
19
ld/testsuite/ld-bpf/call-3.d
Normal file
19
ld/testsuite/ld-bpf/call-3.d
Normal file
@ -0,0 +1,19 @@
|
||||
#as: --EL
|
||||
#source: call-3.s
|
||||
#objdump: -dr
|
||||
#ld: -EL
|
||||
#name: CALL check unsigned underflow
|
||||
|
||||
.*: +file format .*bpf.*
|
||||
|
||||
Disassembly of section .text:
|
||||
|
||||
[0-9a-f]+ <bar>:
|
||||
*[0-9a-f]+: b7 00 00 00 00 00 00 00 mov %r0,0
|
||||
*[0-9a-f]+: 95 00 00 00 00 00 00 00 exit
|
||||
|
||||
[0-9a-f]+ <main>:
|
||||
*[0-9a-f]+: b7 00 00 00 03 00 00 00 mov %r0,3
|
||||
*[0-9a-f]+: b7 01 00 00 01 00 00 00 mov %r1,1
|
||||
*[0-9a-f]+: 85 10 00 00 fb ff ff ff call -5
|
||||
*[0-9a-f]+: 95 00 00 00 00 00 00 00 exit
|
12
ld/testsuite/ld-bpf/call-3.s
Normal file
12
ld/testsuite/ld-bpf/call-3.s
Normal file
@ -0,0 +1,12 @@
|
||||
.text
|
||||
.align 4
|
||||
.global bar
|
||||
bar:
|
||||
mov %r0, 0
|
||||
exit
|
||||
|
||||
main:
|
||||
mov %r0, 3
|
||||
mov %r1, 1
|
||||
call bar
|
||||
exit
|
Loading…
Reference in New Issue
Block a user