diff options
author | Andreas Schwab <schwab@suse.de> | 2018-04-19 17:47:52 +0200 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2018-04-23 18:46:53 +0200 |
commit | 470aba95790b52d70b6bd78b4c4a481ab791a4c9 (patch) | |
tree | 22367a6bce258a27b063dab6ff7ea17549f575f4 /libebl | |
parent | 9b29c2a136db5922312c1571524d8f64f5cdfb03 (diff) | |
download | elfutils-470aba95790b52d70b6bd78b4c4a481ab791a4c9.tar.gz |
Add support for RISC-V
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
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)
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
*** failure in /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/elflint --quiet --gnu-ld /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/addr2line
section [33] '.symtab': _GLOBAL_OFFSET_TABLE_ symbol value 0x91d8 does not match .got section address 0x9040
section [33] '.symtab': symbol 163: st_value out of bounds
*** failure in /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/elflint --quiet --gnu-ld /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/elfcmp
section [33] '.symtab': _GLOBAL_OFFSET_TABLE_ symbol value 0x1a2a0 does not match .got section address 0x1a040
section [33] '.symtab': symbol 267: st_value out of bounds
*** failure in /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/elflint --quiet --gnu-ld /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/elflint
section [33] '.symtab': _GLOBAL_OFFSET_TABLE_ symbol value 0xd418 does not match .got section address 0xd0f0
section [33] '.symtab': symbol 238: st_value out of bounds
*** failure in /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/elflint --quiet --gnu-ld /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/nm
section [33] '.symtab': _GLOBAL_OFFSET_TABLE_ symbol value 0xa2d0 does not match .got section address 0xa0b0
section [33] '.symtab': symbol 193: st_value out of bounds
*** failure in /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/elflint --quiet --gnu-ld /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/objdump
section [33] '.symtab': _GLOBAL_OFFSET_TABLE_ symbol value 0x2e5b8 does not match .got section address 0x2e058
section [33] '.symtab': symbol 410: st_value out of bounds
*** failure in /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/elflint --quiet --gnu-ld /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/readelf
section [32] '.symtab': _GLOBAL_OFFSET_TABLE_ symbol value 0x171b8 does not match .got section address 0x17010
*** failure in /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/elflint --quiet --gnu-ld /home/abuild/rpmbuild/BUILD/elfutils-0.170/libelf/libelf.so
section [32] '.symtab': _GLOBAL_OFFSET_TABLE_ symbol value 0x3a5b0 does not match .got section address 0x3a0d8
*** failure in /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/elflint --quiet --gnu-ld /home/abuild/rpmbuild/BUILD/elfutils-0.170/libdw/libdw.so
section [31] '.symtab': _GLOBAL_OFFSET_TABLE_ symbol value 0xd0c8 does not match .got section address 0xd008
*** failure in /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/elflint --quiet --gnu-ld /home/abuild/rpmbuild/BUILD/elfutils-0.170/backends/libebl_i386.so
section [31] '.symtab': _GLOBAL_OFFSET_TABLE_ symbol value 0xf0c8 does not match .got section address 0xf008
*** failure in /home/abuild/rpmbuild/BUILD/elfutils-0.170/src/elflint --quiet --gnu-ld /home/abuild/rpmbuild/BUILD/elfutils-0.170/backends/libebl_x86_64.so
FAIL run-elflint-self.sh (exit status: 1)
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)
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)
In addition, all tests that use ptrace are failing as linux-user
emulation does not implement it.
There are no regressions for a x86_64 build.
Signed-off-by: Andreas Schwab <schwab@suse.de>
Diffstat (limited to 'libebl')
-rw-r--r-- | libebl/ChangeLog | 4 | ||||
-rw-r--r-- | libebl/eblopenbackend.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libebl/ChangeLog b/libebl/ChangeLog index b4e9049c..66e8aa30 100644 --- a/libebl/ChangeLog +++ b/libebl/ChangeLog @@ -1,3 +1,7 @@ +2018-04-19 Andreas Schwab <schwab@suse.de> + + * eblopenbackend.c (machines): Add entries for RISC-V. + 2018-03-16 Mark Wielaard <mark@klomp.org> * ebldynamictagname.c (ebl_dynamic_tag_name): Add SYMTAB_SHNDX to diff --git a/libebl/eblopenbackend.c b/libebl/eblopenbackend.c index 1f814776..fcf86f6e 100644 --- a/libebl/eblopenbackend.c +++ b/libebl/eblopenbackend.c @@ -134,6 +134,8 @@ static const struct { "xtensa", "elf_xtensa", "xtensa", 6, EM_XTENSA, 0, 0 }, { "aarch64", "elf_aarch64", "aarch64", 7, EM_AARCH64, ELFCLASS64, 0 }, { "bpf", "elf_bpf", "bpf", 3, EM_BPF, 0, 0 }, + { "riscv", "elf_riscv", "riscv", 5, EM_RISCV, ELFCLASS64, ELFDATA2LSB }, + { "riscv", "elf_riscv", "riscv", 5, EM_RISCV, ELFCLASS32, ELFDATA2LSB }, }; #define nmachines (sizeof (machines) / sizeof (machines[0])) |