summaryrefslogtreecommitdiffstats
path: root/libdw/libdwP.h
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2006-10-10 00:25:21 +0000
committerRoland McGrath <[email protected]>2006-10-10 00:25:21 +0000
commitc373d850ec9ca342f4c71d5e287c8d8bf0723cd6 (patch)
treec8f9ea814866cdfb30ac9506ccddbc8629ebe345 /libdw/libdwP.h
parent1dee360aa30fecd20f403f98fd1cb9e543afcca7 (diff)
2006-10-09 Roland McGrath <[email protected]>
* ia64_symbol.c (ia64_reloc_simple_type): Treat SECREL types as simple.
Diffstat (limited to 'libdw/libdwP.h')
-rw-r--r--libdw/libdwP.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/libdw/libdwP.h b/libdw/libdwP.h
index d4ee3036..09599e6d 100644
--- a/libdw/libdwP.h
+++ b/libdw/libdwP.h
@@ -1,5 +1,5 @@
/* Internal definitions for libdwarf.
- Copyright (C) 2002, 2003, 2004, 2005 Red Hat, Inc.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <[email protected]>, 2002.
@@ -315,7 +315,7 @@ extern void __libdw_seterrno (int value) internal_function;
/* Memory handling, the easy parts. This macro does not do any locking. */
-#define libdw_alloc(dbg, type, tsize, cnt) \
+#define libdw_alloc(dbg, type, tsize, cnt) \
({ struct libdw_memblock *_tail = (dbg)->mem_tail; \
size_t _required = (tsize) * (cnt); \
type *_result = (type *) (_tail->mem + (_tail->size - _tail->remaining));\
@@ -323,23 +323,20 @@ extern void __libdw_seterrno (int value) internal_function;
- ((uintptr_t) _result & (__alignof (type) - 1))) \
& (__alignof (type) - 1)); \
if (unlikely (_tail->remaining < _required + _padding)) \
- { \
- _result = (type *) __libdw_allocate (dbg, _required); \
- _tail = (dbg)->mem_tail; \
- } \
+ _result = (type *) __libdw_allocate (dbg, _required, __alignof (type));\
else \
{ \
_required += _padding; \
_result = (type *) ((char *) _result + _padding); \
+ _tail->remaining -= _required; \
} \
- _tail->remaining -= _required; \
_result; })
#define libdw_typed_alloc(dbg, type) \
libdw_alloc (dbg, type, sizeof (type), 1)
/* Callback to allocate more. */
-extern void *__libdw_allocate (Dwarf *dbg, size_t minsize)
+extern void *__libdw_allocate (Dwarf *dbg, size_t minsize, size_t align)
__attribute__ ((__malloc__)) __nonnull_attribute__ (1);
/* Default OOM handler. */