diff options
author | Mao Han <han_mao@c-sky.com> | 2019-07-16 19:14:24 +0800 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2019-07-17 11:48:35 +0200 |
commit | 1b1433d5670b75c4bd5c9b598e0b00fba6e82d90 (patch) | |
tree | b10b9a129ce8e2d4ee87ed3989fb7cd4a6cb19ed /src | |
parent | b3233914074cb7eb19ea2fc3c70257679f867f68 (diff) |
Add backend support for C-SKY
C-SKY V2 ABI manual:
https://github.com/c-sky/csky-doc/blob/master/C-SKY_V2_CPU_Applications_Binary_Interface_Standards_Manual.pdf
C-SKY architecture user guide:
https://github.com/c-sky/csky-doc/blob/master/CSKY%20Architecture%20user_guide.pdf
Signed-off-by: Mao Han <han_mao@c-sky.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/elflint.c | 2 | ||||
-rw-r--r-- | src/readelf.c | 4 |
3 files changed, 8 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 27812b05..911ad26f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2019-07-13 Mao Han <han_mao@c-sky.com> + + * elflint.c: Add C-SKY. + 2019-06-28 Mark Wielaard <mark@klomp.org> * readelf.c (print_ehdr): Use dwelf_elf_e_machine_string instead of diff --git a/src/elflint.c b/src/elflint.c index 810c8bd7..edb466dd 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -330,7 +330,7 @@ static const int valid_e_machine[] = EM_CRIS, EM_JAVELIN, EM_FIREPATH, EM_ZSP, EM_MMIX, EM_HUANY, EM_PRISM, EM_AVR, EM_FR30, EM_D10V, EM_D30V, EM_V850, EM_M32R, EM_MN10300, EM_MN10200, EM_PJ, EM_OPENRISC, EM_ARC_A5, EM_XTENSA, EM_ALPHA, - EM_TILEGX, EM_TILEPRO, EM_AARCH64, EM_BPF, EM_RISCV + EM_TILEGX, EM_TILEPRO, EM_AARCH64, EM_BPF, EM_RISCV, EM_CSKY }; #define nvalid_e_machine \ (sizeof (valid_e_machine) / sizeof (valid_e_machine[0])) diff --git a/src/readelf.c b/src/readelf.c index cda7c93a..2084fb1f 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -3571,7 +3571,9 @@ print_attributes (Ebl *ebl, const GElf_Ehdr *ehdr) if (shdr == NULL || (shdr->sh_type != SHT_GNU_ATTRIBUTES && (shdr->sh_type != SHT_ARM_ATTRIBUTES - || ehdr->e_machine != EM_ARM))) + || ehdr->e_machine != EM_ARM) + && (shdr->sh_type != SHT_CSKY_ATTRIBUTES + || ehdr->e_machine != EM_CSKY))) continue; printf (gettext ("\ |