This is the mail archive of the
mailing list for the binutils project.
[PATCH] MIPS/readelf: Remove extraneous null GOT data check
- From: "Maciej W. Rozycki" <macro at imgtec dot com>
- To: Nick Clifton <nickc at redhat dot com>, <binutils at sourceware dot org>
- Date: Wed, 12 Apr 2017 00:02:13 +0100
- Subject: [PATCH] MIPS/readelf: Remove extraneous null GOT data check
- Authentication-results: sourceware.org; auth=none
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 doing an
explicit check. Remove an unwanted null GOT data check then, introduced
with commit 592458412fb2 in the course of addressing PR binutils/12855.
* 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.
--- 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"));