2010-01-13 Doug Kwan <dougkwan@google.com>
* arm.cc (Arm_relobj::section_needs_reloc_stub_scanning,
+ Arm_relobj::scan_sections_for_stubs): Rearrange code to avoid an
+ apparent compiler problem of not folding static constant integral
+ data members of elfcpp::Elf_sizes<32>.
+
+2010-01-13 Doug Kwan <dougkwan@google.com>
+
+ * arm.cc (Arm_relobj::section_needs_reloc_stub_scanning,
Arm_relobj::section_needs_cortex_a8_stub_scanning,
Arm_relobj::scan_section_for_cortex_a8_erratum,
Arm_relobj::scan_span_for_cortex_a8_erratum): New methods.
if (this->adjust_shndx(shdr.get_sh_link()) != this->symtab_shndx())
return false;
- const unsigned int reloc_size = (sh_type == elfcpp::SHT_REL
- ? elfcpp::Elf_sizes<32>::rel_size
- : elfcpp::Elf_sizes<32>::rela_size);
+ unsigned int reloc_size;
+ if (sh_type == elfcpp::SHT_REL)
+ reloc_size = elfcpp::Elf_sizes<32>::rel_size;
+ else
+ reloc_size = elfcpp::Elf_sizes<32>::rela_size;
// Ignore reloc section with unexpected entsize or uneven size.
// The error will be reported in the final link.
relinfo.reloc_shndx = i;
relinfo.data_shndx = index;
unsigned int sh_type = shdr.get_sh_type();
- const unsigned int reloc_size = (sh_type == elfcpp::SHT_REL
- ? elfcpp::Elf_sizes<32>::rel_size
- : elfcpp::Elf_sizes<32>::rela_size);
+ unsigned int reloc_size;
+ if (sh_type == elfcpp::SHT_REL)
+ reloc_size = elfcpp::Elf_sizes<32>::rel_size;
+ else
+ reloc_size = elfcpp::Elf_sizes<32>::rela_size;
Output_section* os = out_sections[index];
arm_target->scan_section_for_stubs(&relinfo, sh_type, prelocs,