This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] MIPS/readelf: Remove extraneous null GOT data check


Null data is handled gracefully throughout in MIPS GOT processing, with 
addresses printed normally and unavailable data shown as `<unknown>' by 
`print_mips_got_entry', and special processing code for GOT[1] doing an 
explicit check.  Remove an unwanted null GOT data check then, introduced 
with commit 592458412fb2 in the course of addressing PR binutils/12855.

	binutils/
	* readelf.c (process_mips_specific): Remove null GOT data check.
---
 No MIPS test case has been provided with PR binutils/12855, however this
is supposed to be obviously correct by means of proofreading the code 
affected.  I'll push it shortly then unless someone objects.

  Maciej

binutils-mips-readelf-arch-got-data-null.diff
Index: binutils/binutils/readelf.c
===================================================================
--- binutils.orig/binutils/readelf.c	2017-04-10 23:13:23.156503246 +0100
+++ binutils/binutils/readelf.c	2017-04-10 23:34:46.430550614 +0100
@@ -15468,8 +15468,7 @@ process_mips_specific (FILE * file)
       data = (unsigned char *) get_data (NULL, file, offset,
                                          global_end - pltgot, 1,
 					 _("Global Offset Table data"));
-      if (data == NULL)
-	return FALSE;
+      /* PR 12855: Null data is handled gracefully throughout.  */
       data_end = data + (global_end - pltgot);
 
       printf (_("\nPrimary GOT:\n"));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]