projects
/
platform
/
upstream
/
binutils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add tests for PR ld/16452 and PR ld/16457
[platform/upstream/binutils.git]
/
gold
/
powerpc.cc
diff --git
a/gold/powerpc.cc
b/gold/powerpc.cc
index
0442e56
..
2319789
100644
(file)
--- a/
gold/powerpc.cc
+++ b/
gold/powerpc.cc
@@
-2399,6
+2399,14
@@
class Stub_control
output_section()
{ return output_section_; }
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:
typedef enum
{
private:
typedef enum
{
@@
-2515,6
+2523,7
@@
Target_powerpc<size, big_endian>::group_sections(Layout* layout,
{
stub_table->init(stub_control.owner(),
stub_control.output_section());
{
stub_table->init(stub_control.owner(),
stub_control.output_section());
+ stub_control.set_output_and_owner(*o, &*i);
stub_table = NULL;
}
if (stub_table == NULL)
stub_table = NULL;
}
if (stub_table == NULL)
@@
-7672,10
+7681,10
@@
Target_powerpc<size, big_endian>::Relocate::relocate(
break;
}
if (status != Powerpc_relocate_functions<size, big_endian>::STATUS_OK
break;
}
if (status != Powerpc_relocate_functions<size, big_endian>::STATUS_OK
- &&
!
has_stub_value
-
&&
!(gsym != NULL
- && gsym->is_weak_undefined()
-
&& is_branch_reloc(r_type
)))
+ &&
(
has_stub_value
+
||
!(gsym != NULL
+
&& gsym->is_weak_undefined()
+
&& is_branch_reloc(r_type)
)))
{
gold_error_at_location(relinfo, relnum, rela.get_r_offset(),
_("relocation overflow"));
{
gold_error_at_location(relinfo, relnum, rela.get_r_offset(),
_("relocation overflow"));