From 595d3787e9cbedbceb6182f873a4774707c0e74f Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 7 Nov 2019 13:32:16 +1030 Subject: Remove CR16C support I think it is past time to remove CR16C support. CR16C was added in 2004, and only for ld. gas and binutils support is lacking, and there have been no commits to bfd/elf32-cr16c.c other than warning fixes or global maintainers making changes to all targets. I see no maintainer listed for CR16C, and no commits from anyone at NSC supporting the target. Furthermore, at the time the CR16 support was added in 2007, config.sub was changed upstream to no longer recognise cr16c as a valid cpu. That means the CR16C ld support is only available as a secondary target by configuring with, for example, --enable-targets=all or --enable-targets=cr16c-unknown-elf. No testing of the CR16C target is possible. include/ * elf/cr16c.h: Delete. bfd/ * cpu-cr16c.c: Delete. * elf32-cr16c.c: Delete. * Makefile.am, * archures.c, * config.bfd, * configure.ac, * reloc.c, * targets.c: Remove cr16c support. * Makefile.in, * bfd-in2.h, * configure, * libbfd.h, * po/SRC-POTFILES.in: Regenerate. ld/ * emulparams/elf32cr16c.sh: Delete. * scripttempl/elf32cr16c.sc: Delete. * Makefile.am, * configure.tgt: Remove cr16c support. * NEWS: Mention removal of cr16c. * Makefile.in, * po/BLD-POTFILES.in: Regenerate. --- include/ChangeLog | 4 + include/elf/cr16c.h | 258 ---------------------------------------------------- 2 files changed, 4 insertions(+), 258 deletions(-) delete mode 100644 include/elf/cr16c.h (limited to 'include') diff --git a/include/ChangeLog b/include/ChangeLog index 44c71a7..64e59d9 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2019-11-07 Alan Modra + + * elf/cr16c.h: Delete. + 2019-10-29 Andrew Eikum * coff/internal.h (struct internal_extra_pe_filehdr): Use ints diff --git a/include/elf/cr16c.h b/include/elf/cr16c.h deleted file mode 100644 index 523e548..0000000 --- a/include/elf/cr16c.h +++ /dev/null @@ -1,258 +0,0 @@ -/* CR16C ELF support for BFD. - Copyright (C) 2004-2019 Free Software Foundation, Inc. - - This file is part of BFD, the Binary File Descriptor library. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ - -#ifndef _ELF_CR16C_H -#define _ELF_CR16C_H - -#include "bfd.h" -#include "elf/reloc-macros.h" - -/* Creating indices for reloc_map_index array. */ -START_RELOC_NUMBERS (elf_cr16c_reloc_type) - RELOC_NUMBER (RINDEX_16C_NUM08, 0) - RELOC_NUMBER (RINDEX_16C_NUM08_C, 1) - RELOC_NUMBER (RINDEX_16C_NUM16, 2) - RELOC_NUMBER (RINDEX_16C_NUM16_C, 3) - RELOC_NUMBER (RINDEX_16C_NUM32, 4) - RELOC_NUMBER (RINDEX_16C_NUM32_C, 5) - RELOC_NUMBER (RINDEX_16C_DISP04, 6) - RELOC_NUMBER (RINDEX_16C_DISP04_C, 7) - RELOC_NUMBER (RINDEX_16C_DISP08, 8) - RELOC_NUMBER (RINDEX_16C_DISP08_C, 9) - RELOC_NUMBER (RINDEX_16C_DISP16, 10) - RELOC_NUMBER (RINDEX_16C_DISP16_C, 11) - RELOC_NUMBER (RINDEX_16C_DISP24, 12) - RELOC_NUMBER (RINDEX_16C_DISP24_C, 13) - RELOC_NUMBER (RINDEX_16C_DISP24a, 14) - RELOC_NUMBER (RINDEX_16C_DISP24a_C, 15) - RELOC_NUMBER (RINDEX_16C_REG04, 16) - RELOC_NUMBER (RINDEX_16C_REG04_C, 17) - RELOC_NUMBER (RINDEX_16C_REG04a, 18) - RELOC_NUMBER (RINDEX_16C_REG04a_C, 19) - RELOC_NUMBER (RINDEX_16C_REG14, 20) - RELOC_NUMBER (RINDEX_16C_REG14_C, 21) - RELOC_NUMBER (RINDEX_16C_REG16, 22) - RELOC_NUMBER (RINDEX_16C_REG16_C, 23) - RELOC_NUMBER (RINDEX_16C_REG20, 24) - RELOC_NUMBER (RINDEX_16C_REG20_C, 25) - RELOC_NUMBER (RINDEX_16C_ABS20, 26) - RELOC_NUMBER (RINDEX_16C_ABS20_C, 27) - RELOC_NUMBER (RINDEX_16C_ABS24, 28) - RELOC_NUMBER (RINDEX_16C_ABS24_C, 29) - RELOC_NUMBER (RINDEX_16C_IMM04, 30) - RELOC_NUMBER (RINDEX_16C_IMM04_C, 31) - RELOC_NUMBER (RINDEX_16C_IMM16, 32) - RELOC_NUMBER (RINDEX_16C_IMM16_C, 33) - RELOC_NUMBER (RINDEX_16C_IMM20, 34) - RELOC_NUMBER (RINDEX_16C_IMM20_C, 35) - RELOC_NUMBER (RINDEX_16C_IMM24, 36) - RELOC_NUMBER (RINDEX_16C_IMM24_C, 37) - RELOC_NUMBER (RINDEX_16C_IMM32, 38) - RELOC_NUMBER (RINDEX_16C_IMM32_C, 39) -END_RELOC_NUMBERS (RINDEX_16C_MAX) - -/* CR16C Relocation Types ('cr_reloc_type' entry in the reloc_map structure). - The relocation constant name is determined as follows : - - R_16C_[_C] - - Where : - - is one of the following: - NUM - R_NUMBER mnemonic, - DISP - R_16C_DISPL mnemonic, - REG - R_16C_REGREL mnemonic, - ABS - R_16C_ABS mnemonic, - IMM - R_16C_IMMED mnemonic, - stands for R_S_16C_ - _C means 'code label' and is only added when R_ADDRTYPE subfield - is of type R_CODE_ADDR. */ - -/* The table below shows what the hex digits in the definition of the - relocation type constants correspond to. - ------------------------------------------------------------------ - R_SIZESP R_FORMAT R_RELTO R_ADDRTYPE - ------------------------------------------------------------------ */ -/* R_S_16C_08 R_NUMBER R_ABS R_ADDRESS */ -#define R_16C_NUM08 0X0001 - -/* R_S_16C_08 R_NUMBER R_ABS R_CODE_ADDR */ -#define R_16C_NUM08_C 0X0006 - -/* R_S_16C_16 R_NUMBER R_ABS R_ADDRESS */ -#define R_16C_NUM16 0X1001 - -/* R_S_16C_16 R_NUMBER R_ABS R_CODE_ADDR */ -#define R_16C_NUM16_C 0X1006 - -/* R_S_16C_32 R_NUMBER R_ABS R_ADDRESS */ -#define R_16C_NUM32 0X2001 - -/* R_S_16C_32 R_NUMBER R_ABS R_CODE_ADDR */ -#define R_16C_NUM32_C 0X2006 - -/* R_S_16C_04 R_16C_DISPL R_PCREL R_ADDRESS */ -#define R_16C_DISP04 0X5411 - -/* R_S_16C_04 R_16C_DISPL R_PCREL R_CODE_ADDR */ -#define R_16C_DISP04_C 0X5416 - -/* R_S_16C_08 R_16C_DISPL R_PCREL R_ADDRESS */ -#define R_16C_DISP08 0X0411 - -/* R_S_16C_08 R_16C_DISPL R_PCREL R_CODE_ADDR */ -#define R_16C_DISP08_C 0X0416 - -/* R_S_16C_16 R_16C_DISPL R_PCREL R_ADDRESS */ -#define R_16C_DISP16 0X1411 - -/* R_S_16C_16 R_16C_DISPL R_PCREL R_CODE_ADDR */ -#define R_16C_DISP16_C 0X1416 - -/* R_S_16C_24 R_16C_DISPL R_PCREL R_ADDRESS */ -#define R_16C_DISP24 0X7411 - -/* R_S_16C_24 R_16C_DISPL R_PCREL R_CODE_ADDR */ -#define R_16C_DISP24_C 0X7416 - -/* R_S_16C_24a R_16C_DISPL R_PCREL R_ADDRESS */ -#define R_16C_DISP24a 0X6411 - -/* R_S_16C_24a R_16C_DISPL R_PCREL R_CODE_ADDR */ -#define R_16C_DISP24a_C 0X6416 - -/* R_S_16C_04 R_16C_REGREL R_ABS R_ADDRESS */ -#define R_16C_REG04 0X5201 - -/* R_S_16C_04 R_16C_REGREL R_ABS R_CODE_ADDR */ -#define R_16C_REG04_C 0X5206 - -/* R_S_16C_04_a R_16C_REGREL R_ABS R_ADDRESS */ -#define R_16C_REG04a 0X4201 - -/* R_S_16C_04_a R_16C_REGREL R_ABS R_CODE_ADDR */ -#define R_16C_REG04a_C 0X4206 - -/* R_S_16C_14 R_16C_REGREL R_ABS R_ADDRESS */ -#define R_16C_REG14 0X3201 - -/* R_S_16C_14 R_16C_REGREL R_ABS R_CODE_ADDR */ -#define R_16C_REG14_C 0X3206 - -/* R_S_16C_16 R_16C_REGREL R_ABS R_ADDRESS */ -#define R_16C_REG16 0X1201 - -/* R_S_16C_16 R_16C_REGREL R_ABS R_CODE_ADDR */ -#define R_16C_REG16_C 0X1206 - -/* R_S_16C_20 R_16C_REGREL R_ABS R_ADDRESS */ -#define R_16C_REG20 0X8201 - -/* R_S_16C_20 R_16C_REGREL R_ABS R_CODE_ADDR */ -#define R_16C_REG20_C 0X8206 - -/* R_S_16C_20 R_16C_ABS R_ABS R_ADDRESS */ -#define R_16C_ABS20 0X8101 - -/* R_S_16C_20 R_16C_ABS R_ABS R_CODE_ADDR */ -#define R_16C_ABS20_C 0X8106 - -/* R_S_16C_24 R_16C_ABS R_ABS R_ADDRESS */ -#define R_16C_ABS24 0X7101 - -/* R_S_16C_24 R_16C_ABS R_ABS R_CODE_ADDR */ -#define R_16C_ABS24_C 0X7106 - -/* R_S_16C_04 R_16C_IMMED R_ABS R_ADDRESS */ -#define R_16C_IMM04 0X5301 - -/* R_S_16C_04 R_16C_IMMED R_ABS R_CODE_ADDR */ -#define R_16C_IMM04_C 0X5306 - -/* R_S_16C_16 R_16C_IMMED R_ABS R_ADDRESS */ -#define R_16C_IMM16 0X1301 - -/* R_S_16C_16 R_16C_IMMED R_ABS R_CODE_ADDR */ -#define R_16C_IMM16_C 0X1306 - -/* R_S_16C_20 R_16C_IMMED R_ABS R_ADDRESS */ -#define R_16C_IMM20 0X8301 - -/* R_S_16C_20 R_16C_IMMED R_ABS R_CODE_ADDR */ -#define R_16C_IMM20_C 0X8306 - -/* R_S_16C_24 R_16C_IMMED R_ABS R_ADDRESS */ -#define R_16C_IMM24 0X7301 - -/* R_S_16C_24 R_16C_IMMED R_ABS R_CODE_ADDR */ -#define R_16C_IMM24_C 0X7306 - -/* R_S_16C_32 R_16C_IMMED R_ABS R_ADDRESS */ -#define R_16C_IMM32 0X2301 - -/* R_S_16C_32 R_16C_IMMED R_ABS R_CODE_ADDR */ -#define R_16C_IMM32_C 0X2306 - - -/* Relocation item type. */ -#define R_ADDRTYPE 0x000f -#define R_ADDRESS 0x0001 /* Take address of symbol. */ -#define R_CODE_ADDR 0x0006 /* Take address of symbol divided by 2. */ - -/* Relocation action. */ -#define R_RELTO 0x00f0 -#define R_ABS 0x0000 /* Keep symbol's address as such. */ -#define R_PCREL 0x0010 /* Subtract the pc address of hole. */ - -/* Relocation item data format. */ -#define R_FORMAT 0x0f00 -#define R_NUMBER 0x0000 /* Retain as two's complement value. */ -#define R_16C_DISPL 0x0400 /* CR16C displacement type. */ -#define R_16C_ABS 0x0100 /* CR16C absolute type. */ -#define R_16C_REGREL 0x0200 /* CR16C register-relative type. */ -#define R_16C_IMMED 0x0300 /* CR16C immediate type. */ - -/* Relocation item size. */ -#define R_SIZESP 0xf000 -#define R_S_16C_04 0x5000 -#define R_S_16C_04_a 0x4000 -#define R_S_16C_08 0x0000 -#define R_S_16C_14 0x3000 -#define R_S_16C_16 0x1000 -#define R_S_16C_20 0x8000 -#define R_S_16C_24_a 0x6000 -#define R_S_16C_24 0x7000 -#define R_S_16C_32 0x2000 - - -/* Processor specific section indices. These sections do not actually - exist. Symbols with a st_shndx field corresponding to one of these - values have a special meaning. */ - -/* Far common symbol. */ -#define SHN_CR16C_FCOMMON SHN_LORESERVE -#define SHN_CR16C_NCOMMON (SHN_LORESERVE + 1) - -typedef struct reloc_map -{ - unsigned short cr_reloc_type; /* CR relocation type. */ - bfd_reloc_code_real_type bfd_reloc_enum; /* BFD relocation enum. */ -} RELOC_MAP; - -#endif /* _ELF_CR16C_H */ -- cgit v1.1