summaryrefslogtreecommitdiff
path: root/libdwfl
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2007-08-13 22:58:36 +0000
committerRoland McGrath <roland@redhat.com>2007-08-13 22:58:36 +0000
commit099dd52727f2ce1a2c73cde82af8cd5e06368aec (patch)
tree65df96e401bdf9cc978a9ff655dd9819b9ac1f8b /libdwfl
parentd82217264c4ac9108dbda1502a545ea25f6d22fe (diff)
downloadelfutils-099dd52727f2ce1a2c73cde82af8cd5e06368aec.tar.gz
missed testdata files
Diffstat (limited to 'libdwfl')
-rw-r--r--libdwfl/ChangeLog12
-rw-r--r--libdwfl/dwfl_module_addrsym.c3
-rw-r--r--libdwfl/elf-from-memory.c8
-rw-r--r--libdwfl/linux-kernel-modules.c4
4 files changed, 21 insertions, 6 deletions
diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog
index 38f86a7d..a5177aca 100644
--- a/libdwfl/ChangeLog
+++ b/libdwfl/ChangeLog
@@ -1,3 +1,15 @@
+2007-08-13 Roland McGrath <roland@redhat.com>
+
+ * dwfl_module_addrsym.c: Add dead initializer for stupid compiler.
+
+2007-08-12 Roland McGrath <roland@redhat.com>
+
+ * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Don't use
+ FTS_LOGICAL.
+
+ * elf-from-memory.c (elf_from_remote_memory): Don't reset LOADBASE on
+ a second phdr if it happens to match EHDR_VMA exactly.
+
2007-08-08 Roland McGrath <roland@redhat.com>
* dwfl_module_addrsym.c: Don't use STT_SECTION, STT_FILE symbols and
diff --git a/libdwfl/dwfl_module_addrsym.c b/libdwfl/dwfl_module_addrsym.c
index 63eca774..52dbb3d8 100644
--- a/libdwfl/dwfl_module_addrsym.c
+++ b/libdwfl/dwfl_module_addrsym.c
@@ -104,9 +104,8 @@ dwfl_module_addrsym (Dwfl_Module *mod, GElf_Addr addr,
/* Keep track of an eligible symbol with st_size == 0 as a fallback. */
const char *sizeless_name = NULL;
- GElf_Sym sizeless_sym;
+ GElf_Sym sizeless_sym = { 0, 0, 0, 0, 0, SHN_UNDEF };
GElf_Word sizeless_shndx = SHN_UNDEF;
- sizeless_sym.st_value = 0;
/* Keep track of the lowest address a relevant sizeless symbol could have. */
GElf_Addr min_label = addr;
diff --git a/libdwfl/elf-from-memory.c b/libdwfl/elf-from-memory.c
index a292210a..c0e7c46d 100644
--- a/libdwfl/elf-from-memory.c
+++ b/libdwfl/elf-from-memory.c
@@ -213,6 +213,7 @@ elf_from_remote_memory (GElf_Addr ehdr_vma,
size_t contents_size = 0;
GElf_Off segments_end = 0;
GElf_Addr loadbase = ehdr_vma;
+ bool found_base = false;
switch (ehdr.e32.e_ident[EI_CLASS])
{
inline void handle_segment (GElf_Addr vaddr, GElf_Off offset,
@@ -223,8 +224,11 @@ elf_from_remote_memory (GElf_Addr ehdr_vma,
if (segment_end > (GElf_Off) contents_size)
contents_size = segment_end;
- if ((offset & -align) == 0 && loadbase == ehdr_vma)
- loadbase = ehdr_vma - (vaddr & -align);
+ if (!found_base && (offset & -align) == 0)
+ {
+ loadbase = ehdr_vma - (vaddr & -align);
+ found_base = true;
+ }
segments_end = offset + filesz;
}
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
index 98957521..26f185f3 100644
--- a/libdwfl/linux-kernel-modules.c
+++ b/libdwfl/linux-kernel-modules.c
@@ -215,7 +215,7 @@ dwfl_linux_kernel_report_offline (Dwfl *dwfl, const char *release,
return errno;
}
- FTS *fts = fts_open (modulesdir, FTS_LOGICAL | FTS_NOSTAT, NULL);
+ FTS *fts = fts_open (modulesdir, FTS_NOSTAT, NULL);
if (modulesdir[0] == (char *) release)
modulesdir[0] = NULL;
if (fts == NULL)
@@ -403,7 +403,7 @@ dwfl_linux_kernel_find_elf (Dwfl_Module *mod __attribute__ ((unused)),
if (asprintf (&modulesdir[0], MODULEDIRFMT, release) < 0)
return -1;
- FTS *fts = fts_open (modulesdir, FTS_LOGICAL | FTS_NOSTAT, NULL);
+ FTS *fts = fts_open (modulesdir, FTS_NOSTAT, NULL);
if (fts == NULL)
{
free (modulesdir[0]);