From d8698e55cbe95e56c3a4cbd67c320048ea4f087a Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Wed, 23 Sep 2015 20:44:06 +0200 Subject: Properly mark all internal function definitions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since we banned old style function definitions GCC is able to diagnose function definitions that don't match the function declaration: elf32_getehdr.c:78: error: conflicting types for ‘__elf64_getehdr_wrlock’ libelfP.h:498: note: previous declaration of ‘__elf64_getehdr_wrlock’ This happens on i386 because there internal functions are marked with: # define internal_function __attribute__ ((regparm (3), stdcall)) Make sure all internal function declarations and definitions are marked with internal_function. Signed-off-by: Mark Wielaard --- libasm/ChangeLog | 7 +++++++ libasm/asm_align.c | 1 + libasm/asm_end.c | 1 + libasm/asm_error.c | 1 + 4 files changed, 10 insertions(+) (limited to 'libasm') diff --git a/libasm/ChangeLog b/libasm/ChangeLog index 0eb84c6c..7433cb72 100644 --- a/libasm/ChangeLog +++ b/libasm/ChangeLog @@ -1,3 +1,10 @@ +2015-09-23 Mark Wielaard + + * asm_align.c (__libasm_ensure_section_space): Mark as + internal_function. + * asm_end.c (__libasm_finictx): Likewise. + * asm_error.c (__libasm_seterrno): Likewise. + 2015-09-22 Mark Wielaard * asm_*.c: Remove old-style function definitions. diff --git a/libasm/asm_align.c b/libasm/asm_align.c index b7708f59..6631c4d7 100644 --- a/libasm/asm_align.c +++ b/libasm/asm_align.c @@ -132,6 +132,7 @@ asm_align (AsmScn_t *asmscn, GElf_Word value) /* Ensure there are at least LEN bytes available in the output buffer for ASMSCN. */ int +internal_function __libasm_ensure_section_space (AsmScn_t *asmscn, size_t len) { /* The blocks with the section content are kept in a circular diff --git a/libasm/asm_end.c b/libasm/asm_end.c index d629fcd8..d21a70a3 100644 --- a/libasm/asm_end.c +++ b/libasm/asm_end.c @@ -554,6 +554,7 @@ free_section (AsmScn_t *scnp) void +internal_function __libasm_finictx (AsmCtx_t *ctx) { /* Iterate through section table and free individual entries. */ diff --git a/libasm/asm_error.c b/libasm/asm_error.c index 54430497..cc3e660b 100644 --- a/libasm/asm_error.c +++ b/libasm/asm_error.c @@ -52,6 +52,7 @@ asm_errno (void) void +internal_function __libasm_seterrno (int value) { global_error = value; -- cgit v1.2.1