mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 11:00:01 +08:00
[GOLD] PowerPC relaxation corner case
It's possible for the section grouping code to decide that the last section looked at (the first section by address) doesn't fit into a group. In one case that section is already a group owner and that is handled correctly. In other cases the section should be put into its own group. Like this: * powerpc.cc (Stub_control::set_output_and_owner): New function. (Target_powerpc::group_sections): Use it.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2014-11-26 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* powerpc.cc (Stub_control::set_output_and_owner): New function.
|
||||||
|
(Target_powerpc::group_sections): Use it.
|
||||||
|
|
||||||
2014-11-25 Cary Coutant <ccoutant@google.com>
|
2014-11-25 Cary Coutant <ccoutant@google.com>
|
||||||
|
|
||||||
* binary.cc (Binary_to_elf::sized_convert): Add size to _start symbol.
|
* binary.cc (Binary_to_elf::sized_convert): Add size to _start symbol.
|
||||||
|
@ -2399,6 +2399,14 @@ class Stub_control
|
|||||||
output_section()
|
output_section()
|
||||||
{ return output_section_; }
|
{ return output_section_; }
|
||||||
|
|
||||||
|
void
|
||||||
|
set_output_and_owner(Output_section* o,
|
||||||
|
const Output_section::Input_section* i)
|
||||||
|
{
|
||||||
|
this->output_section_ = o;
|
||||||
|
this->owner_ = i;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
@ -2515,6 +2523,7 @@ Target_powerpc<size, big_endian>::group_sections(Layout* layout,
|
|||||||
{
|
{
|
||||||
stub_table->init(stub_control.owner(),
|
stub_table->init(stub_control.owner(),
|
||||||
stub_control.output_section());
|
stub_control.output_section());
|
||||||
|
stub_control.set_output_and_owner(*o, &*i);
|
||||||
stub_table = NULL;
|
stub_table = NULL;
|
||||||
}
|
}
|
||||||
if (stub_table == NULL)
|
if (stub_table == NULL)
|
||||||
|
Reference in New Issue
Block a user