Details
- Reviewers
kib emaste andrew - Commits
- rS292691: Add support for RISC-V architecture.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
libexec/rtld-elf/riscv/rtld_machdep.h | ||
---|---|---|
49–54 ↗ | (On Diff #11576) | Can you implement this as #define rtld_dynamic(obj) (&_DYNAMIC)? It's special on arm64 because otherwise the _DYNAMIC symbol needs to be relocated. |
libexec/rtld-elf/riscv/rtld_start.S | ||
67 ↗ | (On Diff #11576) | Why 72? |
76 ↗ | (On Diff #11576) | Why are you saving this? |
79–88 ↗ | (On Diff #11576) | These are wrong, the offset will trample over the a registers above. |
libexec/rtld-elf/riscv/rtld_machdep.h | ||
---|---|---|
50–55 ↗ | (On Diff #11598) | We also need this on RISC-V, I don't remember the reason, but it doesn't work with suggested define |
libexec/rtld-elf/riscv/rtld_start.S | ||
68 ↗ | (On Diff #11598) | 9 regs to save |
77 ↗ | (On Diff #11598) | We need that probably because jal overwrites it. So it does not work if we remove that. |
80–89 ↗ | (On Diff #11598) | thanks! |
libexec/rtld-elf/riscv/rtld_start.S | ||
---|---|---|
77 ↗ | (On Diff #11598) | BTW, I just looked to Linux port, they do also saving ra. |
libexec/rtld-elf/riscv/rtld_machdep.h | ||
---|---|---|
50–55 ↗ | (On Diff #11598) | I suspect for similar reasons (I was just making sure it wasn't just because that's how arm64 does it). |
libexec/rtld-elf/riscv/rtld_start.S | ||
68 ↗ | (On Diff #11598) | I normally write it as addi sp, sp, -(8 * 9) to make it obvious we are saving space for 9 8-byte registers. |
81 ↗ | (On Diff #11598) | Why not move this to the above addi? It should just cost the stack space if it's not used. |