openwrt/toolchain/binutils/patches/2.39/063-PR29542-PowerPC-gold-internal-error-in-get_output_vi.patch
Hauke Mehrtens cabdbc632e toolchain/binutils: backport stable patches
Add the patches with real changes from the binutils 2.39 stable branch.
I am not aware that we ran into any of these problems, but I think it is
better to take the existing stable patches.

They were exported like this:
git format-patch binutils-2_39...origin/binutils-2_39-branch
I removed the patches changing the version numbers only.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2022-12-31 21:52:53 +01:00

30 lines
989 B
Diff

From 041c22e35de06d22566f4c71e4425c3351215e66 Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Sun, 25 Sep 2022 12:07:36 +0930
Subject: [PATCH 063/160] 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)
---
gold/powerpc.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- 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