riscv32-unknown-elf-gcc bootstrap.S main.c -o main -march=rv32i -mabi=ilp32 -nostartfiles -Wl,--no-relax -T link.ld
riscv32-unknown-elf-objdump -D main

main:     file format elf32-littleriscv


Disassembly of section .text:

80000000 <_start>:
80000000:	000070b3          	and	ra,zero,zero
80000004:	00007133          	and	sp,zero,zero
80000008:	000071b3          	and	gp,zero,zero
8000000c:	00007233          	and	tp,zero,zero
80000010:	000072b3          	and	t0,zero,zero
80000014:	00007333          	and	t1,zero,zero
80000018:	000073b3          	and	t2,zero,zero
8000001c:	00007433          	and	s0,zero,zero
80000020:	000074b3          	and	s1,zero,zero
80000024:	00007533          	and	a0,zero,zero
80000028:	000075b3          	and	a1,zero,zero
8000002c:	00007633          	and	a2,zero,zero
80000030:	000076b3          	and	a3,zero,zero
80000034:	00007733          	and	a4,zero,zero
80000038:	000077b3          	and	a5,zero,zero
8000003c:	00007833          	and	a6,zero,zero
80000040:	000078b3          	and	a7,zero,zero
80000044:	00007933          	and	s2,zero,zero
80000048:	000079b3          	and	s3,zero,zero
8000004c:	00007a33          	and	s4,zero,zero
80000050:	00007ab3          	and	s5,zero,zero
80000054:	00007b33          	and	s6,zero,zero
80000058:	00007bb3          	and	s7,zero,zero
8000005c:	00007c33          	and	s8,zero,zero
80000060:	00007cb3          	and	s9,zero,zero
80000064:	00007d33          	and	s10,zero,zero
80000068:	00007db3          	and	s11,zero,zero
8000006c:	00007e33          	and	t3,zero,zero
80000070:	00007eb3          	and	t4,zero,zero
80000074:	00007f33          	and	t5,zero,zero
80000078:	00007fb3          	and	t6,zero,zero
8000007c:	00001117          	auipc	sp,0x1
80000080:	81c10113          	addi	sp,sp,-2020 # 80000898 <gcd>
80000084:	089000ef          	jal	ra,8000090c <main>
80000088:	05d00893          	li	a7,93
8000008c:	00000513          	li	a0,0
80000090:	020102b7          	lui	t0,0x2010
80000094:	0112a023          	sw	a7,0(t0) # 2010000 <SYSCALL_ADDR>

80000098 <stack_begin>:
	...

80000898 <gcd>:
80000898:	fd010113          	addi	sp,sp,-48
8000089c:	02812623          	sw	s0,44(sp)
800008a0:	03010413          	addi	s0,sp,48
800008a4:	fca42e23          	sw	a0,-36(s0)
800008a8:	fcb42c23          	sw	a1,-40(s0)
800008ac:	fdc42783          	lw	a5,-36(s0)
800008b0:	04079063          	bnez	a5,800008f0 <gcd+0x58>
800008b4:	fd842783          	lw	a5,-40(s0)
800008b8:	fef42623          	sw	a5,-20(s0)
800008bc:	0340006f          	j	800008f0 <gcd+0x58>
800008c0:	fdc42703          	lw	a4,-36(s0)
800008c4:	fd842783          	lw	a5,-40(s0)
800008c8:	00e7dc63          	bge	a5,a4,800008e0 <gcd+0x48>
800008cc:	fdc42703          	lw	a4,-36(s0)
800008d0:	fd842783          	lw	a5,-40(s0)
800008d4:	40f707b3          	sub	a5,a4,a5
800008d8:	fcf42e23          	sw	a5,-36(s0)
800008dc:	0140006f          	j	800008f0 <gcd+0x58>
800008e0:	fd842703          	lw	a4,-40(s0)
800008e4:	fdc42783          	lw	a5,-36(s0)
800008e8:	40f707b3          	sub	a5,a4,a5
800008ec:	fcf42c23          	sw	a5,-40(s0)
800008f0:	fd842783          	lw	a5,-40(s0)
800008f4:	fc0796e3          	bnez	a5,800008c0 <gcd+0x28>
800008f8:	fec42783          	lw	a5,-20(s0)
800008fc:	00078513          	mv	a0,a5
80000900:	02c12403          	lw	s0,44(sp)
80000904:	03010113          	addi	sp,sp,48
80000908:	00008067          	ret

8000090c <main>:
8000090c:	fe010113          	addi	sp,sp,-32
80000910:	00112e23          	sw	ra,28(sp)
80000914:	00812c23          	sw	s0,24(sp)
80000918:	02010413          	addi	s0,sp,32
8000091c:	0000c7b7          	lui	a5,0xc
80000920:	35078793          	addi	a5,a5,848 # c350 <SYSCALL_ADDR-0x2003cb0>
80000924:	fef42623          	sw	a5,-20(s0)
80000928:	00100793          	li	a5,1
8000092c:	fef42423          	sw	a5,-24(s0)
80000930:	fec42783          	lw	a5,-20(s0)
80000934:	fe842703          	lw	a4,-24(s0)
80000938:	00070593          	mv	a1,a4
8000093c:	00078513          	mv	a0,a5
80000940:	00000097          	auipc	ra,0x0
80000944:	f58080e7          	jalr	-168(ra) # 80000898 <gcd>
80000948:	00050793          	mv	a5,a0
8000094c:	fef42223          	sw	a5,-28(s0)
80000950:	00000793          	li	a5,0
80000954:	00078513          	mv	a0,a5
80000958:	01c12083          	lw	ra,28(sp)
8000095c:	01812403          	lw	s0,24(sp)
80000960:	02010113          	addi	sp,sp,32
80000964:	00008067          	ret

Disassembly of section .riscv.attributes:

00000000 <.riscv.attributes>:
   0:	1b41                	addi	s6,s6,-16
   2:	0000                	unimp
   4:	7200                	flw	fs0,32(a2)
   6:	7369                	lui	t1,0xffffa
   8:	01007663          	bgeu	zero,a6,14 <SYSCALL_ADDR-0x200ffec>
   c:	0011                	c.nop	4
   e:	0000                	unimp
  10:	1004                	addi	s1,sp,32
  12:	7205                	lui	tp,0xfffe1
  14:	3376                	fld	ft6,376(sp)
  16:	6932                	flw	fs2,12(sp)
  18:	7032                	flw	ft0,44(sp)
  1a:	0030                	addi	a2,sp,8

Disassembly of section .comment:

00000000 <.comment>:
   0:	3a434347          	fmsub.d	ft6,ft6,ft4,ft7,rmm
   4:	2820                	fld	fs0,80(s0)
   6:	29554e47          	fmsub.s	ft8,fa0,fs5,ft5,rmm
   a:	3920                	fld	fs0,112(a0)
   c:	322e                	fld	ft4,232(sp)
   e:	302e                	fld	ft0,232(sp)
	...
