From: Jose E. Marchesi Date: Wed, 12 Aug 2020 13:42:40 +0000 (+0200) Subject: bpf: add missing tests from previous commits X-Git-Tag: binutils-2_35_1~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ab18c12d590632cf6644cd1c774d6f8fb97bc71;p=thirdparty%2Fbinutils-gdb.git bpf: add missing tests from previous commits 2020-08-07 David Faust * testsuite/ld-bpf/call-3.s: New file. * testsuite/ld-bpf/call-3.d: Likewise. --- diff --git a/ld/testsuite/ld-bpf/call-3.d b/ld/testsuite/ld-bpf/call-3.d new file mode 100644 index 00000000000..d371cd7d44a --- /dev/null +++ b/ld/testsuite/ld-bpf/call-3.d @@ -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]+ : + *[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]+
: + *[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 diff --git a/ld/testsuite/ld-bpf/call-3.s b/ld/testsuite/ld-bpf/call-3.s new file mode 100644 index 00000000000..d4c042cba83 --- /dev/null +++ b/ld/testsuite/ld-bpf/call-3.s @@ -0,0 +1,12 @@ + .text + .align 4 + .global bar +bar: + mov %r0, 0 + exit + +main: + mov %r0, 3 + mov %r1, 1 + call bar + exit