diff options
Diffstat (limited to 'libelf')
-rwxr-xr-x | libelf/Makefile.am | 10 | ||||
-rwxr-xr-x | libelf/lib/Makefile.am | 6 | ||||
-rwxr-xr-x | libelf/lib/gelf.h | 20 | ||||
-rwxr-xr-x | libelf/lib/libelf.h | 5 |
4 files changed, 24 insertions, 17 deletions
diff --git a/libelf/Makefile.am b/libelf/Makefile.am index 7fb725c6a..81226d506 100755 --- a/libelf/Makefile.am +++ b/libelf/Makefile.am @@ -8,4 +8,12 @@ EXTRA_DIST = \ aclocal.m4 ChangeLog config.guess config.h.in \ config.sub configure configure.in COPYING.LIB INSTALL install-sh \ Makefile.in mkinstalldirs README stamp-h.in VERSION \ - po/*.in po/*.po po/@PACKAGE@.pot + libelf.spec po/*.in po/*.po po/@PACKAGE@.pot + +.PHONY: sources +sources: + make -C lib sources + +.PHONY: lclint +lclint: + make -C lib lclint diff --git a/libelf/lib/Makefile.am b/libelf/lib/Makefile.am index f23489c69..9eb4ff8e4 100755 --- a/libelf/lib/Makefile.am +++ b/libelf/lib/Makefile.am @@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = 1.4 foreign EXTRA_DIST = sys_elf.h.in -INCLUDES = -I$(topdir) -I. -I$(srcdir) +INCLUDES = -I$(top_srcdir) -I. -I$(srcdir) # generic sources SRCS1 = begin.c cntl.c end.c errmsg.c errno.c fill.c flag.c getarhdr.c \ @@ -49,11 +49,11 @@ noinst_HEADERS = \ .PHONY: sources sources: - @echo $(libelf_la_SOURCES:%=libelf/%) + @echo $(libelf_la_SOURCES:%=libelf/lib/%) .PHONY: lclint lclint: - lclint -Dlint $(DEFS) $(INCLUDES) $(SRCS) + lclint -Dlint $(DEFS) $(INCLUDES) $(libelf_la_SOURCES) t1: libelf.a t1.o $(CC) -o $@ $@.o libelf.a diff --git a/libelf/lib/gelf.h b/libelf/lib/gelf.h index 018da7b9d..1dfeda0a7 100755 --- a/libelf/lib/gelf.h +++ b/libelf/lib/gelf.h @@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. extern "C" { #endif /* __cplusplus */ -#ifndef __P +#if !defined(__P) # if __STDC__ || defined(__cplusplus) # define __P(args) args # else /* __STDC__ || defined(__cplusplus) */ @@ -111,7 +111,7 @@ extern Elf_Data *gelf_xlatetom __P((Elf *elf, Elf_Data *dst, const Elf_Dat /*@modifies *dst @*/; /*@null@*/ -extern GElf_Ehdr *gelf_getehdr __P((Elf *elf, /*@returned@*/ GElf_Ehdr *dst)) +extern GElf_Ehdr *gelf_getehdr __P((Elf *elf, /*@returned@*/ /*@out@*/ GElf_Ehdr *dst)) /*@modifies *elf, dst @*/; extern int gelf_update_ehdr __P((Elf *elf, GElf_Ehdr *src)) /*@modifies *elf @*/; @@ -119,7 +119,7 @@ extern unsigned long gelf_newehdr __P((Elf *elf, int cls)) /*@modifies *elf @*/; /*@null@*/ -extern GElf_Phdr *gelf_getphdr __P((Elf *elf, int ndx, /*@returned@*/ GElf_Phdr *dst)) +extern GElf_Phdr *gelf_getphdr __P((Elf *elf, int ndx, /*@returned@*/ /*@out@*/ GElf_Phdr *dst)) /*@modifies *elf, dst @*/; extern int gelf_update_phdr __P((Elf *elf, int ndx, GElf_Phdr *src)) /*@modifies *elf @*/; @@ -127,31 +127,31 @@ extern unsigned long gelf_newphdr __P((Elf *elf, size_t phnum)) /*@modifies *elf @*/; /*@null@*/ -extern GElf_Shdr *gelf_getshdr __P((Elf_Scn *scn, /*@returned@*/ GElf_Shdr *dst)) +extern GElf_Shdr *gelf_getshdr __P((Elf_Scn *scn, /*@returned@*/ /*@out@*/ GElf_Shdr *dst)) /*@modifies dst @*/; extern int gelf_update_shdr __P((Elf_Scn *scn, GElf_Shdr *src)) /*@modifies scn @*/; /*@null@*/ -extern GElf_Dyn *gelf_getdyn __P((Elf_Data *src, int ndx, /*@returned@*/ GElf_Dyn *dst)) +extern GElf_Dyn *gelf_getdyn __P((Elf_Data *src, int ndx, /*@returned@*/ /*@out@*/ GElf_Dyn *dst)) /*@modifies *dst @*/; extern int gelf_update_dyn __P((Elf_Data *dst, int ndx, GElf_Dyn *src)) /*@modifies *dst @*/; /*@null@*/ -extern GElf_Rel *gelf_getrel __P((Elf_Data *src, int ndx, /*@returned@*/ GElf_Rel *dst)) +extern GElf_Rel *gelf_getrel __P((Elf_Data *src, int ndx, /*@returned@*/ /*@out@*/ GElf_Rel *dst)) /*@modifies *dst @*/; extern int gelf_update_rel __P((Elf_Data *dst, int ndx, GElf_Rel *src)) /*@modifies *dst @*/; /*@null@*/ -extern GElf_Rela *gelf_getrela __P((Elf_Data *src, int ndx, /*@returned@*/ GElf_Rela *dst)) +extern GElf_Rela *gelf_getrela __P((Elf_Data *src, int ndx, /*@returned@*/ /*@out@*/ GElf_Rela *dst)) /*@modifies *dst @*/; extern int gelf_update_rela __P((Elf_Data *dst, int ndx, GElf_Rela *src)) /*@modifies *dst @*/; /*@null@*/ -extern GElf_Sym *gelf_getsym __P((Elf_Data *src, int ndx, /*@returned@*/ GElf_Sym *dst)) +extern GElf_Sym *gelf_getsym __P((Elf_Data *src, int ndx, /*@returned@*/ /*@out@*/ GElf_Sym *dst)) /*@modifies *dst @*/; extern int gelf_update_sym __P((Elf_Data *dst, int ndx, GElf_Sym *src)) /*@modifies *dst @*/; @@ -164,12 +164,12 @@ extern long gelf_checksum __P((Elf *elf)) * */ #if 0 -extern GElf_Move *gelf_getmove __P((Elf_Data *src, int ndx, GElf_Move *src)) +extern GElf_Move *gelf_getmove __P((Elf_Data *src, int ndx, /*@returned@*/ /*@out@*/ GElf_Move *src)) /*@*/; extern int gelf_update_move __P((Elf_Data *dst, int ndx, GElf_Move *src)) /*@modifies *dst @*/; -extern GElf_Syminfo* gelf_getsyminfo __P((Elf_Data *src, int ndx, GElf_Syminfo *dst)) +extern GElf_Syminfo* gelf_getsyminfo __P((Elf_Data *src, int ndx, /*@returned@*/ /*@null@*/ GElf_Syminfo *dst)) /*@modifies *dst @*/; extern int gelf_update_syminfo __P((Elf_Data *dst, int ndx, GElf_Syminfo *src)) /*@modifies *dst @*/; diff --git a/libelf/lib/libelf.h b/libelf/lib/libelf.h index 73436c1f0..d30a7f293 100755 --- a/libelf/lib/libelf.h +++ b/libelf/lib/libelf.h @@ -171,7 +171,7 @@ extern int elf_cntl __P((/*@null@*/ Elf *elf, Elf_Cmd cmd)) extern int elf_end __P((/*@only@*/ /*@null@*/ Elf *elf)) /*@globals fileSystem @*/ /*@modifies elf, fileSystem @*/; -/*@null@*/ +/*@observer@*/ /*@null@*/ extern const char *elf_errmsg __P((int err)) /*@*/; extern int elf_errno __P((void)) @@ -300,8 +300,7 @@ extern Elf64_Phdr *elf64_newphdr __P((Elf *elf, size_t count)) /*@null@*/ extern Elf64_Shdr *elf64_getshdr __P((Elf_Scn *scn)) /*@*/; -extern size_t elf64_fsize __P((Elf_Type type, size_t count, - unsigned ver)) +extern size_t elf64_fsize __P((Elf_Type type, size_t count, unsigned ver)) /*@*/; /*@null@*/ extern Elf_Data *elf64_xlatetof __P((/*@returned@*/ Elf_Data *dst, const Elf_Data *src, |