[PATCH v3 0/6] Add support for MIPS

2024-03-05 Thread Ying Huang
Pass all previous test cases that failed due to MIPS non-support. The following are the test results on mips64el: # TOTAL: 274 # PASS: 267 # SKIP: 7 # XFAIL: 0 # FAIL: 0 # XPASS: 0 # ERROR: 0

[PATCH v3 1/6] Support Mips architecture

2024-03-05 Thread Ying Huang
From: Ying Huang Signed-off-by: Ying Huang --- backends/Makefile.am| 6 +- backends/mips_init.c| 52 backends/mips_reloc.def | 93 +++ backends/mips_symbol.c | 63 + libebl/eblopenbackend.c | 2 + libelf/libelfP.h| 3 + tests/libelf.h | 541 ++

[PATCH v3 3/6] readelf: Adapt src/readelf -h/-S/-r/-w/-l/-d/-a on mips

2024-03-05 Thread Ying Huang
From: Ying Huang -h: support show Flags name -S: support show mips related section type -r: support show type 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 type name -a: support sho

[PATCH v3 2/6] strip: Adapt src/strip -o -f on mips

2024-03-05 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 v3 4/6] elflint: adapt src/elflint --gnu src/nm on mips

2024-03-05 Thread Ying Huang
From: Ying Huang The errors were: $ src/elflint --gnu src/nm section [ 2] '.MIPS.options' contains unknown flag(s) 0x800 section [ 7] '.dynsym': symbol 165 (_DYNAMIC_LINKING): non-local section symbol section [24] '.got' contains invalid processor-specific flag(s) 0x1000 section [25] '.sd

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

2024-03-05 Thread Ying Huang
From: Ying Huang Add abi_cfi, set_initial_registers_tid, unwind on mips. Signed-off-by: Ying Huang --- backends/Makefile.am| 3 +- backends/mips_cfi.c | 68 + backends/mips_init.c| 4 ++ backends/mips_initreg.c | 61 ++

[PATCH v3 6/6] backends: Add register_info, return_value_location, core_note function on mips

2024-03-05 Thread Ying Huang
From: Ying Huang Signed-off-by: Ying Huang --- backends/Makefile.am | 3 +- backends/mips_corenote.c | 85 + backends/mips_init.c | 3 + backends/mips_regs.c | 135 +++ backends/mips_retval.c | 196 ++