Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save froggey/487fb7023e58fe5ea36f47293be4e98c to your computer and use it in GitHub Desktop.

Select an option

Save froggey/487fb7023e58fe5ea36f47293be4e98c to your computer and use it in GitHub Desktop.
$ cat test.s
b foo
b foo
b foo
b foo
foo:
b foo
b foo
b foo
b foo
$ aarch64-elf-as test.s -o test.o
$ aarch64-elf-objdump -dr test.o
test.o: file format elf64-littleaarch64
Disassembly of section .text:
0000000000000000 <foo-0x10>:
0: 14000004 b 10 <foo>
4: 14000003 b 10 <foo>
8: 14000002 b 10 <foo>
c: 14000001 b 10 <foo>
0000000000000010 <foo>:
10: 14000000 b 10 <foo>
14: 17ffffff b 10 <foo>
18: 17fffffe b 10 <foo>
1c: 17fffffd b 10 <foo>
;; mezzano equivalent
(sys.lap:perform-assembly-using-target (make-instance 'sys.c::arm64-target)
'((mezzano.lap.arm64:b foo)
(mezzano.lap.arm64:b foo)
(mezzano.lap.arm64:b foo)
(mezzano.lap.arm64:b foo)
foo
(mezzano.lap.arm64:b foo)
(mezzano.lap.arm64:b foo)
(mezzano.lap.arm64:b foo)
(mezzano.lap.arm64:b foo)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment