From: Mike Frysinger Date: Sun, 17 Feb 2019 21:14:33 +0000 (-0500) Subject: elf2flt: drop v850 reloc ifdefs X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f544c4d7532f31080c5af78d82a43a2f81615cc1;p=elf2flt.git elf2flt: drop v850 reloc ifdefs The binutils elf/v850.h header has used the elf/reloc-macros.h helpers to create R_V850_xxx enums. They haven't been defines for a long time. Trying to use #ifdef checks on them doesn't work. This means we require binutils-2.24+ now which was released in 2013. We can see if anyone notices if we need to support older versions. Signed-off-by: Mike Frysinger --- diff --git a/elf2flt.c b/elf2flt.c index 15010c7..67f720a 100644 --- a/elf2flt.c +++ b/elf2flt.c @@ -487,48 +487,20 @@ output_relocs ( do this early, before doing any other processing on it). */ switch ((*p)->howto->type) { -#ifdef R_V850_9_PCREL case R_V850_9_PCREL: -#endif -#ifdef R_V850_22_PCREL case R_V850_22_PCREL: -#endif -#ifdef R_V850_SDA_16_16_OFFSET case R_V850_SDA_16_16_OFFSET: -#endif -#ifdef R_V850_SDA_15_16_OFFSET case R_V850_SDA_15_16_OFFSET: -#endif -#ifdef R_V850_ZDA_15_16_OFFSET case R_V850_ZDA_15_16_OFFSET: -#endif -#ifdef R_V850_TDA_6_8_OFFSET case R_V850_TDA_6_8_OFFSET: -#endif -#ifdef R_V850_TDA_7_8_OFFSET case R_V850_TDA_7_8_OFFSET: -#endif -#ifdef R_V850_TDA_7_7_OFFSET case R_V850_TDA_7_7_OFFSET: -#endif -#ifdef R_V850_TDA_16_16_OFFSET case R_V850_TDA_16_16_OFFSET: -#endif -#ifdef R_V850_TDA_4_5_OFFSET case R_V850_TDA_4_5_OFFSET: -#endif -#ifdef R_V850_TDA_4_4_OFFSET case R_V850_TDA_4_4_OFFSET: -#endif -#ifdef R_V850_SDA_16_16_SPLIT_OFFSET case R_V850_SDA_16_16_SPLIT_OFFSET: -#endif -#ifdef R_V850_CALLT_6_7_OFFSET case R_V850_CALLT_6_7_OFFSET: -#endif -#ifdef R_V850_CALLT_16_16_OFFSET case R_V850_CALLT_16_16_OFFSET: -#endif /* These are relative relocations, which have already been fixed up by the linker at this point, so just ignore @@ -927,27 +899,17 @@ output_relocs ( #endif #ifdef TARGET_v850 -# ifdef R_V850_32 - case R_V850_32: -# else case R_V850_ABS32: -# endif relocation_needed = 1; sym_vma = bfd_section_vma(abs_bfd, sym_section); sym_addr += sym_vma + q->addend; break; -#if defined(R_V850_ZDA_16_16_OFFSET) || defined(R_V850_ZDA_16_16_SPLIT_OFFSET) -#ifdef R_V850_ZDA_16_16_OFFSET case R_V850_ZDA_16_16_OFFSET: -#endif -#ifdef R_V850_ZDA_16_16_SPLIT_OFFSET case R_V850_ZDA_16_16_SPLIT_OFFSET: -#endif /* Can't support zero-relocations. */ - printf ("ERROR: %s+0x%x: zero relocations not supported\n", + printf ("ERROR: %s+0x%"BFD_VMA_FMT"x: zero relocations not supported\n", sym_name, q->addend); continue; -#endif /* R_V850_ZDA_16_16_OFFSET || R_V850_ZDA_16_16_SPLIT_OFFSET */ #endif /* TARGET_v850 */ #ifdef TARGET_h8300