[[RESEND & PING]PATCH V3 0/1] Add C-SKY support

Mao Han han_mao@c-sky.com
Mon Jun 3 08:17:00 GMT 2019


CC: Mark Wielaard <mark@klomp.org>

This patch add backend support for C-SKY architecture.

FAIL cases on csky:
1. run-backtrace-*
discussed in this thread before, seems can't support with current
core_set_initial_registers.
https://sourceware.org/ml/elfutils-devel/2019-q2/msg00021.html
test binary:
https://github.com/c-sky/test-result/blob/master/elfutils/divzero
https://github.com/c-sky/test-result/blob/master/elfutils/core

2. run-native-test.sh
ssh script problem, can pass if it is ran directly.

3. run-dwarf-getmacros.sh
ssh script problem, the empty string argument is lose,
can pass if it is ran directly.

4. run-deleted.sh
ssh script problem, can pass if it is ran directly.

5. run-reverse-sections-self.sh
elfcopy --reverse-offs dose not work properly on C-SKY object file,
seems not related to arch specific code.
size.o before copy:
https://github.com/c-sky/test-result/blob/master/elfutils/size.o
size.o.rev after copy:
https://github.com/c-sky/test-result/blob/master/elfutils/size.o.rev

Tested on x86:
============================================================================
Testsuite summary for elfutils 0.176
============================================================================
# TOTAL: 207
# PASS:  203
# SKIP:  4
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

Tested with ssh on C-SKY:
==========================================
   elfutils 0.176: tests/test-suite.log
==========================================

# TOTAL: 207
# PASS:  198
# SKIP:  5
# XFAIL: 0
# FAIL:  4
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

SKIP: run-readelf-compressed.sh
===============================

elfutils built without bzip2 support
SKIP run-readelf-compressed.sh (exit status: 77)

FAIL: run-native-test.sh
========================

allregs: 11615: No such file or directory
FAIL run-native-test.sh (exit status: 1)

FAIL: run-dwarf-getmacros.sh
============================

--- dwarf-getmacros.out	2019-05-29 18:10:03.896561841 +0800
+++ /tmp/123	2019-05-29 18:10:02.364561841 +0800
@@ -1 +1,4 @@
-invalid opcode
+opcode 255 with 0 arguments
+file /home/petr/proj/elfutils/master/elfutils/x.c
+ FOO 0
+/file
FAIL run-dwarf-getmacros.sh (exit status: 1)

SKIP: run-backtrace-data.sh
===========================

/home/vmh/workspace/elfutils/tests/backtrace-data: x86_64 linux only test
SKIP run-backtrace-data.sh (exit status: 77)

SKIP: run-backtrace-native-biarch.sh
====================================

biarch testing disabled
SKIP run-backtrace-native-biarch.sh (exit status: 77)

SKIP: run-backtrace-native-core.sh
==================================

Aborted
No core.4784 file generated
SKIP run-backtrace-native-core.sh (exit status: 77)

SKIP: run-backtrace-native-core-biarch.sh
=========================================

biarch testing disabled
SKIP run-backtrace-native-core-biarch.sh (exit status: 77)

FAIL: run-deleted.sh
====================

PID 5007 - process
TID 5007:
#0  0x2ab71846 __nanosleep
#1  0x2ab716e8 sleep
#2  0x2aacc6b0
/home/vmh/workspace/elfutils/src/stack: dwfl_thread_getframes tid 5007 at 0x2aacc6af in /home/vmh/workspace/elfutils/tests/test-13671/deleted-lib.so: Callback returned failure
./run-deleted.sh: line 38: kill: (5007) - No such process
FAIL run-deleted.sh (exit status: 1)

FAIL: run-reverse-sections-self.sh
==================================


copy_elf: /home/vmh/workspace/elfutils/src/addr2line -> addr2line.rev (read,reverse)
setshstrndx: 35
Swapping offsets of section 24 and 25
Swapping offsets of section 28 and 29
Swapping offsets of section 32 and 33
Swapping offsets of section 34 and 35
No errors
elfrdwrdnop addr2line.rev
No errors

copy_elf: /home/vmh/workspace/elfutils/src/elfcmp -> elfcmp.rev (read,reverse)
setshstrndx: 36
Swapping offsets of section 25 and 26
Swapping offsets of section 29 and 30
Swapping offsets of section 33 and 34
Swapping offsets of section 35 and 36
No errors
elfrdwrdnop elfcmp.rev
No errors

