#include "elf/mmix.h"
#include "elf/mn10200.h"
#include "elf/mn10300.h"
+#include "elf/moxie.h"
#include "elf/mt.h"
#include "elf/msp430.h"
#include "elf/or32.h"
case EM_CYGNUS_MN10200:
case EM_MN10300:
case EM_CYGNUS_MN10300:
+ case EM_MOXIE:
case EM_MSP430:
case EM_MSP430_OLD:
case EM_MT:
rtype = elf_mmix_reloc_type (type);
break;
+ case EM_MOXIE:
+ rtype = elf_moxie_reloc_type (type);
+ break;
+
case EM_MSP430:
case EM_MSP430_OLD:
rtype = elf_msp430_reloc_type (type);
case EM_MN10300: return "mn10300";
case EM_CYGNUS_MN10200:
case EM_MN10200: return "mn10200";
+ case EM_MOXIE: return "Moxie";
case EM_CYGNUS_FR30:
case EM_FR30: return "Fujitsu FR30";
case EM_CYGNUS_FRV: return "Fujitsu FR-V";
case EM_CYGNUS_V850:
switch (e_flags & EF_V850_ARCH)
{
- case E_V850E1_ARCH:
- strcat (buf, ", v850e1");
+ case E_V850E2V3_ARCH:
+ strcat (buf, ", v850e2v3");
+ break;
+ case E_V850E2_ARCH:
+ strcat (buf, ", v850e2");
+ break;
+ case E_V850E1_ARCH:
+ strcat (buf, ", v850e1");
break;
case E_V850E_ARCH:
strcat (buf, ", v850e");
for (j = 1; j < elf_header.e_shnum; j++, section++)
{
- if (ELF_SECTION_SIZE (section, segment) != 0
- && ELF_SECTION_IN_SEGMENT (section, segment))
+ if (!ELF_TBSS_SPECIAL (section, segment)
+ && ELF_SECTION_IN_SEGMENT_STRICT (section, segment))
printf ("%s ", SECTION_NAME (section));
}
if (!do_section_details)
printf (_("Key to Flags:\n\
W (write), A (alloc), X (execute), M (merge), S (strings)\n\
- I (info), L (link order), G (group), x (unknown)\n\
+ I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)\n\
O (extra OS processing required) o (OS specific), p (processor specific)\n"));
return 1;
else
{
warn ("corrupt library name index of 0x%lx found in dynamic entry",
- fixup->needed);
+ (unsigned long) fixup->needed);
lib_name = "???";
}
printf (_("\nImage fixups for needed library #%d: %s - ident: %lx\n"),
case EM_CYGNUS_MN10300:
case EM_MN10300:
return reloc_type == 1; /* R_MN10300_32. */
+ case EM_MOXIE:
+ return reloc_type == 1; /* R_MOXIE_32. */
case EM_MSP430_OLD:
case EM_MSP430:
return reloc_type == 1; /* R_MSP43_32. */
case EM_X86_64: /* R_X86_64_NONE. */
case EM_L1OM: /* R_X86_64_NONE. */
case EM_MN10300: /* R_MN10300_NONE. */
+ case EM_MOXIE: /* R_MOXIE_NONE. */
case EM_M32R: /* R_M32R_NONE. */
case EM_TI_C6000:/* R_C6000_NONE. */
case EM_XC16X:
addend = 0;
if (is_rela)
addend += rp->r_addend;
- /* R_XTENSA_32 and R_PJ_DATA_DIR32 are partial_inplace. */
+ /* R_XTENSA_32, R_PJ_DATA_DIR32 and R_D30V_32_NORMAL are
+ partial_inplace. */
if (!is_rela
|| (elf_header.e_machine == EM_XTENSA
&& reloc_type == 1)
|| ((elf_header.e_machine == EM_PJ
|| elf_header.e_machine == EM_PJ_OLD)
- && reloc_type == 1))
+ && reloc_type == 1)
+ || ((elf_header.e_machine == EM_D30V
+ || elf_header.e_machine == EM_CYGNUS_D30V)
+ && reloc_type == 12))
addend += byte_get (rloc, reloc_size);
if (is_32bit_pcrel_reloc (reloc_type)
This is a copy of bfd_uncompress_section_contents, in bfd/compress.c */
static int
-uncompress_section_contents (unsigned char ** buffer, dwarf_size_type * size)
+uncompress_section_contents (unsigned char **buffer ATTRIBUTE_UNUSED,
+ dwarf_size_type *size ATTRIBUTE_UNUSED)
{
#ifndef HAVE_ZLIB_H
- /* These are just to quiet gcc. */
- buffer = 0;
- size = 0;
return FALSE;
#else
dwarf_size_type compressed_size = *size;
return 0;
if (section_is_compressed)
- if (! uncompress_section_contents (§ion->start, §ion->size))
- return 0;
+ {
+ if (! uncompress_section_contents (§ion->start, §ion->size))
+ return 0;
+ sec->sh_size = section->size;
+ }
if (debug_displays [debug].relocate)
apply_relocations ((FILE *) file, sec, section->start);
return p;
}
+static unsigned char *
+display_tic6x_attribute (unsigned char * p)
+{
+ int tag;
+ unsigned int len;
+ int val;
+
+ tag = read_uleb128 (p, &len);
+ p += len;
+
+ switch (tag)
+ {
+ case Tag_C6XABI_Tag_CPU_arch:
+ val = read_uleb128 (p, &len);
+ p += len;
+ printf (" Tag_C6XABI_Tag_CPU_arch: ");
+
+ switch (val)
+ {
+ case C6XABI_Tag_CPU_arch_none:
+ printf (_("None\n"));
+ break;
+ case C6XABI_Tag_CPU_arch_C62X:
+ printf ("C62x\n");
+ break;
+ case C6XABI_Tag_CPU_arch_C67X:
+ printf ("C67x\n");
+ break;
+ case C6XABI_Tag_CPU_arch_C67XP:
+ printf ("C67x+\n");
+ break;
+ case C6XABI_Tag_CPU_arch_C64X:
+ printf ("C64x\n");
+ break;
+ case C6XABI_Tag_CPU_arch_C64XP:
+ printf ("C64x+\n");
+ break;
+ case C6XABI_Tag_CPU_arch_C674X:
+ printf ("C674x\n");
+ break;
+ default:
+ printf ("??? (%d)\n", val);
+ break;
+ }
+ return p;
+
+ case 32:
+ /* Tag_compatibility - treated as generic by binutils for now
+ although not currently specified for C6X. */
+ val = read_uleb128 (p, &len);
+ p += len;
+ printf (_("flag = %d, vendor = %s\n"), val, p);
+ p += strlen ((char *) p) + 1;
+ return p;
+ }
+
+ printf (" Tag_unknown_%d: ", tag);
+
+ /* No general documentation of handling unknown attributes, treat as
+ ULEB128 for now. */
+ val = read_uleb128 (p, &len);
+ p += len;
+ printf ("%d (0x%x)\n", val, val);
+
+ return p;
+}
+
static int
process_attributes (FILE * file,
const char * public_name,
display_power_gnu_attribute);
}
+static int
+process_tic6x_specific (FILE * file)
+{
+ return process_attributes (file, "c6xabi", SHT_C6000_ATTRIBUTES,
+ display_tic6x_attribute, NULL);
+}
+
/* DATA points to the contents of a MIPS GOT that starts at VMA PLTGOT.
Print the Address, Access and Initial fields of an entry at VMA ADDR
and return the VMA of the next entry. */
case EM_PPC:
return process_power_specific (file);
break;
+ case EM_TI_C6000:
+ return process_tic6x_specific (file);
+ break;
default:
break;
}