COMMITED: Only use new ARM attribure code on ELF based targets
Nick Clifton
nickc@redhat.com
Mon Jan 19 15:38:00 GMT 2009
More information about the Binutils mailing list
Mon Jan 19 15:38:00 GMT 2009
- Previous message (by thread): COMMITED: Restore alpha sorting to gas/configure.tgt
- Next message (by thread): COMMITTED: Fix typo in description of run_list_test
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Guys, I am applying the patches below to fix a small problem with the new code for handling ARM attributes in the assembler. The problem was that the code was being compiled for non-ELF based targets where the attributes are not used. Cheers Nick gas/ChangeLog 2009-01-19 Nick Clifton <nickc@redhat.com> * config/tc-arm.h (CONVERT_SYMBOLIC_ATTRIBUTE): Only define for ELF format ARM targets. * config/tc-arm.c (arm_convert_symbolic_attribute): Likewise. gas/testsuite/ChangeLog 2009-01-19 Nick Clifton <nickc@redhat.com> * gas/arm/attr-syntax.d: Do not run for non-ELF based ARM targets. Index: gas/config/tc-arm.c =================================================================== RCS file: /cvs/src/src/gas/config/tc-arm.c,v retrieving revision 1.366 diff -c -3 -p -r1.366 tc-arm.c *** gas/config/tc-arm.c 16 Jan 2009 10:26:48 -0000 1.366 --- gas/config/tc-arm.c 19 Jan 2009 15:28:35 -0000 *************** s_arm_fpu (int ignored ATTRIBUTE_UNUSED) *** 20967,21038 **** } /* Copy symbol information. */ void arm_copy_symbol_attributes (symbolS *dest, symbolS *src) { ARM_GET_FLAG (dest) = ARM_GET_FLAG (src); } /* Given a symbolic attribute NAME, return the proper integer value. Returns -1 if the attribute is not known. */ int arm_convert_symbolic_attribute (const char *name) { #define T(tag) {#tag, tag} ! /* When you modify this table you should also ! modify the list in doc/c-arm.texi. */ ! static const struct { ! const char *name; ! const int tag; ! } attribute_table[] = { ! T(Tag_CPU_raw_name), ! T(Tag_CPU_name), ! T(Tag_CPU_arch), ! T(Tag_CPU_arch_profile), ! T(Tag_ARM_ISA_use), ! T(Tag_THUMB_ISA_use), ! T(Tag_VFP_arch), ! T(Tag_WMMX_arch), ! T(Tag_Advanced_SIMD_arch), ! T(Tag_PCS_config), ! T(Tag_ABI_PCS_R9_use), ! T(Tag_ABI_PCS_RW_data), ! T(Tag_ABI_PCS_RO_data), ! T(Tag_ABI_PCS_GOT_use), ! T(Tag_ABI_PCS_wchar_t), ! T(Tag_ABI_FP_rounding), ! T(Tag_ABI_FP_denormal), ! T(Tag_ABI_FP_exceptions), ! T(Tag_ABI_FP_user_exceptions), ! T(Tag_ABI_FP_number_model), ! T(Tag_ABI_align8_needed), ! T(Tag_ABI_align8_preserved), ! T(Tag_ABI_enum_size), ! T(Tag_ABI_HardFP_use), ! T(Tag_ABI_VFP_args), ! T(Tag_ABI_WMMX_args), ! T(Tag_ABI_optimization_goals), ! T(Tag_ABI_FP_optimization_goals), ! T(Tag_compatibility), ! T(Tag_CPU_unaligned_access), ! T(Tag_VFP_HP_extension), ! T(Tag_ABI_FP_16bit_format), ! T(Tag_nodefaults), ! T(Tag_also_compatible_with), ! T(Tag_conformance), ! T(Tag_T2EE_use), ! T(Tag_Virtualization_use), ! T(Tag_MPextension_use) ! }; #undef T unsigned int i; if (name == NULL) return -1; ! for (i = 0; i < ARRAY_SIZE(attribute_table); i++) if (strcmp (name, attribute_table[i].name) == 0) return attribute_table[i].tag; return -1; } --- 20967,21045 ---- } /* Copy symbol information. */ + void arm_copy_symbol_attributes (symbolS *dest, symbolS *src) { ARM_GET_FLAG (dest) = ARM_GET_FLAG (src); } + #ifdef OBJ_ELF /* Given a symbolic attribute NAME, return the proper integer value. Returns -1 if the attribute is not known. */ + int arm_convert_symbolic_attribute (const char *name) { + static const struct + { + const char * name; + const int tag; + } + attribute_table[] = + { + /* When you modify this table you should + also modify the list in doc/c-arm.texi. */ #define T(tag) {#tag, tag} ! T (Tag_CPU_raw_name), ! T (Tag_CPU_name), ! T (Tag_CPU_arch), ! T (Tag_CPU_arch_profile), ! T (Tag_ARM_ISA_use), ! T (Tag_THUMB_ISA_use), ! T (Tag_VFP_arch), ! T (Tag_WMMX_arch), ! T (Tag_Advanced_SIMD_arch), ! T (Tag_PCS_config), ! T (Tag_ABI_PCS_R9_use), ! T (Tag_ABI_PCS_RW_data), ! T (Tag_ABI_PCS_RO_data), ! T (Tag_ABI_PCS_GOT_use), ! T (Tag_ABI_PCS_wchar_t), ! T (Tag_ABI_FP_rounding), ! T (Tag_ABI_FP_denormal), ! T (Tag_ABI_FP_exceptions), ! T (Tag_ABI_FP_user_exceptions), ! T (Tag_ABI_FP_number_model), ! T (Tag_ABI_align8_needed), ! T (Tag_ABI_align8_preserved), ! T (Tag_ABI_enum_size), ! T (Tag_ABI_HardFP_use), ! T (Tag_ABI_VFP_args), ! T (Tag_ABI_WMMX_args), ! T (Tag_ABI_optimization_goals), ! T (Tag_ABI_FP_optimization_goals), ! T (Tag_compatibility), ! T (Tag_CPU_unaligned_access), ! T (Tag_VFP_HP_extension), ! T (Tag_ABI_FP_16bit_format), ! T (Tag_nodefaults), ! T (Tag_also_compatible_with), ! T (Tag_conformance), ! T (Tag_T2EE_use), ! T (Tag_Virtualization_use), ! T (Tag_MPextension_use) #undef T + }; unsigned int i; if (name == NULL) return -1; ! for (i = 0; i < ARRAY_SIZE (attribute_table); i++) if (strcmp (name, attribute_table[i].name) == 0) return attribute_table[i].tag; return -1; } + #endif /* OBJ_ELF */ Index: gas/config/tc-arm.h =================================================================== RCS file: /cvs/src/src/gas/config/tc-arm.h,v retrieving revision 1.47 diff -c -3 -p -r1.47 tc-arm.h *** gas/config/tc-arm.h 16 Jan 2009 10:26:48 -0000 1.47 --- gas/config/tc-arm.h 19 Jan 2009 15:28:35 -0000 *************** void tc_pe_dwarf2_emit_offset (symbolS * *** 285,289 **** #endif /* TE_PE */ ! extern int arm_convert_symbolic_attribute (const char *); #define CONVERT_SYMBOLIC_ATTRIBUTE(name) arm_convert_symbolic_attribute (name) --- 285,291 ---- #endif /* TE_PE */ ! #ifdef OBJ_ELF #define CONVERT_SYMBOLIC_ATTRIBUTE(name) arm_convert_symbolic_attribute (name) + extern int arm_convert_symbolic_attribute (const char *); + #endif Index: gas/testsuite/gas/arm/attr-syntax.d =================================================================== RCS file: /cvs/src/src/gas/testsuite/gas/arm/attr-syntax.d,v retrieving revision 1.1 diff -c -3 -p -r1.1 attr-syntax.d *** gas/testsuite/gas/arm/attr-syntax.d 16 Jan 2009 10:26:49 -0000 1.1 --- gas/testsuite/gas/arm/attr-syntax.d 19 Jan 2009 15:28:36 -0000 *************** *** 1,3 **** --- 1,4 ---- #source: attr-syntax.s + #not-target: *-*-pe *-*-aout #as: #error: :1: Error: Attribute name not recognised: made_up_tag.*:3: Error: expected <tag> , <value>.*:5: Error: expected <tag> , <value>
- Previous message (by thread): COMMITED: Restore alpha sorting to gas/configure.tgt
- Next message (by thread): COMMITTED: Fix typo in description of run_list_test
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list