copy_elf: /home/vmh/workspace/elfutils/src/objdump -> objdump.rev (read,reverse)
setshstrndx: 36
Swapping offsets of section 25 and 26
Swapping offsets of section 29 and 30
Swapping offsets of section 33 and 34
Swapping offsets of section 35 and 36
No errors
elfrdwrdnop objdump.rev
No errors

copy_elf: /home/vmh/workspace/elfutils/src/readelf -> readelf.rev (read,reverse)
setshstrndx: 36
Swapping offsets of section 25 and 26
Swapping offsets of section 29 and 30
Swapping offsets of section 33 and 34
Swapping offsets of section 35 and 36
No errors
elfrdwrdnop readelf.rev
No errors

copy_elf: /home/vmh/workspace/elfutils/libelf/libelf.so -> libelf.so.rev (read,reverse)
setshstrndx: 36
Swapping offsets of section 25 and 26
Swapping offsets of section 28 and 29
Swapping offsets of section 30 and 31
Swapping offsets of section 33 and 34
Swapping offsets of section 35 and 36
No errors
elfrdwrdnop libelf.so.rev
No errors

copy_elf: /home/vmh/workspace/elfutils/libdw/libdw.so -> libdw.so.rev (read,reverse)
setshstrndx: 36
Swapping offsets of section 25 and 26
Swapping offsets of section 28 and 29
Swapping offsets of section 30 and 31
Swapping offsets of section 33 and 34
Swapping offsets of section 35 and 36
No errors
elfrdwrdnop libdw.so.rev
No errors

copy_elf: /home/vmh/workspace/elfutils/backends/libebl_i386.so -> libebl_i386.so.rev (read,reverse)
setshstrndx: 34
Swapping offsets of section 23 and 24
Swapping offsets of section 26 and 27
Swapping offsets of section 28 and 29
Swapping offsets of section 31 and 32
Swapping offsets of section 33 and 34
No errors
elfrdwrdnop libebl_i386.so.rev
No errors

copy_elf: /home/vmh/workspace/elfutils/backends/libebl_x86_64.so -> libebl_x86_64.so.rev (read,reverse)
setshstrndx: 34
Swapping offsets of section 23 and 24
Swapping offsets of section 26 and 27
Swapping offsets of section 28 and 29
Swapping offsets of section 31 and 32
Swapping offsets of section 33 and 34
No errors
elfrdwrdnop libebl_x86_64.so.rev
No errors

copy_elf: /home/vmh/workspace/elfutils/src/size.o -> size.o.rev (read,reverse)
setshstrndx: 29
Swapping offsets of section 13 and 14
Swapping offsets of section 22 and 23
Swapping offsets of section 28 and 29
/home/vmh/workspace/elfutils/src/elfcmp: /home/vmh/workspace/elfutils/src/size.o size.o.rev differ: section [1], [1] name
FAIL run-reverse-sections-self.sh (exit status: 1)

Changes since v1:
  - Add the Signed-off-by line and the copyright

Changes since v2:
  - move changelog to corresponding entries
  - correct core dump registers size
  - remove unused fpu DWARF register

Mao Han (1):
  Add backend support for C-SKY

 backends/ChangeLog       |  11 ++++++
 backends/Makefile.am     |   9 ++++-
 backends/csky_cfi.c      |  60 ++++++++++++++++++++++++++++
 backends/csky_corenote.c |  61 ++++++++++++++++++++++++++++
 backends/csky_init.c     |  65 ++++++++++++++++++++++++++++++
 backends/csky_initreg.c  |  87 ++++++++++++++++++++++++++++++++++++++++
 backends/csky_regs.c     | 101 +++++++++++++++++++++++++++++++++++++++++++++++
 backends/csky_reloc.def  |  86 ++++++++++++++++++++++++++++++++++++++++
 backends/csky_symbol.c   |  77 ++++++++++++++++++++++++++++++++++++
 libebl/ChangeLog         |   4 ++
 libebl/eblopenbackend.c  |   1 +
 src/ChangeLog            |   4 ++
 src/elflint.c            |   2 +-
 13 files changed, 565 insertions(+), 3 deletions(-)
 create mode 100644 backends/csky_cfi.c
 create mode 100644 backends/csky_corenote.c
 create mode 100644 backends/csky_init.c
 create mode 100644 backends/csky_initreg.c
 create mode 100644 backends/csky_regs.c
 create mode 100644 backends/csky_reloc.def
 create mode 100644 backends/csky_symbol.c

-- 
2.7.4



More information about the Elfutils-devel mailing list