2010-02-03 Doug Kwan <dougkwan@google.com>
* arm.cc (Target_arm::relocate_section): Do view adjustment for all types of relaxed input section.
This commit is contained in:
parent
ff97be0688
commit
218c583182
|
@ -1,3 +1,8 @@
|
||||||
|
2010-02-02 Doug Kwan <dougkwan@google.com>
|
||||||
|
|
||||||
|
* arm.cc (Target_arm::relocate_section): Do view adjustment for all
|
||||||
|
types of relaxed input section.
|
||||||
|
|
||||||
2010-02-02 Doug Kwan <dougkwan@google.com>
|
2010-02-02 Doug Kwan <dougkwan@google.com>
|
||||||
|
|
||||||
* Makefile.am (HFILES): Add arm-reloc-property.h.
|
* Makefile.am (HFILES): Add arm-reloc-property.h.
|
||||||
|
|
35
gold/arm.cc
35
gold/arm.cc
|
@ -7916,26 +7916,27 @@ Target_arm<big_endian>::relocate_section(
|
||||||
typedef typename Target_arm<big_endian>::Relocate Arm_relocate;
|
typedef typename Target_arm<big_endian>::Relocate Arm_relocate;
|
||||||
gold_assert(sh_type == elfcpp::SHT_REL);
|
gold_assert(sh_type == elfcpp::SHT_REL);
|
||||||
|
|
||||||
Arm_input_section<big_endian>* arm_input_section =
|
// See if we are relocating a relaxed input section. If so, the view
|
||||||
this->find_arm_input_section(relinfo->object, relinfo->data_shndx);
|
// covers the whole output section and we need to adjust accordingly.
|
||||||
|
if (needs_special_offset_handling)
|
||||||
// This is an ARM input section and the view covers the whole output
|
|
||||||
// section.
|
|
||||||
if (arm_input_section != NULL)
|
|
||||||
{
|
{
|
||||||
gold_assert(needs_special_offset_handling);
|
const Output_relaxed_input_section* poris =
|
||||||
Arm_address section_address = arm_input_section->address();
|
output_section->find_relaxed_input_section(relinfo->object,
|
||||||
section_size_type section_size = arm_input_section->data_size();
|
relinfo->data_shndx);
|
||||||
|
if (poris != NULL)
|
||||||
|
{
|
||||||
|
Arm_address section_address = poris->address();
|
||||||
|
section_size_type section_size = poris->data_size();
|
||||||
|
|
||||||
gold_assert((arm_input_section->address() >= address)
|
gold_assert((section_address >= address)
|
||||||
&& ((arm_input_section->address()
|
&& ((section_address + section_size)
|
||||||
+ arm_input_section->data_size())
|
<= (address + view_size)));
|
||||||
<= (address + view_size)));
|
|
||||||
|
|
||||||
off_t offset = section_address - address;
|
off_t offset = section_address - address;
|
||||||
view += offset;
|
view += offset;
|
||||||
address += offset;
|
address += offset;
|
||||||
view_size = section_size;
|
view_size = section_size;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
gold::relocate_section<32, big_endian, Target_arm, elfcpp::SHT_REL,
|
gold::relocate_section<32, big_endian, Target_arm, elfcpp::SHT_REL,
|
||||||
|
|
Loading…
Reference in New Issue