This is the mail archive of the
mailing list for the binutils project.
Re: readelf build error on 64-bit hosts
- From: nick clifton <nickc at redhat dot com>
- To: binutils at sourceware dot org
- Date: Wed, 27 Feb 2013 12:11:27 +0000
- Subject: Re: readelf build error on 64-bit hosts
- References: <20130227103318.GB620@bubble.grove.modra.org>
From the PR15181 fix, I believe..
readelf.c: In function âprocess_corefile_note_segmentâ:
readelf.c:13370:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
readelf.c:13391:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
Doh - I know I should have checked on a 64-bit host.
On looking at the change, I think there are some other errors too. This:
Elf_External_Note * next;
if (data_remaining < sizeof * next)
will cause a failure if the last note in a note section has namesz and
descsz both zero (Elf_External_Note includes a one byte name array).
What do you think of the following?
* readelf.c (offsetof): Define.
(CHECK_ENTSIZE_VALUES): Remove extraneous indefinite article.
(process_corefile_note_segment): Allow notes without name or
desc. Combine out-of-range checks. Disallow "negative"
notesz or descaz.
Much better - please apply it have not done so already.
Thanks for fixing this.