2005-10-08 Paul Brook <paul@codesourcery.com>

bfd/
	* elf32-arm.c: Move #include "elf/arm.h" after libbfd.h.
	(NUM_KNOWN_ATTRIBUTES): Define.
	(aeabi_attribute, aeabi_attribute_list): Define.
	(elf32_arm_obj_tdata): Add known_eabi_attributes and
	other_eabi_attributes.
	(uleb128_size, is_default_attr, eabi_attr_size,
	elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
	elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
	elf32_arm_new_eabi_attr, attr_strdup, elf32_arm_add_eabi_attr_int,
	elf32_arm_add_eabi_attr_compat, copy_eabi_attributes,
	elf32_arm_merge_eabi_attributes): New functions.
	(elf32_arm_copy_private_bfd_data): Copy EABI object attributes.
	(elf32_arm_fake_sections): Handle .ARM.attributes.
	(elf32_arm_parse_attributes): New function.
	(elf32_arm_section_from_shdr): Use it.
	(bfd_elf32_bfd_final_link): Define.
gas/
	* config/tc-arm.c: Don't provide fallback default for CPU_DEFAULT.
	(arm_arch_used, thumb_arch_used, selected_cpu, selected_cpu_name):
	New variables.
	(arm_cpu_option_table): Add canonical_name.
	(arm_cpus): Populate canonical_name field.
	(s_arm_eabi_attribute, s_arm_arch, s_arm_cpu, s_arm_fpu,
	aeabi_set_public_attributes, arm_md_end): New functions.
	(md_pseudo_table): Add "cpu", "arch", "fpu" and "eabi_attribute".
	(md_assemble): Set thumb_arch_used and arm_arch_used.
	(md_begin): Set defaut cpu if CPU_DEFAULT not defined.
	* config/tc-arm.h (md_end): Define.
	* doc/c-arm.texi: Document .cpu, .arch, .fpu and .eabi_attribute.
gas/testsuite/
	* gas/arm/eabi_attr_1.s: New test.
	* gas/arm/eabi_attr_1.d: New test.
	* gas/arm/arm7t.d: Only disassemble code sections.
	* gas/arm/bignum1.d: Ignore Arm object attribute sections.
	* gas/arm/mapping.d: Ditto.
	* gas/arm/unwind.d: Ditto.
	* gas/elf/section0.d: Ditto.
	* gas/elf/section1.d: Ditto.
	* gas/elf/elf.exp: Set target_machine for Arm EABI based targets.
	* gas/elf/section2.e-armeabi: New file.
include/elf/
	* arm.h: Add prototypes for BFD object attribute routines.
ld/testsuite/
	* ld-arm/arm-rel31.d: Ignore Arm object attribute sections.
	* ld-arm/arm-target1-abs.d: Ditto.
	* ld-arm/arm-target1-rel.d: Ditto.
	* ld-arm/arm-target2-abs.d: Ditto.
	* ld-arm/arm-target2-got-rel.d: Ditto.
	* ld-arm/arm-target2-rel.d: Ditto.
This commit is contained in:
Paul Brook 2005-10-08 17:07:16 +00:00
parent a174593722
commit a614f7ecba
2 changed files with 52 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2005-10-08 Paul Brook <paul@codesourcery.com>
* arm.h: Add prototypes for BFD object attribute routines.
2005-09-09 Richard Earnshaw <richard.earnshaw@arm.com>
* arm.h (SHT_ARM_PREEMPTMAP, SHT_ARM_ATTRIBUTES): New defines.

View File

@ -223,6 +223,54 @@ START_RELOC_NUMBERS (elf_arm_reloc_type)
FAKE_RELOC (R_ARM_PC13, R_ARM_LDR_PC_G0) /* Unclear whether meaning is different. */
END_RELOC_NUMBERS (R_ARM_max)
#ifdef BFD_ARCH_SIZE
/* Routines for manipulating EABI object attributes. */
void elf32_arm_add_eabi_attr_int (bfd *, int, unsigned int);
void elf32_arm_add_eabi_attr_string (bfd *, int, const char *);
void elf32_arm_add_eabi_attr_compat (bfd *, unsigned int, const char *);
void elf32_arm_set_eabi_attr_contents (bfd *, bfd_byte *, bfd_vma);
bfd_vma elf32_arm_eabi_attr_size (bfd *);
enum
{
Tag_NULL,
Tag_File,
Tag_Section,
Tag_Symbol,
Tag_CPU_raw_name,
Tag_CPU_name,
Tag_CPU_arch,
Tag_CPU_arch_profile,
Tag_ARM_ISA_use,
Tag_THUMB_ISA_use,
Tag_VFP_arch,
Tag_WMMX_arch,
Tag_NEON_arch,
Tag_PCS_config,
Tag_ABI_PCS_R9_use,
Tag_ABI_PCS_RW_data,
Tag_ABI_PCS_RO_data,
Tag_ABI_PCS_GOT_use,
Tag_ABI_PCS_wchar_t,
Tag_ABI_FP_rounding,
Tag_ABI_FP_denormal,
Tag_ABI_FP_exceptions,
Tag_ABI_FP_user_exceptions,
Tag_ABI_FP_number_model,
Tag_ABI_align8_needed,
Tag_ABI_align8_preserved,
Tag_ABI_enum_size,
Tag_ABI_HardFP_use,
Tag_ABI_VFP_args,
Tag_ABI_WMMX_args,
Tag_ABI_optimization_goals,
Tag_ABI_FP_optimization_goals,
Tag_compatibility,
};
#endif
/* The name of the note section used to identify arm variants. */
#define ARM_NOTE_SECTION ".note.gnu.arm.ident"