aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-06-16 00:36:04 +0000
committerJoseph Myers <joseph@codesourcery.com>2010-06-16 00:36:04 +0000
commit59e6276b64b1a3b248d851e5a3f5acd63e346399 (patch)
tree67703b84ce60420523bc7446757adab7be390419 /binutils
parentc562eb737ab97d1efc460606632f78bbb80169cb (diff)
downloadgdb-59e6276b64b1a3b248d851e5a3f5acd63e346399.zip
gdb-59e6276b64b1a3b248d851e5a3f5acd63e346399.tar.gz
gdb-59e6276b64b1a3b248d851e5a3f5acd63e346399.tar.bz2
bfd:
* elf-bfd.h (LEAST_KNOWN_OBJ_ATTRIBUTE): Decrease to 2. * elf32-tic6x.c (elf32_tic6x_obj_attrs_arg_type, elf32_tic6x_merge_arch_attributes, elf32_tic6x_merge_attributes, elf32_tic6x_merge_private_bfd_data): New. (bfd_elf32_bfd_merge_private_bfd_data, elf_backend_obj_attrs_arg_type, elf_backend_obj_attrs_section, elf_backend_obj_attrs_section_type, elf_backend_obj_attrs_vendor): Define. * elf32-tic6x.h (elf32_tic6x_merge_arch_attributes): Declare. binutils: * readelf.c (display_tic6x_attribute, process_tic6x_specific): New. (process_arch_specific): Call process_tic6x_specific for EM_TI_C6000. gas: * config/tc-tic6x.c: Include elf/tic6x.h. (tic6x_arch_attribute, tic6x_seen_insns): New. (tic6x_arch_table, tic6x_arches): Add attribute values. (tic6x_use_arch): Handle attribute settings. (tic6x_attributes_set_explicitly, s_tic6x_c6xabi_attribute, tic6x_attribute_table, tic6x_attributes, tic6x_convert_symbolic_attribute): New. (md_pseudo_table): Add c6xabi_attribute. (md_assemble): Set tic6x_seen_insns and tic6x_arch_attribute. (tic6x_set_attribute_int, tic6x_set_attributes): New. (tic6x_end): Call tic6x_set_attributes. * config/tc-tic6x.h (CONVERT_SYMBOLIC_ATTRIBUTE): Define. (tic6x_convert_symbolic_attribute): Declare. gas/testsuite: * gas/elf/elf.exp: Set target_machine for tic6x-*-*. * gas/elf/section2.e-tic6x, gas/tic6x/attr-arch-directive-1.d, gas/tic6x/attr-arch-directive-1.s, gas/tic6x/attr-arch-directive-2.d, gas/tic6x/attr-arch-directive-2.s, gas/tic6x/attr-arch-directive-3.d, gas/tic6x/attr-arch-directive-3.s, gas/tic6x/attr-arch-directive-4.d, gas/tic6x/attr-arch-directive-4.s, gas/tic6x/attr-arch-directive-5.d, gas/tic6x/attr-arch-directive-5.s, gas/tic6x/attr-arch-opts-c62x.d, gas/tic6x/attr-arch-opts-c64x+.d, gas/tic6x/attr-arch-opts-c64x.d, gas/tic6x/attr-arch-opts-c674x.d, gas/tic6x/attr-arch-opts-c67x+.d, gas/tic6x/attr-arch-opts-c67x.d, gas/tic6x/attr-arch-opts-none-1.d, gas/tic6x/attr-arch-opts-none-2.d, gas/tic6x/attr-arch-opts-override-1.d, gas/tic6x/attr-arch-opts-override-2.d, gas/tic6x/empty.s: New. include/elf: * tic6x-attrs.h: New. * tic6x.h: Include elf/tic6x-attrs.h for attribute table. (C6XABI_Tag_CPU_arch_none, C6XABI_Tag_CPU_arch_C62X, C6XABI_Tag_CPU_arch_C67X, C6XABI_Tag_CPU_arch_C67XP, C6XABI_Tag_CPU_arch_C64X, C6XABI_Tag_CPU_arch_C64XP, C6XABI_Tag_CPU_arch_C674X): Define. ld: * emulparams/elf32_tic6x_le.sh (ATTRS_SECTIONS): Define. ld/testsuite: * ld-elf/orphan3.d: Allow section names starting '_'. * ld-tic6x/attr-arch-c62x-c62x.d, ld-tic6x/attr-arch-c62x-c64x+.d, ld-tic6x/attr-arch-c62x-c64x.d, ld-tic6x/attr-arch-c62x-c674x.d, ld-tic6x/attr-arch-c62x-c67x+.d, ld-tic6x/attr-arch-c62x-c67x.d, ld-tic6x/attr-arch-c62x.s, ld-tic6x/attr-arch-c64x+-c62x.d, ld-tic6x/attr-arch-c64x+-c64x+.d, ld-tic6x/attr-arch-c64x+-c64x.d, ld-tic6x/attr-arch-c64x+-c674x.d, ld-tic6x/attr-arch-c64x+-c67x+.d, ld-tic6x/attr-arch-c64x+-c67x.d, ld-tic6x/attr-arch-c64x+.s, ld-tic6x/attr-arch-c64x-c62x.d, ld-tic6x/attr-arch-c64x-c64x+.d, ld-tic6x/attr-arch-c64x-c64x.d, ld-tic6x/attr-arch-c64x-c674x.d, ld-tic6x/attr-arch-c64x-c67x+.d, ld-tic6x/attr-arch-c64x-c67x.d, ld-tic6x/attr-arch-c64x.s, ld-tic6x/attr-arch-c674x-c62x.d, ld-tic6x/attr-arch-c674x-c64x+.d, ld-tic6x/attr-arch-c674x-c64x.d, ld-tic6x/attr-arch-c674x-c674x.d, ld-tic6x/attr-arch-c674x-c67x+.d, ld-tic6x/attr-arch-c674x-c67x.d, ld-tic6x/attr-arch-c674x.s, ld-tic6x/attr-arch-c67x+-c62x.d, ld-tic6x/attr-arch-c67x+-c64x+.d, ld-tic6x/attr-arch-c67x+-c64x.d, ld-tic6x/attr-arch-c67x+-c674x.d, ld-tic6x/attr-arch-c67x+-c67x+.d, ld-tic6x/attr-arch-c67x+-c67x.d, ld-tic6x/attr-arch-c67x+.s, ld-tic6x/attr-arch-c67x-c62x.d, ld-tic6x/attr-arch-c67x-c64x+.d, ld-tic6x/attr-arch-c67x-c64x.d, ld-tic6x/attr-arch-c67x-c674x.d, ld-tic6x/attr-arch-c67x-c67x+.d, ld-tic6x/attr-arch-c67x-c67x.d, ld-tic6x/attr-arch-c67x.s: New.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog7
-rw-r--r--binutils/readelf.c77
2 files changed, 84 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 4eb958b..0908d6a 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-15 Joseph Myers <joseph@codesourcery.com>
+
+ * readelf.c (display_tic6x_attribute, process_tic6x_specific):
+ New.
+ (process_arch_specific): Call process_tic6x_specific for
+ EM_TI_C6000.
+
2010-06-11 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (dump_ia64_vms_dynamic_fixups): Cast to unsigned long
diff --git a/binutils/readelf.c b/binutils/readelf.c
index dc06078..d4f47ca 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -10641,6 +10641,73 @@ display_mips_gnu_attribute (unsigned char * p, int tag)
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,
@@ -10797,6 +10864,13 @@ process_power_specific (FILE * file)
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. */
@@ -11867,6 +11941,9 @@ process_arch_specific (FILE * file)
case EM_PPC:
return process_power_specific (file);
break;
+ case EM_TI_C6000:
+ return process_tic6x_specific (file);
+ break;
default:
break;
}