[libc-commits] [PATCH] D127571: Initiating a RISC-V port of llvm-libc

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Jun 14 10:09:29 PDT 2022


sivachandra added a comment.

When I do `objdump -dr <path/to/libllvmlibc.a>`, I see this:

  /usr/local/google/home/sivachandra/Downloads/libllvmlibc.a(fsync.cpp.o):        file format elf64-littleriscv
  
  Disassembly of section .text:
  
  0000000000000000 <.text>:
         0: 01 00         nop
                  0000000000000000:  R_RISCV_ALIGN        *ABS*+0x2
  
  /usr/local/google/home/sivachandra/Downloads/libllvmlibc.a(lseek.cpp.o):        file format elf64-littleriscv
  
  Disassembly of section .text:
  
  0000000000000000 <.text>:
         0: 01 00         nop
                  0000000000000000:  R_RISCV_ALIGN        *ABS*+0x2
  
  /usr/local/google/home/sivachandra/Downloads/libllvmlibc.a(read.cpp.o): file format elf64-littleriscv
  
  Disassembly of section .text:
  
  0000000000000000 <.text>:
         0: 01 00         nop
                  0000000000000000:  R_RISCV_ALIGN        *ABS*+0x2
  
  /usr/local/google/home/sivachandra/Downloads/libllvmlibc.a(rmdir.cpp.o):        file format elf64-littleriscv
  
  Disassembly of section .text:
  
  0000000000000000 <.text>:
         0: 01 00         nop
                  0000000000000000:  R_RISCV_ALIGN        *ABS*+0x2
  
  /usr/local/google/home/sivachandra/Downloads/libllvmlibc.a(unlink.cpp.o):       file format elf64-littleriscv
  
  Disassembly of section .text:
  
  0000000000000000 <.text>:
         0: 01 00         nop
                  0000000000000000:  R_RISCV_ALIGN        *ABS*+0x2
  
  /usr/local/google/home/sivachandra/Downloads/libllvmlibc.a(unlinkat.cpp.o):     file format elf64-littleriscv
  
  Disassembly of section .text:
  
  0000000000000000 <.text>:
         0: 01 00         nop
                  0000000000000000:  R_RISCV_ALIGN        *ABS*+0x2
  
  /usr/local/google/home/sivachandra/Downloads/libllvmlibc.a(write.cpp.o):        file format elf64-littleriscv
  
  Disassembly of section .text:
  
  0000000000000000 <.text>:
         0: 01 00         nop
                  0000000000000000:  R_RISCV_ALIGN        *ABS*+0x2

And for few other functions, I see this:

  /usr/local/google/home/sivachandra/Downloads/libllvmlibc.a(feclearexcept.cpp.o):        file format elf64-littleriscv
  
  Disassembly of section .text:
  
  0000000000000000 <.text>:
         0: 01 00         nop
                  0000000000000000:  R_RISCV_ALIGN        *ABS*+0x2
  
  Disassembly of section .text.feclearexcept:
  
  0000000000000000 <feclearexcept>:
         0: 01 45         mv      a0, zero
         2: 82 80         ret
  
  /usr/local/google/home/sivachandra/Downloads/libllvmlibc.a(fegetenv.cpp.o):     file format elf64-littleriscv
  
  Disassembly of section .text:
  
  0000000000000000 <.text>:
         0: 01 00         nop
                  0000000000000000:  R_RISCV_ALIGN        *ABS*+0x2
  
  Disassembly of section .text.fegetenv:
  
  0000000000000000 <fegetenv>:
         0: 01 45         mv      a0, zero
         2: 82 80         ret
  
  /usr/local/google/home/sivachandra/Downloads/libllvmlibc.a(fegetexceptflag.cpp.o):      file format elf64-littleriscv
  
  Disassembly of section .text:
  
  0000000000000000 <.text>:
         0: 01 00         nop
                  0000000000000000:  R_RISCV_ALIGN        *ABS*+0x2
  
  Disassembly of section .text.fegetexceptflag:
  
  0000000000000000 <fegetexceptflag>:
         0: 23 20 05 00   sw      zero, 0(a0)
         4: 01 45         mv      a0, zero
         6: 82 80         ret

If you produced the attached `libllvmlibc.a` file with just this patch, there is something buggy somewhere and that needs to be fixed separately. With respect to making progress on this patch, please ping back once you have couple of major items addressed:

1. You will have trim down the entrypoints.txt until you get a clean `check-libc` run.
2. You will have to provide a time-bound plan for a CI builder.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127571/new/

https://reviews.llvm.org/D127571



More information about the libc-commits mailing list