Hi Andreas,
On Thu, Apr 19, 2018 at 05:47:52PM +0200, Andreas Schwab wrote:
> This implements initial support for the RISC-V architecture. It has
> been tested with qemu linux-user emulation
> <https://build.opensuse.org/package/live_build_log/openSUSE:Factory:RISCV/elfutils/standard/riscv64>,
> with the following unresolved issues
This is a great start. The patch looks fine. I only had to add the new
testfile to EXTRA_DISTS. Pushed to master.
> FAIL: run-strip-strmerge.sh
> ===========================
>
> elflint /home/abuild/rpmbuild/BUILD/elfutils-0.170/tests/elfstrmerge
> section [32] '.symtab': _GLOBAL_OFFSET_TABLE_ symbol value 0x51c0 does not
> match .got section address 0x5010
> section [32] '.symtab': symbol 119: st_value out of bounds
> FAIL run-strip-strmerge.sh (exit status: 1)
If you know the rules for _GLOBAL_OFFSET_TABLE you can write a
check_special_symbol hook.
Maybe symbol 119 is also special?
> FAIL: run-elflint-self.sh
> =========================
>
> section [33] '.symtab': _GLOBAL_OFFSET_TABLE_ symbol value 0x6220 does not
> match .got section address 0x6008
> section [33] '.symtab': symbol 135: st_value out of bounds
Likewise.
> FAIL: run-native-test.sh
> ========================
>
> /home/abuild/rpmbuild/BUILD/elfutils-0.170/tests/allregs:
> dwfl_module_register_names: no backend registers known
> FAIL run-native-test.sh (exit status: 1)
This needs a register_info hook.
> FAIL: run-backtrace-native-core.sh
> ==================================
>
> backtrace: backtrace.c:111: callback_verify: Assertion `symname && strcmp
> (symname, "raise") == 0' failed.
> ./test-subr.sh: line 84: 26040 Aborted (core dumped)
> LD_LIBRARY_PATH="${built_library_path}${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
> $VALGRIND_CMD "$@"
> backtrace-child-core.26027: no main
> rmdir: failed to remove 'test-26016': Directory not empty
> FAIL run-backtrace-native-core.sh (exit status: 1)
This probably needs an abi_cfi hook and setting up the
frame_nregs field.
> In addition, all tests that use ptrace are failing as linux-user
> emulation does not implement it.
And it would need an set_initial_registers_tid hook
and possible a fallback unwind hook.
Cheers,
Mark