From c21736aed1d4877e090df60362413669dbdc391d Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sun, 25 Sep 2022 12:07:36 +0930 Subject: [PATCH] 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. --- gold/powerpc.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 22c0462326d..b950869d0b6 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -4338,7 +4338,8 @@ template void Output_data_plt_powerpc::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 -- 2.30.2