[PATCH 4/5] stack: Fix stack unwind failure on mips

2023-04-11 Thread Ying Huang
From: Ying Huang add abi_cfi, set_initial_registers_tid, unwind on mips. "./src/stack -p PID" can show stack information --- backends/Makefile.am| 3 +- backends/mips_cfi.c | 68 + backends/mips_init.c| 4 ++ backends/mips_initreg.c | 70

[PATCH 2/5] readelf: Adapt src/readelf -h/-S/-r/-w/-l/-d/-a on mips

2023-04-11 Thread Ying Huang
From: Ying Huang -h: support show Flags name -S: support show mips related section type -r: support show type and relocation info value of Relocation section -w: can work and can show correct "strp" contents -l: support show mips related program header entry type -d: can show mips related Dynamic

[PATCH 5/5] backends: Fix run-native-test.sh and run-funcretval++11.sh run fail on mips

2023-04-11 Thread Ying Huang
From: Ying Huang add register_info, return_value_location function on mips --- backends/Makefile.am | 2 +- backends/mips_init.c | 2 + backends/mips_regs.c | 109 + backends/mips_retval.c | 261 + 4 files changed, 373 insertions(

[PATCH 1/5] strip: Adapt src/strip -o -f on mips

2023-04-11 Thread Ying Huang
From: Ying Huang In mips64 little-endian, r_info consists of four byte fields(contains three reloc types) and a 32-bit symbol index. In order to adapt GELF_R_SYM and GELF_R_TYPE, need convert raw data to get correct symbol index and type. libelf/elf_getdata.c: Some eu-utils use read-mmap metho

[PATCH 0/5] Add support for MIPS

2023-04-11 Thread Ying Huang
This is a series of modifications about MIPS. Support src/readelf, strip, unstrip, elflint, objdump related tools. Pass all previous test cases that failed due to MIPS non-support.

[PATCH 3/5] elflint: Fix invalid type of relocation info and other issues on mips

2023-04-11 Thread Ying Huang
From: Ying Huang add some check related functions --- backends/mips_init.c | 3 +++ backends/mips_symbol.c| 33 + libebl/eblrelocvaliduse.c | 8 ++-- src/elflint.c | 23 --- 4 files changed, 62 insertions(+), 5 deleti