+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * arm_attrs.c: Remove old-style function definitions.
+ * linux-core-note.c: Likewise.
+ * ppc_attrs.c: Likewise.
+
2015-09-04 Chih-Hung Hsieh <chh@google.com>
* aarch64_init.c (aarch64_init): Replace K&R function definition
} while (0)
bool
-arm_check_object_attribute (ebl, vendor, tag, value, tag_name, value_name)
- Ebl *ebl __attribute__ ((unused));
- const char *vendor;
- int tag;
- uint64_t value __attribute__ ((unused));
- const char **tag_name;
- const char **value_name;
+arm_check_object_attribute (Ebl *ebl __attribute__ ((unused)),
+ const char *vendor, int tag, uint64_t value,
+ const char **tag_name, const char **value_name)
{
if (!strcmp (vendor, "aeabi"))
switch (tag)
#undef FIELD
int
-EBLHOOK(core_note) (nhdr, name, regs_offset, nregloc, reglocs, nitems, items)
- const GElf_Nhdr *nhdr;
- const char *name;
- GElf_Word *regs_offset;
- size_t *nregloc;
- const Ebl_Register_Location **reglocs;
- size_t *nitems;
- const Ebl_Core_Item **items;
+EBLHOOK(core_note) (const GElf_Nhdr *nhdr, const char *name,
+ GElf_Word *regs_offset, size_t *nregloc,
+ const Ebl_Register_Location **reglocs,
+ size_t *nitems, const Ebl_Core_Item **items)
{
switch (nhdr->n_namesz)
{
#include "libebl_CPU.h"
bool
-ppc_check_object_attribute (ebl, vendor, tag, value, tag_name, value_name)
- Ebl *ebl __attribute__ ((unused));
- const char *vendor;
- int tag;
- uint64_t value;
- const char **tag_name;
- const char **value_name;
+ppc_check_object_attribute (Ebl *ebl __attribute__ ((unused)),
+ const char *vendor, int tag, uint64_t value,
+ const char **tag_name, const char **value_name)
{
if (!strcmp (vendor, "gnu"))
switch (tag)
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * eu.am (AM_CFLAGS): Add -Wold-style-definition -Wstrict-prototypes.
+
2015-08-04 Mark Wielaard <mjw@redhat.com>
* 10-default-yama-scope.conf: New file.
STACK_USAGE_WARNING=
endif
AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \
+ -Wold-style-definition -Wstrict-prototypes \
$(if $($(*F)_no_Werror),,-Werror) \
$(if $($(*F)_no_Wunused),,-Wunused -Wextra) \
$(if $($(*F)_no_Wstack_usage),,$(STACK_USAGE_WARNING)) \
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * dynamicsizehash.c: Remove old-style function definitions.
+ * md5.c: Likewise.
+ * sha1.c: Likewise.
+ * xmalloc.c: Likewise.
+ * xstrdup.c: Likewise.
+ * xstrndup.c: Likewise.
+
2015-05-31 Mark Wielaard <mjw@redhat.com>
* eu-config.h (ALLOW_UNALIGNED): Define when ! CHECK_UNDEFINED.
static size_t
-lookup (htab, hval, val)
- NAME *htab;
- HASHTYPE hval;
- TYPE val __attribute__ ((unused));
+lookup (NAME *htab, HASHTYPE hval, TYPE val __attribute__ ((unused)))
{
/* First hash function: simply take the modul but prevent zero. Small values
can skip the division, which helps performance when this is common. */
#define INIT(name) _INIT (name)
#define _INIT(name) \
name##_init
-INIT(NAME) (htab, init_size)
- NAME *htab;
- size_t init_size;
+INIT(NAME) (NAME *htab, size_t init_size)
{
/* We need the size to be a prime. */
init_size = next_prime (init_size);
#define FREE(name) _FREE (name)
#define _FREE(name) \
name##_free
-FREE(NAME) (htab)
- NAME *htab;
+FREE(NAME) (NAME *htab)
{
free (htab->table);
return 0;
#define INSERT(name) _INSERT (name)
#define _INSERT(name) \
name##_insert
-INSERT(NAME) (htab, hval, data)
- NAME *htab;
- HASHTYPE hval;
- TYPE data;
+INSERT(NAME) (NAME *htab, HASHTYPE hval, TYPE data)
{
size_t idx;
#define INSERT(name) _INSERT (name)
#define _INSERT(name) \
name##_overwrite
-INSERT(NAME) (htab, hval, data)
- NAME *htab;
- HASHTYPE hval;
- TYPE data;
+INSERT(NAME) (NAME *htab, HASHTYPE hval, TYPE data)
{
size_t idx;
#define FIND(name) _FIND (name)
#define _FIND(name) \
name##_find
-FIND(NAME) (htab, hval, val)
- NAME *htab;
- HASHTYPE hval;
- TYPE val;
+FIND(NAME) (NAME *htab, HASHTYPE hval, TYPE val)
{
size_t idx;
# define _ITERATEFCT(name) \
name##_iterate
TYPE
-ITERATEFCT(NAME) (htab, ptr)
- NAME *htab;
- void **ptr;
+ITERATEFCT(NAME) (NAME *htab, void **ptr)
{
void *p = *ptr;
/* Functions to compute MD5 message digest of files or memory blocks.
according to the definition of MD5 in RFC 1321 from April 1992.
- Copyright (C) 1995-2011 Red Hat, Inc.
+ Copyright (C) 1995-2011, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1995.
/* Initialize structure containing state of computation.
(RFC 1321, 3.3: Step 3) */
void
-md5_init_ctx (ctx)
- struct md5_ctx *ctx;
+md5_init_ctx (struct md5_ctx *ctx)
{
ctx->A = 0x67452301;
ctx->B = 0xefcdab89;
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
void *
-md5_read_ctx (ctx, resbuf)
- const struct md5_ctx *ctx;
- void *resbuf;
+md5_read_ctx (const struct md5_ctx *ctx, void *resbuf)
{
((md5_uint32 *) resbuf)[0] = SWAP (ctx->A);
((md5_uint32 *) resbuf)[1] = SWAP (ctx->B);
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
void *
-md5_finish_ctx (ctx, resbuf)
- struct md5_ctx *ctx;
- void *resbuf;
+md5_finish_ctx (struct md5_ctx *ctx, void *resbuf)
{
/* Take yet unprocessed bytes into account. */
md5_uint32 bytes = ctx->buflen;
resulting message digest number will be written into the 16 bytes
beginning at RESBLOCK. */
int
-md5_stream (stream, resblock)
- FILE *stream;
- void *resblock;
+md5_stream (FILE *stream, void *resblock)
{
/* Important: BLOCKSIZE must be a multiple of 64. */
#define BLOCKSIZE 4096
output yields to the wanted ASCII representation of the message
digest. */
void *
-md5_buffer (buffer, len, resblock)
- const char *buffer;
- size_t len;
- void *resblock;
+md5_buffer (const char *buffer, size_t len, void *resblock)
{
struct md5_ctx ctx;
void
-md5_process_bytes (buffer, len, ctx)
- const void *buffer;
- size_t len;
- struct md5_ctx *ctx;
+md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx)
{
/* When we already have some bits in our internal buffer concatenate
both inputs first. */
It is assumed that LEN % 64 == 0. */
void
-md5_process_block (buffer, len, ctx)
- const void *buffer;
- size_t len;
- struct md5_ctx *ctx;
+md5_process_block (const void *buffer, size_t len, struct md5_ctx *ctx)
{
md5_uint32 correct_words[16];
const md5_uint32 *words = buffer;
/* Functions to compute SHA1 message digest of files or memory blocks.
according to the definition of SHA1 in FIPS 180-1 from April 1997.
- Copyright (C) 2008-2011 Red Hat, Inc.
+ Copyright (C) 2008-2011, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2008.
/* Initialize structure containing state of computation. */
void
-sha1_init_ctx (ctx)
- struct sha1_ctx *ctx;
+sha1_init_ctx (struct sha1_ctx *ctx)
{
ctx->A = 0x67452301;
ctx->B = 0xefcdab89;
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
void *
-sha1_read_ctx (ctx, resbuf)
- const struct sha1_ctx *ctx;
- void *resbuf;
+sha1_read_ctx (const struct sha1_ctx *ctx, void *resbuf)
{
((sha1_uint32 *) resbuf)[0] = SWAP (ctx->A);
((sha1_uint32 *) resbuf)[1] = SWAP (ctx->B);
IMPORTANT: On some systems it is required that RESBUF is correctly
aligned for a 32 bits value. */
void *
-sha1_finish_ctx (ctx, resbuf)
- struct sha1_ctx *ctx;
- void *resbuf;
+sha1_finish_ctx (struct sha1_ctx *ctx, void *resbuf)
{
/* Take yet unprocessed bytes into account. */
sha1_uint32 bytes = ctx->buflen;
void
-sha1_process_bytes (buffer, len, ctx)
- const void *buffer;
- size_t len;
- struct sha1_ctx *ctx;
+sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx)
{
/* When we already have some bits in our internal buffer concatenate
both inputs first. */
It is assumed that LEN % 64 == 0. */
void
-sha1_process_block (buffer, len, ctx)
- const void *buffer;
- size_t len;
- struct sha1_ctx *ctx;
+sha1_process_block (const void *buffer, size_t len, struct sha1_ctx *ctx)
{
sha1_uint32 computed_words[16];
#define W(i) computed_words[(i) % 16]
/* Convenience functions for allocation.
- Copyright (C) 2006 Red Hat, Inc.
+ Copyright (C) 2006, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
/* Allocate N bytes of memory dynamically, with error checking. */
void *
-xmalloc (n)
- size_t n;
+xmalloc (size_t n)
{
void *p;
/* Allocate memory for N elements of S bytes, with error checking. */
void *
-xcalloc (n, s)
- size_t n, s;
+xcalloc (size_t n, size_t s)
{
void *p;
/* Change the size of an allocated block of memory P to N bytes,
with error checking. */
void *
-xrealloc (p, n)
- void *p;
- size_t n;
+xrealloc (void *p, size_t n)
{
p = realloc (p, n);
if (p == NULL)
/* Convenience function for string allocation.
- Copyright (C) 2006 Red Hat, Inc.
+ Copyright (C) 2006, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
/* Return a newly allocated copy of STRING. */
char *
-xstrdup (string)
- const char *string;
+xstrdup (const char *string)
{
return strcpy (xmalloc (strlen (string) + 1), string);
}
/* Convenience function for string allocation.
- Copyright (C) 2006 Red Hat, Inc.
+ Copyright (C) 2006, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
/* Return a newly allocated copy of STRING. */
char *
-xstrndup (string, n)
- const char *string;
- size_t n;
+xstrndup (const char *string, size_t n)
{
char *res;
size_t len = strnlen (string, n);
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * asm_*.c: Remove old-style function definitions.
+
2015-09-04 Chih-Hung Hsieh <chh@google.com>
* asm_addint8.c (FCT): Replace K&R function definition
int
-asm_abort (ctx)
- AsmCtx_t *ctx;
+asm_abort (AsmCtx_t *ctx)
{
if (ctx == NULL)
/* Something went wrong earlier. */
int
-asm_addsleb128 (asmscn, num)
- AsmScn_t *asmscn;
- int32_t num;
+asm_addsleb128 (AsmScn_t *asmscn, int32_t num)
{
if (asmscn == NULL)
return -1;
/* Add zero terminated string STR of size LEN to (sub)section ASMSCN. */
int
-asm_addstrz (asmscn, str, len)
- AsmScn_t *asmscn;
- const char *str;
- size_t len;
+asm_addstrz (AsmScn_t *asmscn, const char *str, size_t len)
{
if (asmscn == NULL)
return -1;
int
-asm_adduleb128 (asmscn, num)
- AsmScn_t *asmscn;
- uint32_t num;
+asm_adduleb128 (AsmScn_t *asmscn, uint32_t num)
{
if (asmscn == NULL)
return -1;
int
-asm_align (asmscn, value)
- AsmScn_t *asmscn;
- GElf_Word value;
+asm_align (AsmScn_t *asmscn, GElf_Word value)
{
if (asmscn == NULL)
/* An earlier error. */
/* Ensure there are at least LEN bytes available in the output buffer
for ASMSCN. */
int
-__libasm_ensure_section_space (asmscn, len)
- AsmScn_t *asmscn;
- size_t len;
+__libasm_ensure_section_space (AsmScn_t *asmscn, size_t len)
{
/* The blocks with the section content are kept in a circular
single-linked list. */
int
-asm_end (ctx)
- AsmCtx_t *ctx;
+asm_end (AsmCtx_t *ctx)
{
int result;
void
-__libasm_finictx (ctx)
- AsmCtx_t *ctx;
+__libasm_finictx (AsmCtx_t *ctx)
{
/* Iterate through section table and free individual entries. */
AsmScn_t *scn = ctx->section_list;
void
-__libasm_seterrno (value)
- int value;
+__libasm_seterrno (int value)
{
global_error = value;
}
};
const char *
-asm_errmsg (error)
- int error;
+asm_errmsg (int error)
{
int last_error = global_error;
int
-asm_fill (asmscn, bytes, len)
- AsmScn_t *asmscn;
- void *bytes;
- size_t len;
+asm_fill (AsmScn_t *asmscn, void *bytes, size_t len)
{
struct FillPattern *pattern;
struct FillPattern *old_pattern;
Elf *
-asm_getelf (ctx)
- AsmCtx_t *ctx;
+asm_getelf (AsmCtx_t *ctx)
{
return ctx != NULL ? ctx->out.elf : NULL;
}
AsmSym_t *
-asm_newabssym (ctx, name, size, value, type, binding)
- AsmCtx_t *ctx;
- const char *name;
- GElf_Xword size;
- GElf_Addr value;
- int type;
- int binding;
+asm_newabssym (AsmCtx_t *ctx, const char *name, GElf_Xword size,
+ GElf_Addr value, int type, int binding)
{
AsmSym_t *result;
AsmSym_t *
-asm_newcomsym (ctx, name, size, align)
- AsmCtx_t *ctx;
- const char *name;
- GElf_Xword size;
- GElf_Addr align;
+asm_newcomsym (AsmCtx_t *ctx, const char *name, GElf_Xword size,
+ GElf_Addr align)
{
AsmSym_t *result;
AsmScn_t *
-asm_newscn (ctx, scnname, type, flags)
- AsmCtx_t *ctx;
- const char *scnname;
- GElf_Word type;
- GElf_Xword flags;
+asm_newscn (AsmCtx_t *ctx, const char *scnname, GElf_Word type,
+ GElf_Xword flags)
{
size_t scnname_len = strlen (scnname) + 1;
AsmScn_t *result;
AsmScn_t *
-asm_newscn_ingrp (ctx, scnname, type, flags, grp)
- AsmCtx_t *ctx;
- const char *scnname;
- GElf_Word type;
- GElf_Xword flags;
- AsmScnGrp_t *grp;
+asm_newscn_ingrp (AsmCtx_t *ctx, const char *scnname, GElf_Word type,
+ GElf_Xword flags, AsmScnGrp_t *grp)
{
AsmScn_t *result = INTUSE (asm_newscn) (ctx, scnname, type, flags);
AsmScnGrp_t *
-asm_newscngrp (ctx, grpname, signature, flags)
- AsmCtx_t *ctx;
- const char *grpname;
- AsmSym_t *signature;
- Elf32_Word flags;
+asm_newscngrp (AsmCtx_t *ctx, const char *grpname, AsmSym_t *signature,
+ Elf32_Word flags)
{
AsmScnGrp_t *result;
size_t grpname_len = strlen (grpname) + 1;
AsmScn_t *
-asm_newsubscn (asmscn, nr)
- AsmScn_t *asmscn;
- unsigned int nr;
+asm_newsubscn (AsmScn_t *asmscn, unsigned int nr)
{
AsmScn_t *runp;
AsmScn_t *newp;
AsmSym_t *
-asm_newsym (asmscn, name, size, type, binding)
- AsmScn_t *asmscn;
- const char *name;
- GElf_Xword size;
- int type;
- int binding;
+asm_newsym (AsmScn_t *asmscn, const char *name, GElf_Xword size,
+ int type, int binding)
{
#define TEMPSYMLEN 10
char tempsym[TEMPSYMLEN];
int
-asm_scngrp_newsignature (grp, signature)
- AsmScnGrp_t *grp;
- AsmSym_t *signature;
+asm_scngrp_newsignature (AsmScnGrp_t *grp, AsmSym_t *signature)
{
if (grp == NULL || signature == NULL)
return 1;
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * *.c: Remove old-style function definitions.
+
2015-09-15 Mark Wielaard <mjw@redhat.com>
* dwarf_peel_type.c (dwarf_peel_type): Don't reassign result pointer.
int
-dwarf_abbrevhaschildren (abbrev)
- Dwarf_Abbrev *abbrev;
+dwarf_abbrevhaschildren (Dwarf_Abbrev *abbrev)
{
return abbrev == NULL ? -1 : abbrev->has_children;
}
Dwarf_Die *
-dwarf_addrdie (dbg, addr, result)
- Dwarf *dbg;
- Dwarf_Addr addr;
- Dwarf_Die *result;
+dwarf_addrdie (Dwarf *dbg, Dwarf_Addr addr, Dwarf_Die *result)
{
Dwarf_Aranges *aranges;
size_t naranges;
}
int
-dwarf_aggregate_size (die, size)
- Dwarf_Die *die;
- Dwarf_Word *size;
+dwarf_aggregate_size (Dwarf_Die *die, Dwarf_Word *size)
{
Dwarf_Die type_mem;
int
-dwarf_arrayorder (die)
- Dwarf_Die *die;
+dwarf_arrayorder (Dwarf_Die *die)
{
Dwarf_Attribute attr_mem;
Dwarf_Word value;
Dwarf_Attribute *
-dwarf_attr (die, search_name, result)
- Dwarf_Die *die;
- unsigned int search_name;
- Dwarf_Attribute *result;
+dwarf_attr (Dwarf_Die *die, unsigned int search_name, Dwarf_Attribute *result)
{
if (die == NULL)
return NULL;
Dwarf *
-dwarf_begin (fd, cmd)
- int fd;
- Dwarf_Cmd cmd;
+dwarf_begin (int fd, Dwarf_Cmd cmd)
{
Elf *elf;
Elf_Cmd elfcmd;
Dwarf *
-dwarf_begin_elf (elf, cmd, scngrp)
- Elf *elf;
- Dwarf_Cmd cmd;
- Elf_Scn *scngrp;
+dwarf_begin_elf (Elf *elf, Dwarf_Cmd cmd, Elf_Scn *scngrp)
{
GElf_Ehdr *ehdr;
GElf_Ehdr ehdr_mem;
int
-dwarf_bitoffset (die)
- Dwarf_Die *die;
+dwarf_bitoffset (Dwarf_Die *die)
{
Dwarf_Attribute attr_mem;
Dwarf_Word value;
int
-dwarf_bitsize (die)
- Dwarf_Die *die;
+dwarf_bitsize (Dwarf_Die *die)
{
Dwarf_Attribute attr_mem;
Dwarf_Word value;
int
-dwarf_bytesize (die)
- Dwarf_Die *die;
+dwarf_bytesize (Dwarf_Die *die)
{
Dwarf_Attribute attr_mem;
Dwarf_Word value;
#include "cfi.h"
int
-dwarf_cfi_addrframe (cache, address, frame)
- Dwarf_CFI *cache;
- Dwarf_Addr address;
- Dwarf_Frame **frame;
+dwarf_cfi_addrframe (Dwarf_CFI *cache, Dwarf_Addr address, Dwarf_Frame **frame)
{
/* Maybe there was a previous error. */
if (cache == NULL)
#include <stdlib.h>
int
-dwarf_cfi_end (cache)
- Dwarf_CFI *cache;
+dwarf_cfi_end (Dwarf_CFI *cache)
{
if (cache != NULL)
{
int
-dwarf_child (die, result)
- Dwarf_Die *die;
- Dwarf_Die *result;
+dwarf_child (Dwarf_Die *die, Dwarf_Die *result)
{
/* Ignore previous errors. */
if (die == NULL)
Dwarf_Die *
-dwarf_cu_die (cu, result, versionp, abbrev_offsetp, address_sizep,
- offset_sizep, type_signaturep, type_offsetp)
- Dwarf_CU *cu;
- Dwarf_Die *result;
- Dwarf_Half *versionp;
- Dwarf_Off *abbrev_offsetp;
- uint8_t *address_sizep;
- uint8_t *offset_sizep;
- uint64_t *type_signaturep;
- Dwarf_Off *type_offsetp;
+dwarf_cu_die (Dwarf_CU *cu, Dwarf_Die *result, Dwarf_Half *versionp,
+ Dwarf_Off *abbrev_offsetp, uint8_t *address_sizep,
+ uint8_t *offset_sizep, uint64_t *type_signaturep,
+ Dwarf_Off *type_offsetp)
{
if (cu == NULL)
return NULL;
Dwarf *
-dwarf_cu_getdwarf (cu)
- Dwarf_CU *cu;
+dwarf_cu_getdwarf (Dwarf_CU *cu)
{
if (cu == NULL)
/* Some error occurred before. */
Dwarf_Off
-dwarf_cuoffset (die)
- Dwarf_Die *die;
+dwarf_cuoffset (Dwarf_Die *die)
{
return (die == NULL
? (Dwarf_Off) -1l
Dwarf_Die *
-dwarf_diecu (die, result, address_sizep, offset_sizep)
- Dwarf_Die *die;
- Dwarf_Die *result;
- uint8_t *address_sizep;
- uint8_t *offset_sizep;
+dwarf_diecu (Dwarf_Die *die, Dwarf_Die *result, uint8_t *address_sizep,
+ uint8_t *offset_sizep)
{
if (die == NULL)
return NULL;
const char *
-dwarf_diename (die)
- Dwarf_Die *die;
+dwarf_diename (Dwarf_Die *die)
{
Dwarf_Attribute attr_mem;
Dwarf_Off
-dwarf_dieoffset (die)
- Dwarf_Die *die;
+dwarf_dieoffset (Dwarf_Die *die)
{
return (die == NULL
? ~0ul
#endif
int
-dwarf_end (dwarf)
- Dwarf *dwarf;
+dwarf_end (Dwarf *dwarf)
{
if (dwarf != NULL)
{
int
-dwarf_entry_breakpoints (die, bkpts)
- Dwarf_Die *die;
- Dwarf_Addr **bkpts;
+dwarf_entry_breakpoints (Dwarf_Die *die, Dwarf_Addr **bkpts)
{
int nbkpts = 0;
*bkpts = NULL;
int
-dwarf_entrypc (die, return_addr)
- Dwarf_Die *die;
- Dwarf_Addr *return_addr;
+dwarf_entrypc (Dwarf_Die *die, Dwarf_Addr *return_addr)
{
Dwarf_Attribute attr_mem;
void
-__libdw_seterrno (value)
- int value;
+__libdw_seterrno (int value)
{
global_error = (value >= 0 && value < (int) nerrmsgs
? value : DWARF_E_UNKNOWN_ERROR);
const char *
-dwarf_errmsg (error)
- int error;
+dwarf_errmsg (int error)
{
int last_error = global_error;
int
-dwarf_formaddr (attr, return_addr)
- Dwarf_Attribute *attr;
- Dwarf_Addr *return_addr;
+dwarf_formaddr (Dwarf_Attribute *attr, Dwarf_Addr *return_addr)
{
if (attr == NULL)
return -1;
int
-dwarf_formblock (attr, return_block)
- Dwarf_Attribute *attr;
- Dwarf_Block *return_block;
+dwarf_formblock (Dwarf_Attribute *attr, Dwarf_Block *return_block)
{
if (attr == NULL)
return -1;
int
-dwarf_formflag (attr, return_bool)
- Dwarf_Attribute *attr;
- bool *return_bool;
+dwarf_formflag (Dwarf_Attribute *attr, bool *return_bool)
{
if (attr == NULL)
return -1;
#include "libdwP.h"
int
-__libdw_formref (attr, return_offset)
- Dwarf_Attribute *attr;
- Dwarf_Off *return_offset;
+__libdw_formref (Dwarf_Attribute *attr, Dwarf_Off *return_offset)
{
const unsigned char *datap = attr->valp;
const unsigned char *endp = attr->cu->endp;
/* This is the old public entry point.
It is now deprecated in favor of dwarf_formref_die. */
int
-dwarf_formref (attr, return_offset)
- Dwarf_Attribute *attr;
- Dwarf_Off *return_offset;
+dwarf_formref (Dwarf_Attribute *attr, Dwarf_Off *return_offset)
{
if (attr == NULL)
return -1;
Dwarf_Die *
-dwarf_formref_die (attr, result)
- Dwarf_Attribute *attr;
- Dwarf_Die *result;
+dwarf_formref_die (Dwarf_Attribute *attr, Dwarf_Die *result)
{
if (attr == NULL)
return NULL;
int
-dwarf_formsdata (attr, return_sval)
- Dwarf_Attribute *attr;
- Dwarf_Sword *return_sval;
+dwarf_formsdata (Dwarf_Attribute *attr, Dwarf_Sword *return_sval)
{
if (attr == NULL)
return -1;
const char *
-dwarf_formstring (attrp)
- Dwarf_Attribute *attrp;
+dwarf_formstring (Dwarf_Attribute *attrp)
{
/* Ignore earlier errors. */
if (attrp == NULL)
}
int
-dwarf_formudata (attr, return_uval)
- Dwarf_Attribute *attr;
- Dwarf_Word *return_uval;
+dwarf_formudata (Dwarf_Attribute *attr, Dwarf_Word *return_uval)
{
if (attr == NULL)
return -1;
#include <stdlib.h>
int
-dwarf_frame_cfa (fs, ops, nops)
- Dwarf_Frame *fs;
- Dwarf_Op **ops;
- size_t *nops;
+dwarf_frame_cfa (Dwarf_Frame *fs, Dwarf_Op **ops, size_t *nops)
{
/* Maybe there was a previous error. */
if (fs == NULL)
#include "cfi.h"
int
-dwarf_frame_info (fs, start, end, signalp)
- Dwarf_Frame *fs;
- Dwarf_Addr *start;
- Dwarf_Addr *end;
- bool *signalp;
+dwarf_frame_info (Dwarf_Frame *fs, Dwarf_Addr *start, Dwarf_Addr *end,
+ bool *signalp)
{
/* Maybe there was a previous error. */
if (fs == NULL)
#include <dwarf.h>
int
-dwarf_frame_register (fs, regno, ops_mem, ops, nops)
- Dwarf_Frame *fs;
- int regno;
- Dwarf_Op ops_mem[3];
- Dwarf_Op **ops;
- size_t *nops;
+dwarf_frame_register (Dwarf_Frame *fs, int regno, Dwarf_Op *ops_mem,
+ Dwarf_Op **ops, size_t *nops)
{
/* Maybe there was a previous error. */
if (fs == NULL)
Dwarf_Abbrev *
internal_function
-__libdw_getabbrev (dbg, cu, offset, lengthp, result)
- Dwarf *dbg;
- struct Dwarf_CU *cu;
- Dwarf_Off offset;
- size_t *lengthp;
- Dwarf_Abbrev *result;
+__libdw_getabbrev (Dwarf *dbg, struct Dwarf_CU *cu, Dwarf_Off offset,
+ size_t *lengthp, Dwarf_Abbrev *result)
{
/* Don't fail if there is not .debug_abbrev section. */
if (dbg->sectiondata[IDX_debug_abbrev] == NULL)
Dwarf_Abbrev *
-dwarf_getabbrev (die, offset, lengthp)
- Dwarf_Die *die;
- Dwarf_Off offset;
- size_t *lengthp;
+dwarf_getabbrev (Dwarf_Die *die, Dwarf_Off offset, size_t *lengthp)
{
return __libdw_getabbrev (die->cu->dbg, die->cu,
die->cu->orig_abbrev_offset + offset, lengthp,
int
-dwarf_getabbrevattr (abbrev, idx, namep, formp, offsetp)
- Dwarf_Abbrev *abbrev;
- size_t idx;
- unsigned int *namep;
- unsigned int *formp;
- Dwarf_Off *offsetp;
+dwarf_getabbrevattr (Dwarf_Abbrev *abbrev, size_t idx, unsigned int *namep,
+ unsigned int *formp, Dwarf_Off *offsetp)
{
if (abbrev == NULL)
return -1;
unsigned int
-dwarf_getabbrevcode (abbrev)
- Dwarf_Abbrev *abbrev;
+dwarf_getabbrevcode (Dwarf_Abbrev *abbrev)
{
return abbrev == NULL ? 0 : abbrev->code;
}
unsigned int
-dwarf_getabbrevtag (abbrev)
- Dwarf_Abbrev *abbrev;
+dwarf_getabbrevtag (Dwarf_Abbrev *abbrev)
{
return abbrev == NULL ? 0 : abbrev->tag;
}
Dwarf_Arange *
-dwarf_getarange_addr (aranges, addr)
- Dwarf_Aranges *aranges;
- Dwarf_Addr addr;
+dwarf_getarange_addr (Dwarf_Aranges *aranges, Dwarf_Addr addr)
{
if (aranges == NULL)
return NULL;
}
int
-dwarf_getaranges (dbg, aranges, naranges)
- Dwarf *dbg;
- Dwarf_Aranges **aranges;
- size_t *naranges;
+dwarf_getaranges (Dwarf *dbg, Dwarf_Aranges **aranges, size_t *naranges)
{
if (dbg == NULL)
return -1;
int
-dwarf_getattrcnt (abbrev, attrcntp)
- Dwarf_Abbrev *abbrev;
- size_t *attrcntp;
+dwarf_getattrcnt (Dwarf_Abbrev *abbrev, size_t *attrcntp)
{
if (abbrev == NULL)
return -1;
#include <dwarf.h>
Dwarf_CFI *
-dwarf_getcfi (dbg)
- Dwarf *dbg;
+dwarf_getcfi (Dwarf *dbg)
{
if (dbg == NULL)
return NULL;
}
Dwarf_CFI *
-dwarf_getcfi_elf (elf)
- Elf *elf;
+dwarf_getcfi_elf (Elf *elf)
{
if (elf_kind (elf) != ELF_K_ELF)
{
Elf *
-dwarf_getelf (dwarf)
- Dwarf *dwarf;
+dwarf_getelf (Dwarf *dwarf)
{
if (dwarf == NULL)
/* Some error occurred before. */
}
int
-dwarf_getlocation_implicit_value (attr, op, return_block)
- Dwarf_Attribute *attr;
- const Dwarf_Op *op;
- Dwarf_Block *return_block;
+dwarf_getlocation_implicit_value (Dwarf_Attribute *attr, const Dwarf_Op *op,
+ Dwarf_Block *return_block)
{
if (attr == NULL)
return -1;
}
int
-dwarf_getlocation (attr, llbuf, listlen)
- Dwarf_Attribute *attr;
- Dwarf_Op **llbuf;
- size_t *listlen;
+dwarf_getlocation (Dwarf_Attribute *attr, Dwarf_Op **llbuf, size_t *listlen)
{
if (! attr_ok (attr))
return -1;
}
static int
-attr_base_address (attr, basep)
- Dwarf_Attribute *attr;
- Dwarf_Addr *basep;
+attr_base_address (Dwarf_Attribute *attr, Dwarf_Addr *basep)
{
/* Fetch the CU's base address. */
Dwarf_Die cudie = CUDIE (attr->cu);
}
static int
-initial_offset_base (attr, offset, basep)
- Dwarf_Attribute *attr;
- ptrdiff_t *offset;
- Dwarf_Addr *basep;
+initial_offset_base (Dwarf_Attribute *attr, ptrdiff_t *offset,
+ Dwarf_Addr *basep)
{
if (attr_base_address (attr, basep) != 0)
return -1;
}
int
-dwarf_getlocation_addr (attr, address, llbufs, listlens, maxlocs)
- Dwarf_Attribute *attr;
- Dwarf_Addr address;
- Dwarf_Op **llbufs;
- size_t *listlens;
- size_t maxlocs;
+dwarf_getlocation_addr (Dwarf_Attribute *attr, Dwarf_Addr address,
+ Dwarf_Op **llbufs, size_t *listlens, size_t maxlocs)
{
if (! attr_ok (attr))
return -1;
}
ptrdiff_t
-dwarf_getlocations (attr, offset, basep, startp, endp, expr, exprlen)
- Dwarf_Attribute *attr;
- ptrdiff_t offset;
- Dwarf_Addr *basep;
- Dwarf_Addr *startp;
- Dwarf_Addr *endp;
- Dwarf_Op **expr;
- size_t *exprlen;
+dwarf_getlocations (Dwarf_Attribute *attr, ptrdiff_t offset, Dwarf_Addr *basep,
+ Dwarf_Addr *startp, Dwarf_Addr *endp, Dwarf_Op **expr,
+ size_t *exprlen)
{
if (! attr_ok (attr))
return -1;
}
int
-dwarf_getlocation_attr (attr, op, result)
- Dwarf_Attribute *attr;
- const Dwarf_Op *op;
- Dwarf_Attribute *result;
+dwarf_getlocation_attr (Dwarf_Attribute *attr, const Dwarf_Op *op, Dwarf_Attribute *result)
{
if (attr == NULL)
return -1;
#include <libdwP.h>
int
-dwarf_getlocation_die (attr, op, result)
- Dwarf_Attribute *attr;
- const Dwarf_Op *op;
- Dwarf_Die *result;
+dwarf_getlocation_die (Dwarf_Attribute *attr, const Dwarf_Op *op,
+ Dwarf_Die *result)
{
if (attr == NULL)
return -1;
}
int
-dwarf_getlocation_implicit_pointer (attr, op, result)
- Dwarf_Attribute *attr;
- const Dwarf_Op *op;
- Dwarf_Attribute *result;
+dwarf_getlocation_implicit_pointer (Dwarf_Attribute *attr, const Dwarf_Op *op,
+ Dwarf_Attribute *result)
{
if (attr == NULL)
return -1;
}
ptrdiff_t
-dwarf_getmacros (cudie, callback, arg, token)
- Dwarf_Die *cudie;
- int (*callback) (Dwarf_Macro *, void *);
- void *arg;
- ptrdiff_t token;
+dwarf_getmacros (Dwarf_Die *cudie, int (*callback) (Dwarf_Macro *, void *),
+ void *arg, ptrdiff_t token)
{
if (cudie == NULL)
{
ptrdiff_t
-dwarf_getpubnames (dbg, callback, arg, offset)
- Dwarf *dbg;
- int (*callback) (Dwarf *, Dwarf_Global *, void *);
- void *arg;
- ptrdiff_t offset;
+dwarf_getpubnames (Dwarf *dbg,
+ int (*callback) (Dwarf *, Dwarf_Global *, void *),
+ void *arg, ptrdiff_t offset)
{
if (dbg == NULL)
return -1l;
int
-dwarf_getsrcdirs (files, result, ndirs)
- Dwarf_Files *files;
- const char *const **result;
- size_t *ndirs;
+dwarf_getsrcdirs (Dwarf_Files *files, const char *const **result, size_t *ndirs)
{
if (files == NULL)
return -1;
const char *
-dwarf_getstring (dbg, offset, lenp)
- Dwarf *dbg;
- Dwarf_Off offset;
- size_t *lenp;
+dwarf_getstring (Dwarf *dbg, Dwarf_Off offset, size_t *lenp)
{
if (dbg == NULL)
return NULL;
int
-dwarf_hasattr (die, search_name)
- Dwarf_Die *die;
- unsigned int search_name;
+dwarf_hasattr (Dwarf_Die *die, unsigned int search_name)
{
if (die == NULL)
return 0;
int
-dwarf_haschildren (die)
- Dwarf_Die *die;
+dwarf_haschildren (Dwarf_Die *die)
{
/* Find the abbreviation entry. */
Dwarf_Abbrev *abbrevp = __libdw_dieabbrev (die, NULL);
int
-dwarf_hasform (attr, search_form)
- Dwarf_Attribute *attr;
- unsigned int search_form;
+dwarf_hasform (Dwarf_Attribute *attr, unsigned int search_form)
{
if (attr == NULL)
return 0;
int
-dwarf_highpc (die, return_addr)
- Dwarf_Die *die;
- Dwarf_Addr *return_addr;
+dwarf_highpc (Dwarf_Die *die, Dwarf_Addr *return_addr)
{
Dwarf_Attribute attr_high_mem;
Dwarf_Attribute *attr_high = INTUSE(dwarf_attr) (die, DW_AT_high_pc,
int
-dwarf_lowpc (die, return_addr)
- Dwarf_Die *die;
- Dwarf_Addr *return_addr;
+dwarf_lowpc (Dwarf_Die *die, Dwarf_Addr *return_addr)
{
Dwarf_Attribute attr_mem;
int
-dwarf_next_unit (dwarf, off, next_off, header_sizep, versionp, abbrev_offsetp,
- address_sizep, offset_sizep, type_signaturep, type_offsetp)
- Dwarf *dwarf;
- Dwarf_Off off;
- Dwarf_Off *next_off;
- size_t *header_sizep;
- Dwarf_Half *versionp;
- Dwarf_Off *abbrev_offsetp;
- uint8_t *address_sizep;
- uint8_t *offset_sizep;
- uint64_t *type_signaturep;
- Dwarf_Off *type_offsetp;
+dwarf_next_unit (Dwarf *dwarf, Dwarf_Off off, Dwarf_Off *next_off,
+ size_t *header_sizep, Dwarf_Half *versionp,
+ Dwarf_Off *abbrev_offsetp, uint8_t *address_sizep,
+ uint8_t *offset_sizep, uint64_t *type_signaturep,
+ Dwarf_Off *type_offsetp)
{
const bool debug_types = type_signaturep != NULL;
const size_t sec_idx = debug_types ? IDX_debug_types : IDX_debug_info;
INTDEF(dwarf_next_unit)
int
-dwarf_nextcu (dwarf, off, next_off, header_sizep, abbrev_offsetp,
- address_sizep, offset_sizep)
- Dwarf *dwarf;
- Dwarf_Off off;
- Dwarf_Off *next_off;
- size_t *header_sizep;
- Dwarf_Off *abbrev_offsetp;
- uint8_t *address_sizep;
- uint8_t *offset_sizep;
+dwarf_nextcu (Dwarf *dwarf, Dwarf_Off off, Dwarf_Off *next_off,
+ size_t *header_sizep, Dwarf_Off *abbrev_offsetp,
+ uint8_t *address_sizep, uint8_t *offset_sizep)
{
return INTUSE(dwarf_next_unit) (dwarf, off, next_off, header_sizep, NULL,
abbrev_offsetp, address_sizep, offset_sizep,
Dwarf_Die *
-dwarf_offdie (dbg, offset, result)
- Dwarf *dbg;
- Dwarf_Off offset;
- Dwarf_Die *result;
+dwarf_offdie (Dwarf *dbg, Dwarf_Off offset, Dwarf_Die *result)
{
return __libdw_offdie (dbg, offset, result, false);
}
INTDEF(dwarf_offdie)
Dwarf_Die *
-dwarf_offdie_types (dbg, offset, result)
- Dwarf *dbg;
- Dwarf_Off offset;
- Dwarf_Die *result;
+dwarf_offdie_types (Dwarf *dbg, Dwarf_Off offset, Dwarf_Die *result)
{
return __libdw_offdie (dbg, offset, result, true);
}
int
-dwarf_peel_type (die, result)
- Dwarf_Die *die;
- Dwarf_Die *result;
+dwarf_peel_type (Dwarf_Die *die, Dwarf_Die *result)
{
int tag;
int
-dwarf_siblingof (die, result)
- Dwarf_Die *die;
- Dwarf_Die *result;
+dwarf_siblingof (Dwarf_Die *die, Dwarf_Die *result)
{
/* Ignore previous errors. */
if (die == NULL)
int
-dwarf_srclang (die)
- Dwarf_Die *die;
+dwarf_srclang (Dwarf_Die *die)
{
Dwarf_Attribute attr_mem;
Dwarf_Word value;
int
-dwarf_tag (die)
- Dwarf_Die *die;
+dwarf_tag (Dwarf_Die *die)
{
/* Find the abbreviation entry. */
Dwarf_Abbrev *abbrevp = __libdw_dieabbrev (die, NULL);
unsigned int
-dwarf_whatattr (attr)
- Dwarf_Attribute *attr;
+dwarf_whatattr (Dwarf_Attribute *attr)
{
return attr == NULL ? 0 : attr->code;
}
unsigned int
-dwarf_whatform (attr)
- Dwarf_Attribute *attr;
+dwarf_whatform (Dwarf_Attribute *attr)
{
return attr == NULL ? 0 : attr->form;
}
}
int
-__libdw_visit_scopes (depth, root, imports, previsit, postvisit, arg)
- unsigned int depth;
- struct Dwarf_Die_Chain *root;
- struct Dwarf_Die_Chain *imports;
- int (*previsit) (unsigned int depth, struct Dwarf_Die_Chain *, void *);
- int (*postvisit) (unsigned int depth, struct Dwarf_Die_Chain *, void *);
- void *arg;
+__libdw_visit_scopes (unsigned int depth, struct Dwarf_Die_Chain *root,
+ struct Dwarf_Die_Chain *imports,
+ int (*previsit) (unsigned int,
+ struct Dwarf_Die_Chain *,
+ void *),
+ int (*postvisit) (unsigned int,
+ struct Dwarf_Die_Chain *,
+ void *),
+ void *arg)
{
struct Dwarf_Die_Chain child;
int ret;
return false;
}
- inline int walk_children ()
- {
+ inline int walk_children (void)
+{
do
{
/* For an imported unit, it is logically as if the children of
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * core-file.c: Remove old-style function definitions.
+ * dwfl_error.c: Likewise.
+ * dwfl_module_dwarf_cfi.c: Likewise.
+ * dwfl_module_eh_cfi.c: Likewise.
+ * dwfl_module_register_names.c: Likewise.
+ * dwfl_module_return_value_location.c: Likewise.
+ * dwfl_version.c: Likewise.
+
2015-09-09 Chih-Hung Hsieh <chh@google.com>
Mark Wielaard <mjw@redhat.com>
GElf_Off end;
GElf_Addr end_vaddr;
- inline void update_end ()
- {
+ inline void update_end (void)
+{
end = (phdr.p_offset + phdr.p_filesz + align - 1) & -align;
end_vaddr = (phdr.p_vaddr + phdr.p_memsz + align - 1) & -align;
}
const char *
-dwfl_errmsg (error)
- int error;
+dwfl_errmsg (int error)
{
if (error == 0 || error == -1)
{
}
Dwarf_CFI *
-dwfl_module_dwarf_cfi (mod, bias)
- Dwfl_Module *mod;
- Dwarf_Addr *bias;
+dwfl_module_dwarf_cfi (Dwfl_Module *mod, Dwarf_Addr *bias)
{
if (mod == NULL)
return NULL;
#include "../libdw/cfi.h"
Dwarf_CFI *
-dwfl_module_eh_cfi (mod, bias)
- Dwfl_Module *mod;
- Dwarf_Addr *bias;
+dwfl_module_eh_cfi (Dwfl_Module *mod, Dwarf_Addr *bias)
{
if (mod == NULL)
return NULL;
int
-dwfl_module_register_names (mod, func, arg)
- Dwfl_Module *mod;
- int (*func) (void *, int regno, const char *setname,
- const char *prefix, const char *regname,
- int bits, int type);
- void *arg;
+dwfl_module_register_names (Dwfl_Module *mod,
+ int (*func) (void *, int, const char *,
+ const char *, const char *,
+ int, int),
+ void *arg)
{
if (unlikely (mod == NULL))
return -1;
int
-dwfl_module_return_value_location (mod, functypedie, locops)
- Dwfl_Module *mod;
- Dwarf_Die *functypedie;
- const Dwarf_Op **locops;
+dwfl_module_return_value_location (Dwfl_Module *mod, Dwarf_Die *functypedie,
+ const Dwarf_Op **locops)
{
if (mod == NULL)
return -1;
#include "libdwflP.h"
const char *
-dwfl_version (dwfl)
- Dwfl *dwfl __attribute__ ((unused));
+dwfl_version (Dwfl *dwfl __attribute__ ((unused)))
{
return PACKAGE_VERSION;
}
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * *.c: Remove old-style function definitions.
+
2015-09-09 Chih-Hung Hsieh <chh@google.com>
* ebldwarftoregno.c (ebl_dwarf_to_regno): Remove redundant NULL tests
bool
-ebl_check_special_section (ebl, ndx, shdr, sname)
- Ebl *ebl;
- int ndx;
- const GElf_Shdr *shdr;
- const char *sname;
+ebl_check_special_section (Ebl *ebl, int ndx, const GElf_Shdr *shdr,
+ const char *sname)
{
return ebl != NULL && ebl->check_special_section (ebl, ndx, shdr, sname);
}
bool
-ebl_check_special_symbol (ebl, ehdr, sym, name, destshdr)
- Ebl *ebl;
- GElf_Ehdr *ehdr;
- const GElf_Sym *sym;
- const char *name;
- const GElf_Shdr *destshdr;
+ebl_check_special_symbol (Ebl *ebl, GElf_Ehdr *ehdr, const GElf_Sym *sym,
+ const char *name, const GElf_Shdr *destshdr)
{
if (ebl == NULL)
return false;
int
-ebl_syscall_abi (ebl, sp, pc, callno, args)
- Ebl *ebl;
- int *sp;
- int *pc;
- int *callno;
- int args[6];
+ebl_syscall_abi (Ebl *ebl, int *sp, int *pc, int *callno, int *args)
{
return ebl != NULL ? ebl->syscall_abi (ebl, sp, pc, callno, args) : -1;
}
int
-ebl_abi_cfi (ebl, abi_info)
- Ebl *ebl;
- Dwarf_CIE *abi_info;
+ebl_abi_cfi (Ebl *ebl, Dwarf_CIE *abi_info)
{
return ebl == NULL ? -1 : ebl->abi_cfi (ebl, abi_info);
}
#define nauxv_types (sizeof auxv_types / sizeof auxv_types[0])
int
-ebl_auxv_info (ebl, a_type, name, format)
- Ebl *ebl;
- GElf_Xword a_type;
- const char **name;
- const char **format;
+ebl_auxv_info (Ebl *ebl, GElf_Xword a_type, const char **name,
+ const char **format)
{
int result = ebl->auxv_info (a_type, name, format);
if (result == 0 && a_type < nauxv_types && auxv_types[a_type].name != NULL)
const char *
-ebl_backend_name (ebl)
- Ebl *ebl;
+ebl_backend_name (Ebl *ebl)
{
return ebl != NULL ? ebl->emulation : gettext ("No backend");
}
bool
-ebl_bss_plt_p (ebl)
- Ebl *ebl;
+ebl_bss_plt_p (Ebl *ebl)
{
return ebl == NULL ? false : ebl->bss_plt_p (ebl->elf);
}
bool
-ebl_check_object_attribute (ebl, vendor, tag, value, tag_name, value_name)
- Ebl *ebl;
- const char *vendor;
- int tag;
- uint64_t value;
- const char **tag_name;
- const char **value_name;
+ebl_check_object_attribute (Ebl *ebl, const char *vendor, int tag,
+ uint64_t value, const char **tag_name,
+ const char **value_name)
{
if (ebl->check_object_attribute (ebl, vendor, tag, value,
tag_name, value_name))
bool
-ebl_copy_reloc_p (ebl, reloc)
- Ebl *ebl;
- int reloc;
+ebl_copy_reloc_p (Ebl *ebl, int reloc)
{
return ebl->copy_reloc_p (reloc);
}
int
-ebl_core_note (ebl, nhdr, name,
- regs_offset, nregloc, reglocs, nitems, items)
- Ebl *ebl;
- const GElf_Nhdr *nhdr;
- const char *name;
- GElf_Word *regs_offset;
- size_t *nregloc;
- const Ebl_Register_Location **reglocs;
- size_t *nitems;
- const Ebl_Core_Item **items;
+ebl_core_note (Ebl *ebl, const GElf_Nhdr *nhdr, const char *name,
+ GElf_Word *regs_offset, size_t *nregloc,
+ const Ebl_Register_Location **reglocs, size_t *nitems,
+ const Ebl_Core_Item **items)
{
int result = ebl->core_note (nhdr, name,
regs_offset, nregloc, reglocs, nitems, items);
#include <libeblP.h>
const char *
-ebl_core_note_type_name (ebl, type, buf, len)
- Ebl *ebl;
- uint32_t type;
- char *buf;
- size_t len;
+ebl_core_note_type_name (Ebl *ebl, uint32_t type, char *buf, size_t len)
{
const char *res = ebl->core_note_type_name (type, buf, len);
bool
-ebl_debugscn_p (ebl, name)
- Ebl *ebl;
- const char *name;
+ebl_debugscn_p (Ebl *ebl, const char *name)
{
return name != NULL && ebl->debugscn_p (name);
}
bool
-ebl_dynamic_tag_check (ebl, tag)
- Ebl *ebl;
- int64_t tag;
+ebl_dynamic_tag_check (Ebl *ebl, int64_t tag)
{
bool res = ebl != NULL ? ebl->dynamic_tag_check (tag) : false;
const char *
-ebl_dynamic_tag_name (ebl, tag, buf, len)
- Ebl *ebl;
- int64_t tag;
- char *buf;
- size_t len;
+ebl_dynamic_tag_name (Ebl *ebl, int64_t tag, char *buf, size_t len)
{
const char *res = ebl != NULL ? ebl->dynamic_tag_name (tag, buf, len) : NULL;
int
-ebl_get_elfclass (ebl)
- Ebl *ebl;
+ebl_get_elfclass (Ebl *ebl)
{
return ebl->class;
}
int
-ebl_get_elfdata (ebl)
- Ebl *ebl;
+ebl_get_elfdata (Ebl *ebl)
{
return ebl->data;
}
int
-ebl_get_elfmachine (ebl)
- Ebl *ebl;
+ebl_get_elfmachine (Ebl *ebl)
{
return ebl->machine;
}
bool
-ebl_gotpc_reloc_check (ebl, reloc)
- Ebl *ebl;
- int reloc;
+ebl_gotpc_reloc_check (Ebl *ebl, int reloc)
{
return ebl != NULL ? ebl->gotpc_reloc_check (ebl->elf, reloc) : false;
}
bool
-ebl_machine_flag_check (ebl, flags)
- Ebl *ebl;
- Elf64_Word flags;
+ebl_machine_flag_check (Ebl *ebl, Elf64_Word flags)
{
return ebl != NULL ? ebl->machine_flag_check (flags) : (flags == 0);
}
const char *
-ebl_machine_flag_name (ebl, flags, buf, len)
- Ebl *ebl;
- Elf64_Word flags;
- char *buf;
- size_t len;
+ebl_machine_flag_name (Ebl *ebl, Elf64_Word flags, char *buf, size_t len)
{
const char *res;
bool
-ebl_machine_section_flag_check (ebl, flags)
- Ebl *ebl;
- GElf_Xword flags;
+ebl_machine_section_flag_check (Ebl *ebl, GElf_Xword flags)
{
return ebl != NULL ? ebl->machine_section_flag_check (flags) : (flags == 0);
}
bool
-ebl_none_reloc_p (ebl, reloc)
- Ebl *ebl;
- int reloc;
+ebl_none_reloc_p (Ebl *ebl, int reloc)
{
return ebl->none_reloc_p (reloc);
}
const char *
-ebl_object_type_name (ebl, object, buf, len)
- Ebl *ebl;
- int object;
- char *buf;
- size_t len;
+ebl_object_type_name (Ebl *ebl, int object, char *buf, size_t len)
{
const char *res;
void
-ebl_object_note (ebl, name, type, descsz, desc)
- Ebl *ebl;
- const char *name;
- uint32_t type;
- uint32_t descsz;
- const char *desc;
+ebl_object_note (Ebl *ebl, const char *name, uint32_t type,
+ uint32_t descsz, const char *desc)
{
if (! ebl->object_note (name, type, descsz, desc))
/* The machine specific function did not know this type. */
const char *
-ebl_object_note_type_name (ebl, name, type, buf, len)
- Ebl *ebl;
- const char *name;
- uint32_t type;
- char *buf;
- size_t len;
+ebl_object_note_type_name (Ebl *ebl, const char *name, uint32_t type,
+ char *buf, size_t len)
{
const char *res = ebl->object_note_type_name (name, type, buf, len);
/* Find an appropriate backend for the file associated with ELF. */
static Ebl *
-openbackend (elf, emulation, machine)
- Elf *elf;
- const char *emulation;
- GElf_Half machine;
+openbackend (Elf *elf, const char *emulation, GElf_Half machine)
{
Ebl *result;
size_t cnt;
/* Find an appropriate backend for the file associated with ELF. */
Ebl *
-ebl_openbackend (elf)
- Elf *elf;
+ebl_openbackend (Elf *elf)
{
GElf_Ehdr ehdr_mem;
GElf_Ehdr *ehdr;
const char *
-ebl_osabi_name (ebl, osabi, buf, len)
- Ebl *ebl;
- int osabi;
- char *buf;
- size_t len;
+ebl_osabi_name (Ebl *ebl, int osabi, char *buf, size_t len)
{
const char *res = ebl != NULL ? ebl->osabi_name (osabi, buf, len) : NULL;
ssize_t
-ebl_register_info (ebl, regno, name, namelen, prefix, setname, bits, type)
- Ebl *ebl;
- int regno;
- char *name;
- size_t namelen;
- const char **prefix;
- const char **setname;
- int *bits;
- int *type;
+ebl_register_info (Ebl *ebl, int regno, char *name, size_t namelen,
+ const char **prefix, const char **setname,
+ int *bits, int *type)
{
return ebl == NULL ? -1 : ebl->register_info (ebl, regno, name, namelen,
prefix, setname, bits, type);
bool
-ebl_relative_reloc_p (ebl, reloc)
- Ebl *ebl;
- int reloc;
+ebl_relative_reloc_p (Ebl *ebl, int reloc)
{
return ebl->relative_reloc_p (reloc);
}
Elf_Type
-ebl_reloc_simple_type (ebl, reloc)
- Ebl *ebl;
- int reloc;
+ebl_reloc_simple_type (Ebl *ebl, int reloc)
{
return ebl != NULL ? ebl->reloc_simple_type (ebl, reloc) : ELF_T_NUM;
}
bool
-ebl_reloc_type_check (ebl, reloc)
- Ebl *ebl;
- int reloc;
+ebl_reloc_type_check (Ebl *ebl, int reloc)
{
return ebl != NULL ? ebl->reloc_type_check (reloc) : false;
}
const char *
-ebl_reloc_type_name (ebl, reloc, buf, len)
- Ebl *ebl;
- int reloc;
- char *buf;
- size_t len;
+ebl_reloc_type_name (Ebl *ebl, int reloc, char *buf, size_t len)
{
const char *res;
bool
-ebl_reloc_valid_use (ebl, reloc)
- Ebl *ebl;
- int reloc;
+ebl_reloc_valid_use (Ebl *ebl, int reloc)
{
return ebl != NULL ? ebl->reloc_valid_use (ebl->elf, reloc) : false;
}
int
-ebl_return_value_location (ebl, functypedie, locops)
- Ebl *ebl;
- Dwarf_Die *functypedie;
- const Dwarf_Op **locops;
+ebl_return_value_location (Ebl *ebl, Dwarf_Die *functypedie,
+ const Dwarf_Op **locops)
{
return ebl == NULL ? -1 : ebl->return_value_location (functypedie, locops);
}
const char *
-ebl_section_name (ebl, section, xsection, buf, len, scnnames, shnum)
- Ebl *ebl;
- int section;
- int xsection;
- char *buf;
- size_t len;
- const char *scnnames[];
- size_t shnum;
+ebl_section_name (Ebl *ebl, int section, int xsection, char *buf, size_t len,
+ const char *scnnames[], size_t shnum)
{
const char *res = ebl != NULL ? ebl->section_name (section, xsection,
buf, len) : NULL;
const char *
-ebl_section_type_name (ebl, section, buf, len)
- Ebl *ebl;
- int section;
- char *buf;
- size_t len;
+ebl_section_type_name (Ebl *ebl, int section, char *buf, size_t len)
{
const char *res = ebl->section_type_name (section, buf, len);
const char *
-ebl_segment_type_name (ebl, segment, buf, len)
- Ebl *ebl;
- int segment;
- char *buf;
- size_t len;
+ebl_segment_type_name (Ebl *ebl, int segment, char *buf, size_t len)
{
const char *res;
GElf_Word
-ebl_sh_flags_combine (ebl, flags1, flags2)
- Ebl *ebl;
- GElf_Word flags1;
- GElf_Word flags2;
+ebl_sh_flags_combine (Ebl *ebl, GElf_Word flags1, GElf_Word flags2)
{
return ebl->sh_flags_combine (flags1, flags2);
}
const char *
-ebl_symbol_binding_name (ebl, binding, buf, len)
- Ebl *ebl;
- int binding;
- char *buf;
- size_t len;
+ebl_symbol_binding_name (Ebl *ebl, int binding, char *buf, size_t len)
{
const char *res;
const char *
-ebl_symbol_type_name (ebl, symbol, buf, len)
- Ebl *ebl;
- int symbol;
- char *buf;
- size_t len;
+ebl_symbol_type_name (Ebl *ebl, int symbol, char *buf, size_t len)
{
const char *res;
int
-ebl_sysvhash_entrysize (ebl)
- Ebl *ebl;
+ebl_sysvhash_entrysize (Ebl *ebl)
{
return ebl->sysvhash_entrysize;
}
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * *.c: Remove old-style function definitions.
+
2015-06-22 Mark Wielaard <mjw@redhat.com>
* dl-hash.h: Update from glibc.
/* Compute simple checksum from permanent parts of the ELF file.
- Copyright (C) 2002, 2003, 2004, 2005, 2009 Red Hat, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2009, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2002.
long int
-elfw2(LIBELFBITS,checksum) (elf)
- Elf *elf;
+elfw2(LIBELFBITS,checksum) (Elf *elf)
{
size_t shstrndx;
Elf_Scn *scn;
/* Return the size of an object file type.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
size_t
-elfw2(LIBELFBITS, fsize) (type, count, version)
- Elf_Type type;
- size_t count;
- unsigned int version;
+elfw2(LIBELFBITS, fsize) (Elf_Type type, size_t count, unsigned int version)
{
/* We do not have differences between file and memory sizes. Better
not since otherwise `mmap' would not work. */
/* Get ELF header.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
static ElfW2(LIBELFBITS,Ehdr) *
-getehdr_impl (elf, wrlock)
- Elf *elf;
- int wrlock;
+getehdr_impl (Elf *elf, int wrlock)
{
if (elf == NULL)
return NULL;
}
ElfW2(LIBELFBITS,Ehdr) *
-__elfw2(LIBELFBITS,getehdr_wrlock) (elf)
- Elf *elf;
+__elfw2(LIBELFBITS,getehdr_wrlock) (Elf *elf)
{
return getehdr_impl (elf, 1);
}
ElfW2(LIBELFBITS,Ehdr) *
-elfw2(LIBELFBITS,getehdr) (elf)
- Elf *elf;
+elfw2(LIBELFBITS,getehdr) (Elf *elf)
{
ElfW2(LIBELFBITS,Ehdr) *result;
if (elf == NULL)
/* Get ELF program header table.
- Copyright (C) 1998-2010, 2014 Red Hat, Inc.
+ Copyright (C) 1998-2010, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
#endif
ElfW2(LIBELFBITS,Phdr) *
-__elfw2(LIBELFBITS,getphdr_wrlock) (elf)
- Elf *elf;
+__elfw2(LIBELFBITS,getphdr_wrlock) (Elf *elf)
{
ElfW2(LIBELFBITS,Phdr) *result;
}
ElfW2(LIBELFBITS,Phdr) *
-elfw2(LIBELFBITS,getphdr) (elf)
- Elf *elf;
+elfw2(LIBELFBITS,getphdr) (Elf *elf)
{
ElfW2(LIBELFBITS,Phdr) *result;
/* Return section header.
- Copyright (C) 1998-2002, 2005, 2007, 2009, 2012, 2014 Red Hat, Inc.
+ Copyright (C) 1998-2002, 2005, 2007, 2009, 2012, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
}
ElfW2(LIBELFBITS,Shdr) *
-__elfw2(LIBELFBITS,getshdr_rdlock) (scn)
- Elf_Scn *scn;
+__elfw2(LIBELFBITS,getshdr_rdlock) (Elf_Scn *scn)
{
ElfW2(LIBELFBITS,Shdr) *result;
}
ElfW2(LIBELFBITS,Shdr) *
-__elfw2(LIBELFBITS,getshdr_wrlock) (scn)
- Elf_Scn *scn;
+__elfw2(LIBELFBITS,getshdr_wrlock) (Elf_Scn *scn)
{
ElfW2(LIBELFBITS,Shdr) *result;
}
ElfW2(LIBELFBITS,Shdr) *
-elfw2(LIBELFBITS,getshdr) (scn)
- Elf_Scn *scn;
+elfw2(LIBELFBITS,getshdr) (Elf_Scn *scn)
{
ElfW2(LIBELFBITS,Shdr) *result;
/* Create new ELF header.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
ElfW2(LIBELFBITS,Ehdr) *
-elfw2(LIBELFBITS,newehdr) (elf)
- Elf *elf;
+elfw2(LIBELFBITS,newehdr) (Elf *elf)
{
ElfW2(LIBELFBITS,Ehdr) *result;
/* Create new ELF program header table.
- Copyright (C) 1999-2010, 2014 Red Hat, Inc.
+ Copyright (C) 1999-2010, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
ElfW2(LIBELFBITS,Phdr) *
-elfw2(LIBELFBITS,newphdr) (elf, count)
- Elf *elf;
- size_t count;
+elfw2(LIBELFBITS,newphdr) (Elf *elf, size_t count)
{
ElfW2(LIBELFBITS,Phdr) *result;
/* Get section at specific index.
- Copyright (C) 2005, 2008 Red Hat, Inc.
+ Copyright (C) 2005, 2008, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2005.
Elf_Scn *
-elfw2(LIBELFBITS,offscn) (elf, offset)
- Elf *elf;
- ElfW2(LIBELFBITS,Off) offset;
+elfw2(LIBELFBITS,offscn) (Elf *elf, ElfW2(LIBELFBITS,Off) offset)
{
if (elf == NULL)
return NULL;
/* Convert from memory to file representation.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
Elf_Data *
-elfw2(LIBELFBITS, xlatetof) (dest, src, encode)
- Elf_Data *dest;
- const Elf_Data *src;
- unsigned int encode;
+elfw2(LIBELFBITS, xlatetof) (Elf_Data *dest, const Elf_Data *src,
+ unsigned int encode)
{
/* First test whether the input data is really suitable for this
type. This means, whether there is an integer number of records.
/* Convert from file to memory representation.
- Copyright (C) 1998, 1999, 2000, 2002, 2012 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2012, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
Elf_Data *
-elfw2(LIBELFBITS, xlatetom) (dest, src, encode)
- Elf_Data *dest;
- const Elf_Data *src;
- unsigned int encode;
+elfw2(LIBELFBITS, xlatetom) (Elf_Data *dest, const Elf_Data *src,
+ unsigned int encode)
{
/* First test whether the input data is really suitable for this
type. This means, whether there is an integer number of records.
/* Read the next archive header. */
int
internal_function
-__libelf_next_arhdr_wrlock (elf)
- Elf *elf;
+__libelf_next_arhdr_wrlock (Elf *elf)
{
struct ar_hdr *ar_hdr;
Elf_Arhdr *elf_ar_hdr;
/* Return a descriptor for the file belonging to FILDES. */
Elf *
-elf_begin (fildes, cmd, ref)
- int fildes;
- Elf_Cmd cmd;
- Elf *ref;
+elf_begin (int fildes, Elf_Cmd cmd, Elf *ref)
{
Elf *retval;
return NULL;
}
- Elf *lock_dup_elf ()
+ Elf *lock_dup_elf (void)
{
/* We need wrlock to dup an archive. */
if (ref->kind == ELF_K_AR)
/* Control an ELF file desrciptor.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
int
-elf_cntl (elf, cmd)
- Elf *elf;
- Elf_Cmd cmd;
+elf_cntl (Elf *elf, Elf_Cmd cmd)
{
int result = 0;
/* Free resources associated with Elf descriptor.
- Copyright (C) 1998,1999,2000,2001,2002,2004,2005,2007 Red Hat, Inc.
+ Copyright (C) 1998,1999,2000,2001,2002,2004,2005,2007,2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
int
-elf_end (elf)
- Elf *elf;
+elf_end (Elf *elf)
{
Elf *parent;
/* Error handling in libelf.
- Copyright (C) 1998-2010 Red Hat, Inc.
+ Copyright (C) 1998-2010, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
void
-__libelf_seterrno (value)
- int value;
+__libelf_seterrno (int value)
{
global_error = value >= 0 && value < nmsgidx ? value : ELF_E_UNKNOWN_ERROR;
}
const char *
-elf_errmsg (error)
- int error;
+elf_errmsg (int error)
{
int last_error = global_error;
/* Set fill byte used when constructing ELF objects.
- Copyright (C) 1998, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
void
-elf_fill (fill)
- int fill;
+elf_fill (int fill)
{
__libelf_fill_byte = fill;
}
/* Manipulate ELF data flag.
- Copyright (C) 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
unsigned int
-elf_flagdata (data, cmd, flags)
- Elf_Data *data;
- Elf_Cmd cmd;
- unsigned int flags;
+elf_flagdata (Elf_Data *data, Elf_Cmd cmd, unsigned int flags)
{
Elf_Data_Scn *data_scn;
unsigned int result;
/* Manipulate ELF header flags.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
unsigned int
-elf_flagehdr (elf, cmd, flags)
- Elf *elf;
- Elf_Cmd cmd;
- unsigned int flags;
+elf_flagehdr (Elf *elf, Elf_Cmd cmd, unsigned int flags)
{
unsigned int result;
/* Manipulate ELF file flags.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
unsigned int
-elf_flagelf (elf, cmd, flags)
- Elf *elf;
- Elf_Cmd cmd;
- unsigned int flags;
+elf_flagelf (Elf *elf, Elf_Cmd cmd, unsigned int flags)
{
unsigned int result;
/* Manipulate ELF program header flags.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
unsigned int
-elf_flagphdr (elf, cmd, flags)
- Elf *elf;
- Elf_Cmd cmd;
- unsigned int flags;
+elf_flagphdr (Elf *elf, Elf_Cmd cmd, unsigned int flags)
{
unsigned int result;
/* Manipulate ELF section flags.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
unsigned int
-elf_flagscn (scn, cmd, flags)
- Elf_Scn *scn;
- Elf_Cmd cmd;
- unsigned int flags;
+elf_flagscn (Elf_Scn *scn, Elf_Cmd cmd, unsigned int flags)
{
unsigned int result;
/* Manipulate ELF section header flags.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
unsigned int
-elf_flagshdr (scn, cmd, flags)
- Elf_Scn *scn;
- Elf_Cmd cmd;
- unsigned int flags;
+elf_flagshdr (Elf_Scn *scn, Elf_Cmd cmd, unsigned int flags)
{
unsigned int result;
/* Read header of next archive member.
- Copyright (C) 1998, 1999, 2000, 2002, 2008 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2008, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
Elf_Arhdr *
-elf_getarhdr (elf)
- Elf *elf;
+elf_getarhdr (Elf *elf)
{
if (elf == NULL)
return NULL;
/* Return offset in archive for current file ELF.
- Copyright (C) 2005, 2008 Red Hat, Inc.
+ Copyright (C) 2005, 2008, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2005.
off_t
-elf_getaroff (elf)
- Elf *elf;
+elf_getaroff (Elf *elf)
{
/* Be gratious, the specs demand it. */
if (elf == NULL || elf->parent == NULL)
}
Elf_Arsym *
-elf_getarsym (elf, ptr)
- Elf *elf;
- size_t *ptr;
+elf_getarsym (Elf *elf, size_t *ptr)
{
if (elf->kind != ELF_K_AR)
{
/* Return offset of first byte for the object.
- Copyright (C) 1998, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
off_t
-elf_getbase (elf)
- Elf *elf;
+elf_getbase (Elf *elf)
{
return elf == NULL ? (off_t) -1 : elf->start_offset;
}
Elf_Data *
internal_function
-__elf_getdata_rdlock (scn, data)
- Elf_Scn *scn;
- Elf_Data *data;
+__elf_getdata_rdlock (Elf_Scn *scn, Elf_Data *data)
{
Elf_Data *result = NULL;
Elf *elf;
}
Elf_Data *
-elf_getdata (scn, data)
- Elf_Scn *scn;
- Elf_Data *data;
+elf_getdata (Elf_Scn *scn, Elf_Data *data)
{
Elf_Data *result;
/* Return converted data from raw chunk of ELF file.
- Copyright (C) 2007, 2014 Red Hat, Inc.
+ Copyright (C) 2007, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
#include "common.h"
Elf_Data *
-elf_getdata_rawchunk (elf, offset, size, type)
- Elf *elf;
- off64_t offset;
- size_t size;
- Elf_Type type;
+elf_getdata_rawchunk (Elf *elf, off64_t offset, size_t size, Elf_Type type)
{
if (unlikely (elf == NULL))
return NULL;
/* Retrieve file identification data.
- Copyright (C) 1998, 1999, 2000, 2002, 2004 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2004, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
char *
-elf_getident (elf, ptr)
- Elf *elf;
- size_t *ptr;
+elf_getident (Elf *elf, size_t *ptr)
{
/* In case this is no ELF file, the handle is invalid and we return
NULL. */
/* Return number of program headers in the ELF file.
- Copyright (C) 2010, 2014 Red Hat, Inc.
+ Copyright (C) 2010, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
int
-__elf_getphdrnum_rdlock (elf, dst)
- Elf *elf;
- size_t *dst;
+__elf_getphdrnum_rdlock (Elf *elf, size_t *dst)
{
if (unlikely (elf->state.elf64.ehdr == NULL))
{
}
int
-__elf_getphdrnum_chk_rdlock (elf, dst)
- Elf *elf;
- size_t *dst;
+__elf_getphdrnum_chk_rdlock (Elf *elf, size_t *dst)
{
int result = __elf_getphdrnum_rdlock (elf, dst);
}
int
-elf_getphdrnum (elf, dst)
- Elf *elf;
- size_t *dst;
+elf_getphdrnum (Elf *elf, size_t *dst)
{
int result;
/* Get section at specific index.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
Elf_Scn *
-elf_getscn (elf, idx)
- Elf *elf;
- size_t idx;
+elf_getscn (Elf *elf, size_t idx)
{
if (elf == NULL)
return NULL;
/* Return number of sections in the ELF file.
- Copyright (C) 2002, 2009 Red Hat, Inc.
+ Copyright (C) 2002, 2009, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2002.
int
-__elf_getshdrnum_rdlock (elf, dst)
- Elf *elf;
- size_t *dst;
+__elf_getshdrnum_rdlock (Elf *elf, size_t *dst)
{
int result = 0;
int idx;
}
int
-elf_getshdrnum (elf, dst)
- Elf *elf;
- size_t *dst;
+elf_getshdrnum (Elf *elf, size_t *dst)
{
int result;
/* Return section index of section header string table.
- Copyright (C) 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2002.
int
-elf_getshdrstrndx (elf, dst)
- Elf *elf;
- size_t *dst;
+elf_getshdrstrndx (Elf *elf, size_t *dst)
{
int result = 0;
/* GNU-style Hash function used in ELF implementations.
- Copyright (C) 2006 Red Hat, Inc.
+ Copyright (C) 2006, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2006.
#include <dl-hash.h>
unsigned long int
-elf_gnu_hash (string)
- const char *string;
+elf_gnu_hash (const char *string)
{
uint_fast32_t h = 5381;
for (unsigned char c = *string; c != '\0'; c = *++string)
/* Hash function used in ELF implementations.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
#include <dl-hash.h>
unsigned long int
-elf_hash (string)
- const char *string;
+elf_hash (const char *string)
{
return _dl_elf_hash (string);
}
/* Return the kind of file associated with the descriptor.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
Elf_Kind
-elf_kind (elf)
- Elf *elf;
+elf_kind (Elf *elf)
{
return elf == NULL ? ELF_K_NONE : elf->kind;
}
/* Create descriptor for memory region.
- Copyright (C) 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1999.
Elf *
-elf_memory (image, size)
- char *image;
- size_t size;
+elf_memory (char *image, size_t size)
{
if (image == NULL)
{
/* Get index of section.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
size_t
-elf_ndxscn (scn)
- Elf_Scn *scn;
+elf_ndxscn (Elf_Scn *scn)
{
if (scn == NULL)
return SHN_UNDEF;
/* Append new section.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 1998,1999,2000,2001,2002,2005,2009,2014,2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
Elf_Scn *
-elf_newscn (elf)
- Elf *elf;
+elf_newscn (Elf *elf)
{
Elf_Scn *result = NULL;
bool first = false;
/* Advance in archive to next element.
- Copyright (C) 1998-2009 Red Hat, Inc.
+ Copyright (C) 1998-2009, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
Elf_Cmd
-elf_next (elf)
- Elf *elf;
+elf_next (Elf *elf)
{
Elf *parent;
Elf_Cmd ret;
/* Get next section.
- Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
Elf_Scn *
-elf_nextscn (elf, scn)
- Elf *elf;
- Elf_Scn *scn;
+elf_nextscn (Elf *elf, Elf_Scn *scn)
{
Elf_Scn *result = NULL;
/* Select specific element in archive.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
size_t
-elf_rand (elf, offset)
- Elf *elf;
- size_t offset;
+elf_rand (Elf *elf, size_t offset)
{
/* Be gratious, the specs demand it. */
if (elf == NULL || elf->kind != ELF_K_AR)
/* Return raw section content.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
Elf_Data *
-elf_rawdata (scn, data)
- Elf_Scn *scn;
- Elf_Data *data;
+elf_rawdata (Elf_Scn *scn, Elf_Data *data)
{
if (scn == NULL || scn->elf->kind != ELF_K_ELF)
{
/* Retrieve uninterpreted file contents.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
char *
-elf_rawfile (elf, ptr)
- Elf *elf;
- size_t *ptr;
+elf_rawfile (Elf *elf, size_t *ptr)
{
char *result;
/* Read all of the file associated with the descriptor.
- Copyright (C) 1998-2009 Red Hat, Inc.
+ Copyright (C) 1998-2009, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
char *
-__libelf_readall (elf)
- Elf *elf;
+__libelf_readall (Elf *elf)
{
/* Get the file. */
rwlock_wrlock (elf->lock);
char *
-elf_strptr (elf, idx, offset)
- Elf *elf;
- size_t idx;
- size_t offset;
+elf_strptr (Elf *elf, size_t idx, size_t offset)
{
if (elf == NULL)
return NULL;
off_t
-elf_update (elf, cmd)
- Elf *elf;
- Elf_Cmd cmd;
+elf_update (Elf *elf, Elf_Cmd cmd)
{
size_t shnum;
off_t size;
/* Coordinate ELF library and application versions.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1998.
unsigned int
-elf_version (version)
- unsigned int version;
+elf_version (unsigned int version)
{
if (version == EV_NONE)
return __libelf_version;
/* Convert from file to memory representation. Generic ELF version.
- Copyright (C) 2002 Red Hat, Inc.
+ Copyright (C) 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2002.
long int
-gelf_checksum (elf)
- Elf *elf;
+gelf_checksum (Elf *elf)
{
if (elf == NULL)
return -1l;
/* Return the size of an object file type.
- Copyright (C) 1998-2010 Red Hat, Inc.
+ Copyright (C) 1998-2010, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
size_t
-gelf_fsize (elf, type, count, version)
- Elf *elf;
- Elf_Type type;
- size_t count;
- unsigned int version;
+gelf_fsize (Elf *elf, Elf_Type type, size_t count, unsigned int version)
{
/* We do not have differences between file and memory sizes. Better
not since otherwise `mmap' would not work. */
/* Get information from auxiliary vector at the given index.
- Copyright (C) 2007 Red Hat, Inc.
+ Copyright (C) 2007, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
GElf_auxv_t *
-gelf_getauxv (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_auxv_t *dst;
+gelf_getauxv (Elf_Data *data, int ndx, GElf_auxv_t *dst)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
GElf_auxv_t *result = NULL;
/* Return the class of file associated with the descriptor.
- Copyright (C) 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
int
-gelf_getclass (elf)
- Elf *elf;
+gelf_getclass (Elf *elf)
{
return elf == NULL || elf->kind != ELF_K_ELF ? ELFCLASSNONE : elf->class;
}
/* Get information from dynamic table at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
GElf_Dyn *
-gelf_getdyn (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Dyn *dst;
+gelf_getdyn (Elf_Data *data, int ndx, GElf_Dyn *dst)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
GElf_Dyn *result = NULL;
/* Get ELF header.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
GElf_Ehdr *
-__gelf_getehdr_rdlock (elf, dest)
- Elf *elf;
- GElf_Ehdr *dest;
+__gelf_getehdr_rdlock (Elf *elf, GElf_Ehdr *dest)
{
GElf_Ehdr *result = NULL;
}
GElf_Ehdr *
-gelf_getehdr (elf, dest)
- Elf *elf;
- GElf_Ehdr *dest;
+gelf_getehdr (Elf *elf, GElf_Ehdr *dest)
{
GElf_Ehdr *result;
if (elf == NULL)
/* Get library from table at the given index.
- Copyright (C) 2004, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2004, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2004.
GElf_Lib *
-gelf_getlib (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Lib *dst;
+gelf_getlib (Elf_Data *data, int ndx, GElf_Lib *dst)
{
if (data == NULL)
return NULL;
/* Get move structure at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
GElf_Move *
-gelf_getmove (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Move *dst;
+gelf_getmove (Elf_Data *data, int ndx, GElf_Move *dst)
{
GElf_Move *result = NULL;
Elf *elf;
/* Get note information at the supplied offset.
- Copyright (C) 2007, 2014 Red Hat, Inc.
+ Copyright (C) 2007, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
#include "libelfP.h"
size_t
-gelf_getnote (data, offset, result, name_offset, desc_offset)
- Elf_Data *data;
- size_t offset;
- GElf_Nhdr *result;
- size_t *name_offset;
- size_t *desc_offset;
+gelf_getnote (Elf_Data *data, size_t offset, GElf_Nhdr *result,
+ size_t *name_offset, size_t *desc_offset)
{
if (data == NULL)
return 0;
/* Return program header table entry.
- Copyright (C) 1998-2010 Red Hat, Inc.
+ Copyright (C) 1998-2010, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
GElf_Phdr *
-gelf_getphdr (elf, ndx, dst)
- Elf *elf;
- int ndx;
- GElf_Phdr *dst;
+gelf_getphdr (Elf *elf, int ndx, GElf_Phdr *dst)
{
GElf_Phdr *result = NULL;
/* Get REL relocation information at given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
GElf_Rel *
-gelf_getrel (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Rel *dst;
+gelf_getrel (Elf_Data *data, int ndx, GElf_Rel *dst)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
Elf_Scn *scn;
/* Get RELA relocation information at given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
GElf_Rela *
-gelf_getrela (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Rela *dst;
+gelf_getrela (Elf_Data *data, int ndx, GElf_Rela *dst)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
Elf_Scn *scn;
/* Return section header.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
GElf_Shdr *
-gelf_getshdr (scn, dst)
- Elf_Scn *scn;
- GElf_Shdr *dst;
+gelf_getshdr (Elf_Scn *scn, GElf_Shdr *dst)
{
GElf_Shdr *result = NULL;
/* Get symbol information from symbol table at the given index.
- Copyright (C) 1999, 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
GElf_Sym *
-gelf_getsym (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Sym *dst;
+gelf_getsym (Elf_Data *data, int ndx, GElf_Sym *dst)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
GElf_Sym *result = NULL;
/* Get additional symbol information from symbol table at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
GElf_Syminfo *
-gelf_getsyminfo (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Syminfo *dst;
+gelf_getsyminfo (Elf_Data *data, int ndx, GElf_Syminfo *dst)
{
GElf_Syminfo *result = NULL;
/* Get symbol information and separate section index from symbol table
at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
GElf_Sym *
-gelf_getsymshndx (symdata, shndxdata, ndx, dst, dstshndx)
- Elf_Data *symdata;
- Elf_Data *shndxdata;
- int ndx;
- GElf_Sym *dst;
- Elf32_Word *dstshndx;
+gelf_getsymshndx (Elf_Data *symdata, Elf_Data *shndxdata, int ndx,
+ GElf_Sym *dst, Elf32_Word *dstshndx)
{
Elf_Data_Scn *symdata_scn = (Elf_Data_Scn *) symdata;
Elf_Data_Scn *shndxdata_scn = (Elf_Data_Scn *) shndxdata;
/* Get additional symbol version definition information at the given offset.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
GElf_Verdaux *
-gelf_getverdaux (data, offset, dst)
- Elf_Data *data;
- int offset;
- GElf_Verdaux *dst;
+gelf_getverdaux (Elf_Data *data, int offset, GElf_Verdaux *dst)
{
GElf_Verdaux *result;
/* Get symbol version definition information at the given offset.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
GElf_Verdef *
-gelf_getverdef (data, offset, dst)
- Elf_Data *data;
- int offset;
- GElf_Verdef *dst;
+gelf_getverdef (Elf_Data *data, int offset, GElf_Verdef *dst)
{
GElf_Verdef *result;
/* Get additional required symbol version information at the given offset.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
GElf_Vernaux *
-gelf_getvernaux (data, offset, dst)
- Elf_Data *data;
- int offset;
- GElf_Vernaux *dst;
+gelf_getvernaux (Elf_Data *data, int offset, GElf_Vernaux *dst)
{
GElf_Vernaux *result;
/* Get required symbol version information at the given offset.
- Copyright (C) 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
GElf_Verneed *
-gelf_getverneed (data, offset, dst)
- Elf_Data *data;
- int offset;
- GElf_Verneed *dst;
+gelf_getverneed (Elf_Data *data, int offset, GElf_Verneed *dst)
{
GElf_Verneed *result;
/* Get symbol version information at the given index.
- Copyright (C) 1999, 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1999.
GElf_Versym *
-gelf_getversym (data, ndx, dst)
- Elf_Data *data;
- int ndx;
- GElf_Versym *dst;
+gelf_getversym (Elf_Data *data, int ndx, GElf_Versym *dst)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
Elf_Scn *scn;
/* Create new ELF header.
- Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
unsigned long int
-gelf_newehdr (elf, class)
- Elf *elf;
- int class;
+gelf_newehdr (Elf *elf, int class)
{
return (class == ELFCLASS32
? (unsigned long int) INTUSE(elf32_newehdr) (elf)
/* Create new ELF program header.
- Copyright (C) 1998, 1999, 2000, 2002 Red Hat, Inc.
+ Copyright (C) 1998, 1999, 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 1998.
unsigned long int
-gelf_newphdr (elf, phnum)
- Elf *elf;
- size_t phnum;
+gelf_newphdr ( Elf *elf, size_t phnum)
{
return (elf->class == ELFCLASS32
? (unsigned long int) INTUSE(elf32_newphdr) (elf, phnum)
/* Create new ELF header.
- Copyright (C) 2005 Red Hat, Inc.
+ Copyright (C) 2005, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2005.
Elf_Scn *
-gelf_offscn (elf, offset)
- Elf *elf;
- GElf_Off offset;
+gelf_offscn (Elf *elf, GElf_Off offset)
{
if (elf->class == ELFCLASS32)
{
/* Update information in dynamic table at the given index.
- Copyright (C) 2007 Red Hat, Inc.
+ Copyright (C) 2007, 2015 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
int
-gelf_update_auxv (data, ndx, src)
- Elf_Data *data;
- int ndx;
- GElf_auxv_t *src;
+gelf_update_auxv (Elf_Data *data, int ndx, GElf_auxv_t *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
Elf_Scn *scn;
/* Update information in dynamic table at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
int
-gelf_update_dyn (data, ndx, src)
- Elf_Data *data;
- int ndx;
- GElf_Dyn *src;
+gelf_update_dyn (Elf_Data *data, int ndx, GElf_Dyn *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
Elf_Scn *scn;
/* Update library in table at the given index.
- Copyright (C) 2004, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2004, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2004.
int
-gelf_update_lib (data, ndx, src)
- Elf_Data *data;
- int ndx;
- GElf_Lib *src;
+gelf_update_lib (Elf_Data *data, int ndx, GElf_Lib *src)
{
if (data == NULL)
return 0;
/* Update move structure at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
int
-gelf_update_move (data, ndx, src)
- Elf_Data *data;
- int ndx;
- GElf_Move *src;
+gelf_update_move (Elf_Data *data, int ndx, GElf_Move *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
/* Update symbol information in symbol table at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
int
-gelf_update_sym (data, ndx, src)
- Elf_Data *data;
- int ndx;
- GElf_Sym *src;
+gelf_update_sym (Elf_Data *data, int ndx, GElf_Sym *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
Elf_Scn *scn;
/* Update additional symbol information in symbol table at the given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
int
-gelf_update_syminfo (data, ndx, src)
- Elf_Data *data;
- int ndx;
- GElf_Syminfo *src;
+gelf_update_syminfo (Elf_Data *data, int ndx, GElf_Syminfo *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
Elf_Scn *scn;
/* Update symbol information and section index in symbol table at the
given index.
- Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2000, 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
int
-gelf_update_symshndx (symdata, shndxdata, ndx, src, srcshndx)
- Elf_Data *symdata;
- Elf_Data *shndxdata;
- int ndx;
- GElf_Sym *src;
- Elf32_Word srcshndx;
+gelf_update_symshndx (Elf_Data *symdata, Elf_Data *shndxdata, int ndx,
+ GElf_Sym *src, Elf32_Word srcshndx)
{
Elf_Data_Scn *symdata_scn = (Elf_Data_Scn *) symdata;
Elf_Data_Scn *shndxdata_scn = (Elf_Data_Scn *) shndxdata;
/* Update additional symbol version definition information.
- Copyright (C) 2001, 2002 Red Hat, Inc.
+ Copyright (C) 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2001.
int
-gelf_update_verdaux (data, offset, src)
- Elf_Data *data;
- int offset;
- GElf_Verdaux *src;
+gelf_update_verdaux (Elf_Data *data, int offset, GElf_Verdaux *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
/* Update symbol version definition information.
- Copyright (C) 2001, 2002 Red Hat, Inc.
+ Copyright (C) 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2001.
int
-gelf_update_verdef (data, offset, src)
- Elf_Data *data;
- int offset;
- GElf_Verdef *src;
+gelf_update_verdef (Elf_Data *data, int offset, GElf_Verdef *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
/* Update additional required symbol version information.
- Copyright (C) 2001, 2002 Red Hat, Inc.
+ Copyright (C) 2001, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2001.
int
-gelf_update_vernaux (data, offset, src)
- Elf_Data *data;
- int offset;
- GElf_Vernaux *src;
+gelf_update_vernaux (Elf_Data *data, int offset, GElf_Vernaux *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
/* Update required symbol version information.
- Copyright (C) 2001, 2002 Red Hat, Inc.
+ Copyright (C) 2001, 2002, 201r Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2001.
int
-gelf_update_verneed (data, offset, src)
- Elf_Data *data;
- int offset;
- GElf_Verneed *src;
+gelf_update_verneed (Elf_Data *data, int offset, GElf_Verneed *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
/* Update symbol version information.
- Copyright (C) 2001, 2002, 2005, 2009, 2014 Red Hat, Inc.
+ Copyright (C) 2001, 2002, 2005, 2009, 2014, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2001.
int
-gelf_update_versym (data, ndx, src)
- Elf_Data *data;
- int ndx;
- GElf_Versym *src;
+gelf_update_versym (Elf_Data *data, int ndx, GElf_Versym *src)
{
Elf_Data_Scn *data_scn = (Elf_Data_Scn *) data;
/* Convert from memory to file representation. Generic ELF version.
- Copyright (C) 2000, 2002 Red Hat, Inc.
+ Copyright (C) 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
Elf_Data *
-gelf_xlatetof (elf, dest, src, encode)
- Elf *elf;
- Elf_Data *dest;
- const Elf_Data * src;
- unsigned int encode;
+gelf_xlatetof (Elf *elf, Elf_Data *dest, const Elf_Data * src,
+ unsigned int encode)
{
if (elf == NULL)
return NULL;
/* Convert from file to memory representation. Generic ELF version.
- Copyright (C) 2000, 2002 Red Hat, Inc.
+ Copyright (C) 2000, 2002, 2015 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2000.
Elf_Data *
-gelf_xlatetom (elf, dest, src, encode)
- Elf *elf;
- Elf_Data *dest;
- const Elf_Data * src;
- unsigned int encode;
+gelf_xlatetom (Elf *elf, Elf_Data *dest, const Elf_Data * src,
+ unsigned int encode)
{
if (elf == NULL)
return NULL;
+2015-09-22 Mark Wielaard <mjw@redhat.com>
+
+ * strip.c (cleanup_debug): Remove old-style function definitions.
+
2015-09-09 Chih-Hung Hsieh <chh@google.com>
* readelf.c (print_debug_exception_table): Initialize variable before
static char *tmp_debug_fname = NULL;
/* Close debug file descriptor, if opened. And remove temporary debug file. */
-static void cleanup_debug ();
+static void cleanup_debug (void);
#define INTERNAL_ERROR(fname) \
do { \
}
static void
-cleanup_debug ()
+cleanup_debug (void)
{
if (debug_fd >= 0)
{