)]}'
{
  "commit": "28913fdd14162f687c667b4e754ee8f07737b7ea",
  "tree": "9dedcbf92098e6f251fd8c52955cbb466b0fb240",
  "parents": [
    "eff585190aca2ba62872eae3623667fda95f4d36",
    "9b7a489f451a54fab6f6534a3b4a48c532726dcb"
  ],
  "author": {
    "name": "bors[bot]",
    "email": "26634292+bors[bot]@users.noreply.github.com",
    "time": "Tue Feb 09 23:10:32 2021 +0000"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Feb 09 23:10:32 2021 +0000"
  },
  "message": "Merge #272\n\n272: Add the RISC-V entry point assembly to libtock_runtime r\u003dhudson-ayers a\u003djrvanwhy\n\nTo support the entry point assembly, I rewrote the linker script ([link to the new version](https://github.com/jrvanwhy/libtock-rs/blob/riscv-asm/core/runtime/layout_generic.ld) in case you don\u0027t want to see the diff).\r\n\r\nThe rust toolchain is unable to compile raw assembly files on its own. I don\u0027t want a separate toolchain to be a build requirement of `libtock-rs`, so instead I committed the compiled library into the repository. To keep the compiled library and source code in sync, I added an actions workflow that verifies the compiled library matches the provided sources.\r\n\r\nThere is one part of this PR I am unhappy with. I have to manually `strip` local symbols from the compiled library -- i.e., removing the `riscv64-linux-gnu-strip` invocation from `assemble.sh` gives the following:\r\n\r\n```\r\nDisassembly of section .start:\r\n\r\n00000000 \u003cstart\u003e:\r\n   0:   00000417                auipc   s0,0x0\r\n   4:   87aa                    mv      a5,a0\r\n   6:   4384                    lw      s1,0(a5)\r\n   8:   00940c63                beq     s0,s1,20 \u003c.Lset_brk\u003e\r\n   c:   4521                    li      a0,8\r\n   e:   4585                    li      a1,1\r\n  10:   4609                    li      a2,2\r\n  12:   4709                    li      a4,2\r\n  14:   00000073                ecall\r\n  18:   4501                    li      a0,0\r\n  1a:   4719                    li      a4,6\r\n  1c:   00000073                ecall\r\n\r\n00000020 \u003c.Lset_brk\u003e:\r\n  20:   4501                    li      a0,0\r\n  22:   43cc                    lw      a1,4(a5)\r\n  24:   4715                    li      a4,5\r\n  26:   00000073                ecall\r\n  2a:   0087a103                lw      sp,8(a5)\r\n  2e:   47c8                    lw      a0,12(a5)\r\n  30:   c909                    beqz    a0,42 \u003c.Lzero_bss\u003e\r\n  32:   4b8c                    lw      a1,16(a5)\r\n  34:   4bd0                    lw      a2,20(a5)\r\n\r\n00000036 \u003c.Ldata_loop_body\u003e:\r\n  36:   4194                    lw      a3,0(a1)\r\n  38:   c214                    sw      a3,0(a2)\r\n  3a:   1571                    addi    a0,a0,-4\r\n  3c:   0591                    addi    a1,a1,4\r\n  3e:   0611                    addi    a2,a2,4\r\n  40:   f97d                    bnez    a0,36 \u003c.Ldata_loop_body\u003e\r\n\r\n00000042 \u003c.Lzero_bss\u003e:\r\n  42:   4f88                    lw      a0,24(a5)\r\n  44:   c519                    beqz    a0,52 \u003c.Lcall_rust_start\u003e\r\n  46:   4fcc                    lw      a1,28(a5)\r\n\r\n00000048 \u003c.Lbss_loop_body\u003e:\r\n  48:   00058023                sb      zero,0(a1)\r\n  4c:   157d                    addi    a0,a0,-1\r\n  4e:   0585                    addi    a1,a1,1\r\n  50:   fd65                    bnez    a0,48 \u003c.Lbss_loop_body\u003e\r\n\r\n00000052 \u003c.Lcall_rust_start\u003e:\r\n  52:   fafff0ef                jal     ra,0 \u003cstart\u003e\r\n```\r\n\r\nI\u0027d appreciate advice on how to prevent `riscv64-linux-gnu-as` from including the local symbols in its output.\n\nCo-authored-by: Johnathan Van Why \u003cjrvanwhy@google.com\u003e\n",
  "tree_diff": []
}
