From 38afe0568b4181adcd3bf254291ff27804e4a1d5 Mon Sep 17 00:00:00 2001 From: Doug Kwan Date: Fri, 30 Oct 2009 18:49:59 +0000 Subject: 2009-10-30 Doug Kwan elfcpp/ChangeLog: * arm.h (EF_ARM_BE8, EF_ARM_EABIMASK, EF_ARM_EABI_UNKNOWN, EF_ARM_EABI_VER1, EF_ARM_EABI_VER2, EF_ARM_EABI_VER3, EF_ARM_EABI_VER4, EF_ARM_EABI_VER5): New enums for processor-specific flags. (arm_eabi_version): New inline function. * elfcpp.h: Add a comment about DT_ENCODING. gold/ChangeLog: * arm.cc (Arm_relobj::processor_specific_flags): New method definition. (Arm_relobj::do_read_symbols): New method declaration. (Arm_relobj::processor_specific_flags_): New data member declaration. (Arm_dynobj): New class definition. (Target_arm::do_finalize_sections): Add input_objects parameter. (Target_arm::do_adjust_elf_header): New method declaration. (Target_arm::are_eabi_versions_compatible, (Target_arm::merge_processor_specific_flags): New method declaration. (Target_arm::do_make_elf_object): New overloaded method definitions and declaration. (Arm_relobj::do_read_symbols): New method definition. (Arm_dynobj::do_read_symbols): Ditto. (Target_arm::do_finalize_sections): Add input_objects parameters. Merge processor-specific flags from all input objects. (Target_arm::are_eabi_versions_compatible, Target_arm::merge_processor_specific_flags, Target_arm::do_adjust_elf_header, Target_arm::do_make_elf_object): New method definitions. * i386.cc (Target_i386::do_finalize_sections): Add unnamed Input_objects pointer type parameter. * layout.cc (Layout::finalize): Pass input objects to target's. finalize_sections function. * output.cc (Output_file_header::do_sized_write): Set ELF file header's processor-specific flags. * powerpc.cc (Target_powerpc::do_finalize_sections): Add unnamed Input_objects pointer type parameter. * sparc.cc (Target_sparc::do_finalize_sections): Same. * target.h (Input_objects): New forward class declaration. (Target::processor_specific_flags, Target::are_processor_specific_flags_sect): New method definitions. (Target::finalize_sections): Add input_objects parameter. (Target::Target): Initialize processor_specific_flags_ and are_processor_specific_flags_set_. (Target::do_finalize_sections): Add unnamed Input_objects pointer type parameter. (Target::set_processor_specific_flags): New method definition. (Target::processor_specific_flags_, Target::are_processor_specific_flags_set_): New data member declarations. * x86_64.cc (Target_x86_64::do_finalize_sections): Add unnamed Input_objects pointer type parameter. --- elfcpp/ChangeLog | 9 +++++++++ elfcpp/arm.h | 23 +++++++++++++++++++++++ elfcpp/elfcpp.h | 4 ++++ 3 files changed, 36 insertions(+) (limited to 'elfcpp') diff --git a/elfcpp/ChangeLog b/elfcpp/ChangeLog index 0a9906cc18..243988074e 100644 --- a/elfcpp/ChangeLog +++ b/elfcpp/ChangeLog @@ -1,3 +1,12 @@ +2009-10-30 Doug Kwan + + * arm.h (EF_ARM_BE8, EF_ARM_EABIMASK, EF_ARM_EABI_UNKNOWN, + EF_ARM_EABI_VER1, EF_ARM_EABI_VER2, EF_ARM_EABI_VER3, + EF_ARM_EABI_VER4, EF_ARM_EABI_VER5): New enums for processor-specific + flags. + (arm_eabi_version): New inline function. + * elfcpp.h: Add a comment about DT_ENCODING. + 2009-10-16 Doug Kwan * elfcpp/elfcpp.h (DT_PREINIT_ARRAY): Correct enum value. diff --git a/elfcpp/arm.h b/elfcpp/arm.h index 7ad827a422..027cf34224 100644 --- a/elfcpp/arm.h +++ b/elfcpp/arm.h @@ -199,6 +199,29 @@ enum // 160 - 255 Unallocated }; +// e_flags values used for ARM. We only support flags defined in AAELF. + +enum +{ + EF_ARM_BE8 = 0x00800000, + + // Mask to extract EABI version, not really a flag value. + EF_ARM_EABIMASK = 0xFF000000, + + EF_ARM_EABI_UNKNOWN = 0x00000000, + EF_ARM_EABI_VER1 = 0x01000000, + EF_ARM_EABI_VER2 = 0x02000000, + EF_ARM_EABI_VER3 = 0x03000000, + EF_ARM_EABI_VER4 = 0x04000000, + EF_ARM_EABI_VER5 = 0x05000000, +}; + +// Extract EABI version from flags. + +inline Elf_Word +arm_eabi_version(Elf_Word flags) +{ return flags & EF_ARM_EABIMASK; } + } // End namespace elfcpp. #endif // !defined(ELFCPP_ARM_H) diff --git a/elfcpp/elfcpp.h b/elfcpp/elfcpp.h index c5c93c31d9..4ace47c41a 100644 --- a/elfcpp/elfcpp.h +++ b/elfcpp/elfcpp.h @@ -656,7 +656,11 @@ enum DT DT_FINI_ARRAYSZ = 28, DT_RUNPATH = 29, DT_FLAGS = 30, + + // This is used to mark a range of dynamic tags. It is not really + // a tag value. DT_ENCODING = 32, + DT_PREINIT_ARRAY = 32, DT_PREINIT_ARRAYSZ = 33, DT_LOOS = 0x6000000d, -- cgit v1.2.1