From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39012 invoked by alias); 15 Nov 2018 16:17:09 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 38809 invoked by uid 48); 15 Nov 2018 16:17:02 -0000 From: "mark at klomp dot org" To: elfutils-devel@sourceware.org Subject: =?UTF-8?B?W0J1ZyBsaWJlbGYvMjM4ODRdIGVycm9yOiDigJhfX2VsZjMyX21zaXpl4oCZ?= =?UTF-8?B?IHNwZWNpZmllcyBsZXNzIHJlc3RyaWN0aXZlIGF0dHJpYnV0ZSB0aGFuIGl0?= =?UTF-8?B?cyB0YXJnZXQg4oCYZWxmMzJfZnNpemXigJk6IOKAmGNvbnN04oCZIFstV2Vy?= =?UTF-8?B?cm9yPW1pc3NpbmctYXR0cmlidXRlc10=?= Date: Thu, 15 Nov 2018 16:17:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: libelf X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2018-q4/txt/msg00136.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D23884 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2018-11-15 Ever confirmed|0 |1 --- Comment #2 from Mark Wielaard --- No, of course gcc is right. fsize is declared in libelf.h as: /* Return size of array of COUNT elements of the type denoted by TYPE in the external representation. The binary class is taken from ELF. The result is based on version VERSION of the ELF standard. */ extern size_t elf32_fsize (Elf_Type __type, size_t __count, unsigned int __version) __const_attribute__; /* Similar but this time the binary calls is ELFCLASS64. */ extern size_t elf64_fsize (Elf_Type __type, size_t __count, unsigned int __version) __const_attribute__; But msize is declared in libelfP.h as: /* The libelf API does not have such a function but it is still useful. Get the memory size for the given type. These functions cannot be marked internal since they are aliases of the export elfXX_fsize functions.*/ extern size_t __elf32_msize (Elf_Type __type, size_t __count, unsigned int __version); extern size_t __elf64_msize (Elf_Type __type, size_t __count, unsigned int __version); So the obvious fix is: diff --git a/libelf/libelfP.h b/libelf/libelfP.h index fa6d55d..9f3e8e9 100644 --- a/libelf/libelfP.h +++ b/libelf/libelfP.h @@ -461,9 +461,9 @@ extern Elf_Type __libelf_data_type (Elf *elf, int sh_ty= pe, G These functions cannot be marked internal since they are aliases of the export elfXX_fsize functions.*/ extern size_t __elf32_msize (Elf_Type __type, size_t __count, - unsigned int __version); + unsigned int __version) __const_attribute__; extern size_t __elf64_msize (Elf_Type __type, size_t __count, - unsigned int __version); + unsigned int __version) __const_attribute__; /* Create Elf descriptor from memory image. */ --=20 You are receiving this mail because: You are on the CC list for the bug.