diff options
author | Alan Modra <amodra@gmail.com> | 2022-09-25 12:07:36 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-09-26 19:27:51 +0930 |
commit | 041c22e35de06d22566f4c71e4425c3351215e66 (patch) | |
tree | fd474e60cc45141c86a8997f7f0c91aac4c5326a | |
parent | 6094ead38d289221642391270bdd94d0c688626c (diff) | |
download | binutils-041c22e35de06d22566f4c71e4425c3351215e66.zip binutils-041c22e35de06d22566f4c71e4425c3351215e66.tar.gz binutils-041c22e35de06d22566f4c71e4425c3351215e66.tar.bz2 |
PR29542, PowerPC gold internal error in get_output_view,
We were attempting to set a BSS style section contents.
PR 29542
* powerpc.cc (Output_data_plt_powerpc::do_write): Don't set .plt,
.iplt or .lplt section contents when position independent.
(cherry picked from commit c21736aed1d4877e090df60362413669dbdc391d)
-rw-r--r-- | gold/powerpc.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 22c0462..b950869 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -4338,7 +4338,8 @@ template<int size, bool big_endian> void Output_data_plt_powerpc<size, big_endian>::do_write(Output_file* of) { - if (!this->sym_ents_.empty()) + if (!this->sym_ents_.empty() + && !parameters->options().output_is_position_independent()) { const section_size_type offset = this->offset(); const section_size_type oview_size |