diff options
author | Mark Wielaard <mjw@redhat.com> | 2015-09-23 20:44:06 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2015-09-23 20:49:54 +0200 |
commit | d8698e55cbe95e56c3a4cbd67c320048ea4f087a (patch) | |
tree | f244c37048ebdee1931e446b426ab66c839379a2 /libdw | |
parent | 1ccdfb683ad6c7e59793136c3a657ddf131cafd1 (diff) | |
download | elfutils-d8698e55cbe95e56c3a4cbd67c320048ea4f087a.tar.gz |
Properly mark all internal function definitions.
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 <mjw@redhat.com>
Diffstat (limited to 'libdw')
-rw-r--r-- | libdw/ChangeLog | 7 | ||||
-rw-r--r-- | libdw/dwarf_error.c | 1 | ||||
-rw-r--r-- | libdw/dwarf_formref.c | 1 | ||||
-rw-r--r-- | libdw/libdw_findcu.c | 1 | ||||
-rw-r--r-- | libdw/libdw_visit_scopes.c | 1 |
5 files changed, 11 insertions, 0 deletions
diff --git a/libdw/ChangeLog b/libdw/ChangeLog index cb5ec9ce..5a026d87 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,10 @@ +2015-09-23 Mark Wielaard <mjw@redhat.com> + + * dwarf_error.c (__libdw_seterrno): Mark as internal_function. + * dwarf_formref.c (__libdw_formref): Likewise. + * libdw_findcu.c (__libdw_findcu): Likewise. + * libdw_visit_scopes.c (__libdw_visit_scopes): Likewise. + 2015-09-22 Mark Wielaard <mjw@redhat.com> * *.c: Remove old-style function definitions. diff --git a/libdw/dwarf_error.c b/libdw/dwarf_error.c index c431bd3e..66fdc81a 100644 --- a/libdw/dwarf_error.c +++ b/libdw/dwarf_error.c @@ -100,6 +100,7 @@ static const char *errmsgs[] = void +internal_function __libdw_seterrno (int value) { global_error = (value >= 0 && value < (int) nerrmsgs diff --git a/libdw/dwarf_formref.c b/libdw/dwarf_formref.c index c5fb19b1..2240a258 100644 --- a/libdw/dwarf_formref.c +++ b/libdw/dwarf_formref.c @@ -35,6 +35,7 @@ #include "libdwP.h" int +internal_function __libdw_formref (Dwarf_Attribute *attr, Dwarf_Off *return_offset) { const unsigned char *datap = attr->valp; diff --git a/libdw/libdw_findcu.c b/libdw/libdw_findcu.c index 5c03843c..082307b0 100644 --- a/libdw/libdw_findcu.c +++ b/libdw/libdw_findcu.c @@ -133,6 +133,7 @@ __libdw_intern_next_unit (Dwarf *dbg, bool debug_types) } struct Dwarf_CU * +internal_function __libdw_findcu (Dwarf *dbg, Dwarf_Off start, bool debug_types) { void **tree = debug_types ? &dbg->tu_tree : &dbg->cu_tree; diff --git a/libdw/libdw_visit_scopes.c b/libdw/libdw_visit_scopes.c index c882e4a5..5e5c26fd 100644 --- a/libdw/libdw_visit_scopes.c +++ b/libdw/libdw_visit_scopes.c @@ -65,6 +65,7 @@ may_have_scopes (Dwarf_Die *die) } int +internal_function __libdw_visit_scopes (unsigned int depth, struct Dwarf_Die_Chain *root, struct Dwarf_Die_Chain *imports, int (*previsit) (unsigned int, |