/* Internal definitions for libdwarf.
- Copyright (C) 2002-2010 Red Hat, Inc.
+ Copyright (C) 2002-2011 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <drepper@redhat.com>, 2002.
};
+__BEGIN_DECLS
+
/* We have to include the file at this point because the inline
functions access internals of the Dwarf structure. */
#include "memory-access.h"
extern int __dwarf_errno_internal (void);
-#ifndef __cplusplus
/* Reader hooks. */
/* Relocation hooks return -1 on error (in that case the error code
Elf_Data *data = __libdw_checked_get_data (dbg, sec_index);
if (data == NULL)
return false;
- if (unlikely (addr < data->d_buf)
- || unlikely (data->d_size - (addr - data->d_buf) < size))
+ if (unlikely ((const char *) addr < (const char *) data->d_buf)
+ || unlikely (data->d_size - ((const char *) addr
+ - (const char *) data->d_buf)
+ < size))
{
__libdw_seterrno (DWARF_E_INVALID_OFFSET);
return false;
Dwarf_Addr *basep)
internal_function;
-unsigned char * __libdw_formptr (Dwarf_Attribute *attr, int sec_index,
- int err_nodata, unsigned char **endpp,
- Dwarf_Off *offsetp)
+unsigned char *__libdw_formptr (Dwarf_Attribute *attr, int sec_index,
+ int err_nodata, unsigned char **endpp,
+ Dwarf_Off *offsetp)
internal_function;
-#endif /* Not C++ */
static inline size_t
cu_sec_idx (struct Dwarf_CU *cu)
}
+__END_DECLS
+
+
/* Aliases to avoid PLTs. */
INTDECL (dwarf_aggregate_size)
INTDECL (dwarf_attr)