readelf: Also set do_got_section_contents to false

Message ID CAMe9rOoBkGLNBAijT_7d6dY2cnFnHm1+zUs+PShN6pjeAzSvgg@mail.gmail.com
State New
Headers
Series readelf: Also set do_got_section_contents to false |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply

Commit Message

H.J. Lu June 29, 2026, 10:39 p.m. UTC
  Also set do_got_section_contents to false if section headers are failed
to load.

PR binutils/34323
* readelf.c (process_object): Also set do_got_section_contents.
  

Comments

Jan Beulich June 30, 2026, 7:13 a.m. UTC | #1
On 30.06.2026 00:39, H.J. Lu wrote:
> Also set do_got_section_contents to false if section headers are failed
> to load.
> 
> PR binutils/34323
> * readelf.c (process_object): Also set do_got_section_contents.

Okay.

Jan
  

Patch

From 578620305daedbf1e26c3a0e53208caa9714acbc Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 30 Jun 2026 06:37:05 +0800
Subject: [PATCH] readelf: Also set do_got_section_contents to false

Also set do_got_section_contents to false if section headers are failed
to load.

	PR binutils/34323
	* readelf.c (process_object): Also set do_got_section_contents.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
 binutils/readelf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/binutils/readelf.c b/binutils/readelf.c
index bf27f9eec23..bf94f4d5caa 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -24938,7 +24938,8 @@  process_object (Filedata * filedata)
   if (! process_section_headers (filedata))
     {
       /* Without loaded section headers we cannot process lots of things.  */
-      do_unwind = do_version = do_dump = do_arch = false;
+      do_unwind = do_version = do_dump = do_arch
+	= do_got_section_contents = false;
 
       if (! do_using_dynamic)
 	do_syms = do_dyn_syms = do_reloc = false;
-- 
2.54.0