diff options
author | Alan Modra <amodra@gmail.com> | 2023-07-19 10:26:04 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-07-19 11:07:03 +0930 |
commit | 03c02b696e90714a0ae2c0200d3c65cfffcaa1ee (patch) | |
tree | f4b99cc0a723902850be46b0c8edf2b985016c1f /gold/powerpc.cc | |
parent | b7bf7f1b8f61cfd02af0eefe47c54f612efa6c96 (diff) | |
download | gdb-03c02b696e90714a0ae2c0200d3c65cfffcaa1ee.zip gdb-03c02b696e90714a0ae2c0200d3c65cfffcaa1ee.tar.gz gdb-03c02b696e90714a0ae2c0200d3c65cfffcaa1ee.tar.bz2 |
[GOLD, PowerPC64] Debug info relocation overflow
It is possible to build huge binaries on powerpc64, where 32-bit
addresses in debug info are insufficient to descibe locations in the
binary. Help out the user, and only warn about debug overflows.
* powerpc.cc (Target_powerpc::Relocate::relocate): Warn on
relocation overflows in debug info.
Diffstat (limited to 'gold/powerpc.cc')
-rw-r--r-- | gold/powerpc.cc | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 96fef7b..d62bdea 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -12420,10 +12420,19 @@ Target_powerpc<size, big_endian>::Relocate::relocate( && gsym->is_undefined() && is_branch_reloc<size>(r_type)))) { - gold_error_at_location(relinfo, relnum, rela.get_r_offset(), - _("relocation overflow")); - if (has_stub_value) - gold_info(_("try relinking with a smaller --stub-group-size")); + if (os->flags() & elfcpp::SHF_ALLOC) + { + gold_error_at_location(relinfo, relnum, rela.get_r_offset(), + _("relocation overflow")); + if (has_stub_value) + gold_info(_("try relinking with a smaller --stub-group-size")); + } + else + { + gold_warning_at_location(relinfo, relnum, rela.get_r_offset(), + _("relocation overflow")); + gold_info(_("debug info may be unreliable, compile with -gdwarf64")); + } } return true; |