diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-05-30 14:37:38 +0200 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2013-11-07 21:39:00 +0100 |
commit | 0b867460075c9f02cb305abc91a0e12b90017583 (patch) | |
tree | 28f799db9b0eef70d0b4b5e81163b2fc62903470 /libdwfl/segment.c | |
parent | 22f867adcc1258aeb88560fa8591ef071353bb22 (diff) | |
download | elfutils-0b867460075c9f02cb305abc91a0e12b90017583.tar.gz |
Unwinder for x86*.
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'libdwfl/segment.c')
-rw-r--r-- | libdwfl/segment.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/libdwfl/segment.c b/libdwfl/segment.c index 496b4fdc..92769174 100644 --- a/libdwfl/segment.c +++ b/libdwfl/segment.c @@ -1,5 +1,5 @@ /* Manage address space lookup table for libdwfl. - Copyright (C) 2008, 2009, 2010 Red Hat, Inc. + Copyright (C) 2008, 2009, 2010, 2013 Red Hat, Inc. This file is part of elfutils. This file is free software; you can redistribute it and/or modify @@ -28,16 +28,18 @@ #include "libdwflP.h" -static GElf_Addr -segment_start (Dwfl *dwfl, GElf_Addr start) +GElf_Addr +internal_function +__libdwfl_segment_start (Dwfl *dwfl, GElf_Addr start) { if (dwfl->segment_align > 1) start &= -dwfl->segment_align; return start; } -static GElf_Addr -segment_end (Dwfl *dwfl, GElf_Addr end) +GElf_Addr +internal_function +__libdwfl_segment_end (Dwfl *dwfl, GElf_Addr end) { if (dwfl->segment_align > 1) end = (end + dwfl->segment_align - 1) & -dwfl->segment_align; @@ -156,8 +158,8 @@ reify_segments (Dwfl *dwfl) for (Dwfl_Module *mod = dwfl->modulelist; mod != NULL; mod = mod->next) if (! mod->gc) { - const GElf_Addr start = segment_start (dwfl, mod->low_addr); - const GElf_Addr end = segment_end (dwfl, mod->high_addr); + const GElf_Addr start = __libdwfl_segment_start (dwfl, mod->low_addr); + const GElf_Addr end = __libdwfl_segment_end (dwfl, mod->high_addr); bool resized = false; int idx = lookup (dwfl, start, hint); @@ -296,8 +298,9 @@ dwfl_report_segment (Dwfl *dwfl, int ndx, const GElf_Phdr *phdr, GElf_Addr bias, dwfl->lookup_module = NULL; } - GElf_Addr start = segment_start (dwfl, bias + phdr->p_vaddr); - GElf_Addr end = segment_end (dwfl, bias + phdr->p_vaddr + phdr->p_memsz); + GElf_Addr start = __libdwfl_segment_start (dwfl, bias + phdr->p_vaddr); + GElf_Addr end = __libdwfl_segment_end (dwfl, + bias + phdr->p_vaddr + phdr->p_memsz); /* Coalesce into the last one if contiguous and matching. */ if (ndx != dwfl->lookup_tail_ndx |