summaryrefslogtreecommitdiffstats
path: root/libdw/memory-access.h
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2013-01-07 14:53:37 -0800
committerRoland McGrath <[email protected]>2013-01-07 15:10:33 -0800
commit3999ce14663c26bcddc2cf4d4bb9b61c7ad29ac3 (patch)
tree4ca9b9035ce9463b9d74800ece5099c5e647bb72 /libdw/memory-access.h
parent6722a667bbeb003258b35e0ee773fef9abcbdef0 (diff)
dwfl_link_map_report: Handle unaligned auxv data.
Signed-off-by: Roland McGrath <[email protected]>
Diffstat (limited to 'libdw/memory-access.h')
-rw-r--r--libdw/memory-access.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libdw/memory-access.h b/libdw/memory-access.h
index 5773e5c9..16471990 100644
--- a/libdw/memory-access.h
+++ b/libdw/memory-access.h
@@ -1,5 +1,5 @@
/* Unaligned memory access functionality.
- Copyright (C) 2000-2010 Red Hat, Inc.
+ Copyright (C) 2000-2013 Red Hat, Inc.
This file is part of elfutils.
Written by Ulrich Drepper <[email protected]>, 2001.
@@ -147,6 +147,8 @@ __libdw_get_sleb128 (int64_t acc, unsigned int i, const unsigned char **addrp)
? (int32_t) bswap_32 (*((const int32_t *) (Addr))) \
: *((const int32_t *) (Addr)))
+# define read_8ubyte_unaligned_noncvt(Addr) \
+ *((const uint64_t *) (Addr))
# define read_8ubyte_unaligned(Dbg, Addr) \
(unlikely ((Dbg)->other_byte_order) \
? bswap_64 (*((const uint64_t *) (Addr))) \
@@ -223,6 +225,12 @@ read_4sbyte_unaligned_1 (bool other_byte_order, const void *p)
}
static inline uint64_t
+read_8ubyte_unaligned_noncvt (const void *p)
+{
+ const union unaligned *up = p;
+ return up->u8;
+}
+static inline uint64_t
read_8ubyte_unaligned_1 (bool other_byte_order, const void *p)
{
const union unaligned *up = p;