1 2012-08-01 Petr Machata <pmachata@redhat.com>
3 * offline.c (process_archive_member): Ignore entry "/SYM64/".
5 2012-03-28 Roland McGrath <roland@hack.frob.com>
7 * dwfl_segment_report_module.c
8 (dwfl_segment_report_module: read_portion): Don't use existing buffer
9 when FILESZ is zero (string mode) and available portion doesn't hold
12 2011-12-02 Roland McGrath <roland@hack.frob.com>
14 * elf-from-memory.c (elf_from_remote_memory): Fix ELFCLASS64 case
15 to use elf64_xlatetom and PHDRS.p64.
16 Reported by Serge Pavlov <serge.pavlov.at.gnu@gmail.com>.
18 2011-11-31 Mark Wielaard <mjw@redhat.com>
20 * dwfl_module_addrsym.c (dwfl_module_addrsym): First search all
21 global symbols. Then only when that doesn't provide a match search
22 all local symbols too.
23 * dwfl_module_getdwarf.c (load_symtab): Take first_global int arg
25 (find_symtab): Initialize mod->first_global and pass it to load_symtab.
26 * libdwfl/libdwflP.h (Dwfl_Module): Add first_global field.
28 2011-11-31 Mark Wielaard <mjw@redhat.com>
30 * dwfl_module_addrsym.c (dwfl_module_addrsym): Only update
31 sizeless_sym if needed and closer to desired addr.
33 2011-10-20 Mark Wielaard <mjw@redhat.com>
35 * derelocate.c (cache_sections): Intern mod->reloc_info check.
36 (dwfl_module_relocations): Don't check mod->reloc_info.
37 (dwfl_module_relocation_info): Likewise.
38 (find_section): Likewise.
40 2011-07-09 Roland McGrath <roland@hack.frob.com>
42 * image-header.c (LE32): Macro removed (now in lib/system.h).
44 2011-04-11 Mark Wielaard <mjw@redhat.com>
46 * linux-kernel-modules.c (vmlinux_suffixes): Guard definition
47 by check for zlib, bzlib or lzma defines to check it isn't empty.
48 (try_kernel_name): Use same guard for use of vmlinux_suffixes.
50 2011-03-08 Roland McGrath <roland@redhat.com>
52 * dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL.
53 Reported by Kurt Roeckx <kurt@roeckx.be>.
55 2011-02-11 Roland McGrath <roland@redhat.com>
57 * linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz
58 suffixes if corresponding decompression support is enabled.
60 2011-02-01 Roland McGrath <roland@redhat.com>
62 * dwfl_module_getdwarf.c (find_prelink_address_sync): Use the
63 section-end address as the synchronization point, rather than sh_addr.
65 * dwfl_module_getdwarf.c (find_prelink_address_sync): Discover
66 PT_INTERP p_vaddr separately from main phdrs and undo phdrs.
68 * dwfl_module_getdwarf.c (find_prelink_address_sync): Fix pasto in
69 last change, so we recognize PT_INTERP in ELFCLASS64 correctly.
71 2011-01-11 Roland McGrath <roland@redhat.com>
73 * dwfl_module_getdwarf.c (open_elf): Remove section-based
74 address_sync fixup from here.
75 (find_prelink_address_sync): New function.
76 (find_debuginfo): Call it.
77 * libdwflP.h (DWFL_ERRORS): Add BAD_PRELINK error.
79 2011-01-04 Roland McGrath <roland@redhat.com>
81 * dwfl_module_getdwarf.c (open_elf): Enhance address_sync calculation
82 logic to consider section addresses, the better to survive all the
83 possible prelink machinations.
84 * libdwflP.h (struct dwfl_file): Comment change.
86 2010-11-30 Roland McGrath <roland@redhat.com>
88 * derelocate.c (dwfl_module_relocations): Remove over-eager assert.
90 2010-11-12 Roland McGrath <roland@redhat.com>
92 * libdwflP.h (struct Dwfl_Module): New member main_bias.
93 (dwfl_adjusted_address, dwfl_deadjust_address): Use it.
94 * dwfl_module_getdwarf.c (__libdwfl_getelf): Initialize it.
96 * libdwflP.h (dwfl_deadjust_address): New function.
97 (dwfl_deadjust_dwarf_addr, dwfl_deadjust_st_value): New functions.
98 * cu.c (addrarange): Use dwfl_deadjust_dwarf_addr.
99 * dwfl_module_addrsym.c: Use dwfl_deadjust_st_value.
101 2010-11-11 Roland McGrath <roland@redhat.com>
103 * libdwflP.h (struct dwfl_file): Remove bias member.
104 Add vaddr and address_sync members instead.
105 (dwfl_adjusted_address): Calculate using vaddr.
106 (dwfl_adjusted_dwarf_addr): Calculate using address_sync and call that.
107 (dwfl_adjusted_st_value): Use one of those calls.
108 * dwfl_module_getdwarf.c (open_elf): Initialize vaddr and address_sync.
109 * dwfl_segment_report_module.c (dwfl_segment_report_module): Likewise.
110 * derelocate.c (dwfl_module_relocations): Update ET_EXEC assertions.
111 * link_map.c (consider_executable): Adjust only MOD->low_addr for
112 detected PIE bias change.
114 * libdwflP.h (dwfl_adjusted_dwarf_addr): New function.
115 * dwfl_module_info.c: Use it.
116 * cu.c (addrarange): Likewise.
117 * dwfl_dwarf_line.c: Likewise.
118 * dwfl_module_dwarf_cfi.c: Likewise.
119 * dwfl_lineinfo.c: Likewise.
120 * dwfl_nextcu.c: Likewise.
121 * dwfl_module_getdwarf.c (dwfl_module_getdwarf): Likewise.
123 * libdwflP.h (dwfl_adjusted_st_value): New function.
124 * relocate.c (resolve_symbol): Use it.
125 * dwfl_module_getsym.c: Likewise.
126 * dwfl_module_addrsym.c: Likewise.
127 * dwfl_module_info.c: Likewise.
129 * libdwflP.h (dwfl_adjusted_address): New function.
130 * dwfl_module_build_id.c (__libdwfl_find_build_id): Use it.
131 * relocate.c (__libdwfl_relocate_value): Likewise.
132 * derelocate.c (cache_sections): Likewise.
133 (dwfl_module_address_section): Likewise.
134 * dwfl_module_getelf.c: Likewise.
135 * dwfl_module_eh_cfi.c: Likewise.
136 * link_map.c (consider_executable): Likewise.
138 2010-08-24 Roland McGrath <roland@redhat.com>
140 * dwfl_dwarf_line.c: New file.
141 * Makefile.am (libdwfl_a_SOURCES): Add it.
143 2010-08-18 Roland McGrath <roland@redhat.com>
145 * link_map.c (report_r_debug): Use found name if we have no name,
146 even if we already have an Elf handle.
148 2010-06-30 Roland McGrath <roland@redhat.com>
150 * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't be
151 confused by -1 return from dwfl_build_id_find_elf after it opened
153 * find-debuginfo.c (dwfl_standard_find_debuginfo): Likewise for
154 dwfl_build_id_find_debuginfo.
156 2010-06-16 Roland McGrath <roland@redhat.com>
158 * cu.c (cudie_offset): Use DIE_OFFSET_FROM_CU_OFFSET macro.
160 2010-06-14 Roland McGrath <roland@redhat.com>
162 * find-debuginfo.c (try_open): Take new arg MAIN_STAT. Compare
163 candidate file to that st_dev/st_ino and pretend it didn't exist
165 (find_debuginfo_in_path): Update caller, pass main file's info.
167 2010-05-20 Roland McGrath <roland@redhat.com>
169 * linux-proc-maps.c (find_sysinfo_ehdr): Renamed to ...
170 (grovel_auxv): ... this. Take DWFL argument.
171 (dwfl_linux_proc_report): Update caller.
173 * dwfl_module_getdwarf.c (open_elf): Calculate alignment for bias
174 based on dwfl->segment_align or manifest alignment of MOD->low_addr.
176 2010-05-19 Roland McGrath <roland@redhat.com>
178 * linux-kernel-modules.c (intuit_kernel_bounds): Rewritten.
180 2010-05-06 Roland McGrath <roland@redhat.com>
182 * segment.c (insert): Clear inserted elements of DWFL->lookup_module.
184 * libdwflP.h (DWFL_ERRORS): Add WRONG_ID_ELF.
185 * dwfl_build_id_find_elf.c: Set MOD->main.valid when there is a build
186 ID but we didn't find a file.
187 * dwfl_module_getdwarf.c (__libdwfl_getelf): When that's set, check
188 and refuse any fallback file-by-name if it lacks the matching ID.
190 * dwfl_error.c (dwfl_errno): Add INTDEF.
191 * libdwflP.h: Add INTDECL.
193 * dwfl_module_getdwarf.c (open_elf): Do elf_end and clear FILE->elf in
196 2010-05-04 Roland McGrath <roland@redhat.com>
198 * dwfl_segment_report_module.c: Use "[pie]" rather than "[dso]" for an
199 ET_DYN that has a DT_DEBUG.
201 * dwfl_segment_report_module.c: Fix jump-start of NDX-finding loop.
203 * segment.c (insert): Fix moving of values following insertion.
204 (reify_segments): Fix up MOD->segment backpointer indices after
205 later insertions in the main loop invalidate them.
207 * link_map.c (dwfl_link_map_report): Detect bias of embedded phdrs and
208 apply it to PT_DYNAMIC p_vaddr so we handle a PIE correctly.
210 * core-file.c (dwfl_core_file_report): Return any nonzero count of
211 modules reported, even if link_map grovelling failed and only sniffing
214 2010-04-26 Roland McGrath <roland@redhat.com>
216 * relocate.c (relocate_section): Treat R_*_NONE reloc as no reloc.
217 Works around probably-wrong ld -r behavior for case of a DWARF address
218 constant that refers to a discarded SHF_ALLOC section.
220 2010-04-14 Roland McGrath <roland@redhat.com>
222 * link_map.c (report_r_debug): Limit iterations on the l_next chain to
223 an upper bound on sane possible number of elements.
225 2010-03-11 Roland McGrath <roland@redhat.com>
227 * link_map.c (auxv_format_probe): Fix scanning loop, so we really scan
228 the second half for 32-bit matches.
230 2010-03-10 Roland McGrath <roland@redhat.com>
232 * core-file.c (dwfl_core_file_report): Punt EHDR argument.
233 * argp-std.c (parse_opt): Update caller.
234 * libdwfl.h: Declare dwfl_core_file_report.
237 2010-02-17 Roland McGrath <roland@redhat.com>
239 * dwfl_segment_report_module.c (addr_segndx): Take new flag argument.
240 If set, find the first index not below ADDR.
241 (dwfl_segment_report_module): Update callers.
242 Pass true when calculating return value.
244 2010-02-15 Roland McGrath <roland@redhat.com>
246 * Makefile.am: Use config/eu.am for common stuff.
248 * find-debuginfo.c (find_debuginfo_in_path): Fix uninitialized
249 variable in failure path.
251 2010-02-02 Mark Wielaard <mjw@redhat.com>
253 * dwfl_module_dwarf_cfi.c (dwfl_module_dwarf_cfi): Always set bias.
254 * dwfl_module_eh_cfi.c (dwfl_module_eh_cfi): Likewise
256 2010-01-07 Roland McGrath <roland@redhat.com>
258 * core-file.c (dwfl_core_file_report): Use elf_getphdrnum.
259 * dwfl_module_build_id.c (__libdwfl_find_build_id): Likewise.
260 * dwfl_module_getdwarf.c (open_elf, find_dynsym): Likewise.
261 * dwfl_report_elf.c (__libdwfl_report_elf): Likewise.
263 2010-01-06 Roland McGrath <roland@redhat.com>
265 * relocate.c (relocate_getsym): For SHN_COMMON, zero st_value.
266 (relocate_section): Let unresolved SHN_COMMON symbol stay 0.
268 2009-11-16 Roland McGrath <roland@redhat.com>
270 * relocate.c (relocate_section): Skip SHT_NOBITS or empty target scn.
272 2009-11-12 Petr Machata <pmachata@redhat.com>
274 * core-file.c (dwfl_elf_phdr_memory_callback): Only load ahead if
275 the chunk is both offset-contiguous and vaddr-contiguous.
277 2009-11-05 Roland McGrath <roland@redhat.com>
279 * link_map.c (report_r_debug): Skip entries with l_ld==0.
280 Use dwfl_addrmodule for l_ld lookup, don't bail on lookup failure.
282 2009-09-04 Roland McGrath <roland@redhat.com>
284 * image-header.c (__libdw_image_header): Fix tranposed comparison.
286 2009-08-27 Roland McGrath <roland@redhat.com>
288 * image-header.c: New file.
289 * Makefile.am (libdwfl_a_SOURCES): Add it.
290 * libdwflP.h: Declare __libdw_image_header.
291 * open.c (decompress): Don't consume ELF on failure.
292 (what_kind): New function, broken out of ...
293 (__libdw_open_file): ... here. Call it.
294 If it fails, try __libdw_image_header and then try what_kind again.
296 * gzip.c (unzip): Reuse *WHOLE as first INPUT_BUFFER,
297 leave it behind for next decompressor.
298 * open.c (decompress): Free BUFFER on failure.
300 2009-08-26 Roland McGrath <roland@redhat.com>
302 * gzip.c (find_zImage_payload): New function, broken out of ...
303 (mapped_zImage): ... here. Call it.
304 (find_zImage_payload) [LZMA]: Match LZMA-compressed kernels with
305 stupid method of just trying the decoder.
307 * open.c [USE_LZMA]: Try __libdw_unlzma.
308 * libdwflP.h: Declare it.
309 (DWFL_ERRORS): Add DWFL_E_LZMA.
310 * gzip.c [LZMA]: Implement liblzma version for XZ file format.
312 * Makefile.am [LZMA] (libdwfl_a_SOURCES): Add it.
314 * gzip.c (mapped_zImage): Limit scan to 32kb.
315 Make this unconditional, support bzip2 kernel images too.
316 (unzip): Use direct inflate method for non-mmap case too.
317 Only zlib uses the stream method.
319 2009-08-09 Roland McGrath <roland@redhat.com>
321 * dwfl_module_build_id.c: Use new macros for versioned definitions.
323 2009-07-08 Roland McGrath <roland@redhat.com>
325 * dwfl_module_dwarf_cfi.c: New file.
326 * dwfl_module_eh_cfi.c: New file.
327 * Makefile.am (libdwfl_a_SOURCES): Add them.
328 * libdwflP.h (struct Dwfl_Module): New members `dwarf_cfi', `eh_cfi.
329 Add INTDECL for dwfl_module_eh_cfi, dwfl_module_dwarf_cfi.
331 2009-07-08 Roland McGrath <roland@redhat.com>
333 * libdwflP.h (struct Dwfl_Module): Reorder members to pack better.
335 2009-06-18 Mark Wielaard <mjw@redhat.com>
337 * dwfl_report_elf.c (__libdwfl_report_elf): Return NULL on overlap.
339 2009-06-13 Ulrich Drepper <drepper@redhat.com>
341 * derelocate.c: Don't use deprecated libelf functions.
342 * dwfl_module_getdwarf.c: Likewise.
343 * relocate.c: Likewise.
345 2009-04-23 Ulrich Drepper <drepper@redhat.com>
347 * dwfl_module_build_id.c: Define versioned symbols only if SHARED is
348 defined. Otherwise just define the latest version.
350 2009-04-22 Roland McGrath <roland@redhat.com>
352 * relocate.c (resolve_symbol): Apply correct bias to st_value found in
355 * dwfl_module_build_id.c (__libdwfl_find_build_id): Fix last change to
356 adjust properly for non-ET_REL.
358 2009-04-21 Roland McGrath <roland@redhat.com>
360 * dwfl_module_getsym.c: Apply non-ET_REL bias only if SHF_ALLOC.
362 * relocate.c (__libdwfl_relocate_value): Assert that MOD is ET_REL.
363 * derelocate.c (cache_sections): Call __libdwfl_relocate_value only
365 * dwfl_module_build_id.c (__libdwfl_find_build_id): Likewise.
367 2009-04-20 Roland McGrath <roland@redhat.com>
369 * dwfl_module_getdwarf.c (__libdwfl_getelf): Add internal_function.
371 2009-04-19 Roland McGrath <roland@redhat.com>
373 * dwfl_module_getdwarf.c (find_file): Renamed to ...
374 (__libdwfl_getelf): ... this. Make it global.
375 (find_symtab, find_dw): Update callers.
376 (dwfl_module_getelf): Functions moved ...
377 * dwfl_module_getelf.c: ... here, new file.
378 * Makefile.am (libdwfl_a_SOURCES): Add it.
379 * libdwflP.h: Declare __libdwfl_getelf.
381 2009-04-14 Roland McGrath <roland@redhat.com>
383 * dwfl_segment_report_module.c: Handle DT_STRTAB value being either
384 absolute (already adjusted in place) or needing load bias adjustment.
386 * core-file.c (dwfl_elf_phdr_memory_callback): Fix return value for
387 gelf_getphdr failure. Fix file size limit checks.
389 * dwfl_segment_report_module.c: Fix underflow in DYNSTRSZ check.
391 2009-04-08 Roland McGrath <roland@redhat.com>
393 * dwfl_module_getsym.c: Don't adjust for bias again after
394 __libdwfl_relocate_value.
396 * relocate.c (__libdwfl_relocate_value): Don't adjust a value from
397 a non-SHF_ALLOC section.
398 (relocate_getsym): Test st_shndx for SHN_* values, not *SHNDX.
399 * dwfl_module_getsym.c (dwfl_module_getsym): Likewise.
401 2009-03-09 Roland McGrath <roland@redhat.com>
403 * dwfl_module_build_id.c (__libdwfl_find_build_id): Move SHSTRNDX
404 variable to outer scope, so we cache it for the loop.
406 * relocate.c (__libdwfl_relocate_value): Add MOD->main.bias to sh_addr.
408 2009-02-12 Roland McGrath <roland@redhat.com>
410 * dwfl_module_build_id.c (__libdwfl_find_build_id): Use
411 __libdwfl_relocate_value to find correct sh_addr value.
413 2009-02-10 Roland McGrath <roland@redhat.com>
415 * dwfl_report_elf.c (__libdwfl_report_elf): Take new arg SANITY.
416 If false, don't fail for NO_PHDR.
417 (dwfl_report_elf): Update caller.
418 * libdwflP.h: Update decl.
419 * offline.c (process_elf): Call it with false, so we don't refuse
420 dubiously-formed objects here.
422 * link_map.c (consider_executable): Don't assert dwfl_addrsegment
423 finds our module. We shouldn't crash when we confuse some guesses.
425 2009-02-10 Ulrich Drepper <drepper@redhat.com>
427 * open.c (decompress): Avoid crash with empty input file.
429 2009-01-27 Roland McGrath <roland@redhat.com>
431 * dwfl_report_elf.c (__libdwfl_report_elf): Ignore trailing PT_LOAD
432 with zero vaddr and memsz.
434 2009-01-22 Roland McGrath <roland@redhat.com>
436 * open.c (decompress): Move BUFFER, SIZE decls outside #if.
438 * dwfl_segment_report_module.c (addr_segndx): Remove bogus adjustments
439 after address-matching loop.
441 * segment.c (lookup): Fix fencepost in checking for HINT match.
443 2009-01-14 Roland McGrath <roland@redhat.com>
445 * gzip.c [!BZLIB] (mapped_zImage): New function.
446 (unzip) [!BZLIB]: Grok Linux kernel zImage format.
448 2009-01-10 Ulrich Drepper <drepper@redhat.com>
450 * dwfl_error.c: Always use __thread. Remove all !USE_TLS code.
452 2009-01-08 Roland McGrath <roland@redhat.com>
454 * linux-kernel-modules.c (dwfl_linux_kernel_report_offline):
455 Skip subdirectory named "source".
456 (dwfl_linux_kernel_find_elf): Likewise.
458 2009-01-06 Roland McGrath <roland@redhat.com>
460 * linux-kernel-modules.c (check_suffix): New function.
461 Match ".ko", ".ko.gz", and ".ko.bz2" suffixes.
462 (dwfl_linux_kernel_report_offline): Use it.
463 (dwfl_linux_kernel_find_elf): Likewise.
465 2009-01-05 Roland McGrath <roland@redhat.com>
467 * argp-std.c (parse_opt): Use __libdw_open_file for core file.
468 * dwfl_build_id_find_debuginfo.c: Use it to open the file.
469 * dwfl_build_id_find_elf.c: Likewise.
470 * dwfl_module_getdwarf.c (open_elf): Likewise.
471 * dwfl_report_elf.c: Likewise.
472 * find-debuginfo.c (validate): Likewise.
473 * offline.c (__libdwfl_report_offline): Likewise.
475 * libdwflP.h: Declare __libdw_open_file.
477 * Makefile.am (libdwfl_a_SOURCES): Add it.
480 * Makefile.am [ZLIB] (libdwfl_a_SOURCES): Add it.
482 * Makefile.am [BZLIB] (libdwfl_a_SOURCES): Add it.
483 * libdwflP.h: Declare __libdw_gunzip, __libdw_bunzip2.
485 2008-12-16 Roland McGrath <roland@redhat.com>
487 * dwfl_module_build_id.c (dwfl_module_build_id): Define with alias and
488 symver magic to bind to ELFUTILS_0.138.
489 (_BUG_COMPAT_dwfl_module_build_id): New function, bug compatible
490 wrapper for ELFUTILS_0.130 version set.
492 2008-12-18 Roland McGrath <roland@redhat.com>
494 * derelocate.c (dwfl_module_relocate_address): Fix last fix: ET_DYN
495 addresses are taken as relative to MOD->low_addr.
497 2008-12-15 Roland McGrath <roland@redhat.com>
499 * derelocate.c (dwfl_module_relocate_address): Apply main.bias, not
502 2008-12-11 Roland McGrath <roland@redhat.com>
504 * offline.c (process_archive): Don't call elf_end and close if
505 returning NULL. Check first elf_begin call and set error code
506 specially for empty archive.
509 2008-12-02 Roland McGrath <roland@redhat.com>
511 * dwfl_getmodules.c (dwfl_getmodules): Typo fix in last change.
513 2008-11-26 Roland McGrath <roland@redhat.com>
515 * dwfl_getmodules.c (dwfl_getmodules): Encode iteration style in
516 return value, and interpret encoded OFFSET argument.
518 2008-10-07 Roland McGrath <roland@redhat.com>
520 * dwfl_module_build_id.c (check_notes): Fix typo in vaddr calculation.
522 2008-09-29 Roland McGrath <roland@redhat.com>
524 * segment.c (insert): Must realloc DWFL->lookup_module here too.
525 (dwfl_report_segment): Clear DWFL->lookup_module before insert calls.
527 2008-08-28 Roland McGrath <roland@redhat.com>
529 * segment.c (reify_segments): Fix last change.
531 2008-08-27 Roland McGrath <roland@redhat.com>
533 * linux-proc-maps.c (read_proc_memory): Return 0 for EINVAL or EPERM
534 failure from pread64.
536 2008-08-26 Roland McGrath <roland@redhat.com>
538 * segment.c (reify_segments): Insert a trailing segment for a module
539 end that is above the highest current segment.
541 2008-08-25 Roland McGrath <roland@redhat.com>
543 * dwfl_module_getdwarf.c (open_elf): Extract elf_errno () for
544 coded return value, not plain DWFL_E_LIBELF. Return DWFL_E_BADELF
545 if FILE->elf is not ELF_K_ELF.
547 * dwfl_segment_report_module.c: Add a cast.
549 2008-08-21 Denys Vlasenko <dvlasenk@redhat.com>
551 * dwfl_module_addrsym.c (dwfl_module_addrsym): Improve logic
552 which decides which symbol is "closest" to a given address.
554 2008-08-15 Roland McGrath <roland@redhat.com>
556 * argp-std.c (offline_callbacks): Use dwfl_build_id_find_elf.
557 (options, parse_opt): Handle --core.
559 * core-file.c: New file.
560 * Makefile.am (libdwfl_a_SOURCES): Add it.
561 * libdwflP.h (dwfl_core_file_report): Declare it.
563 * link_map.c: New file.
564 * Makefile.am (libdwfl_a_SOURCES): Add it.
565 * libdwflP.h (dwfl_link_map_report): Declare it.
567 * libdwflP.h (MIN, MAX): New macros.
568 (Dwfl_Memory_Callback): New typedef.
569 (Dwfl_Module_Callback): New typedef.
570 (dwfl_segment_report_module): Declare it.
571 * dwfl_segment_report_module.c: New file.
572 * Makefile.am (libdwfl_a_SOURCES): Add it.
574 * derelocate.c (dwfl_module_address_section): Add INTDEF.
575 * libdwflP.h: Add INTDECL.
577 * segment.c: New file.
578 * Makefile.am (libdwfl_a_SOURCES): Add it.
579 * libdwfl.h: Declare dwfl_addrsegment, dwfl_report_segment.
580 * libdwflP.h (struct Dwfl): New members lookup_elts, lookup_alloc,
581 lookup_addr, lookup_module, lookup_segndx, replace removed members
583 (struct Dwfl_Module): New member segment.
584 * dwfl_end.c (dwfl_end): Free the new ones. Iterate via modulelist
586 * dwfl_module.c (dwfl_report_begin_add): Do nothing.
587 (dwfl_report_begin): Don't call it. Truncate the segment table instead.
588 (dwfl_report_module): Don't touch DWFL->nmodules.
589 (dwfl_report_end): Don't touch DWFL->modules and DWFL->nmodules.
590 (compare_modules): Function removed.
591 * dwfl_getmodules.c: Rewritten.
593 * libdwflP.h: Add INTDECLs.
594 * dwfl_getdwarf.c: Rewritten to call dwfl_getmodules.
595 * dwfl_addrmodule.c: Rewritten to just call dwfl_addrsegment.
597 2008-08-03 Roland McGrath <roland@redhat.com>
599 * linux-kernel-modules.c: Include <fts.h> before <config.h>.
601 2008-07-17 Roland McGrath <roland@redhat.com>
603 * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Set errno to
604 zero if the failure was only ENOENT.
606 2008-06-03 Roland McGrath <roland@redhat.com>
608 * dwfl_module_addrsym.c (dwfl_module_addrsym): Exclude undefined
611 2008-05-22 Petr Machata <pmachata@redhat.com>
613 * dwfl_module_getdwarf.c (open_elf): Bias of ET_EXEC files is always 0.
615 2008-05-06 Roland McGrath <roland@frob.com>
617 * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Use
618 FTS_LOGICAL here too.
619 (dwfl_linux_kernel_find_elf): Likewise.
621 2008-04-29 Roland McGrath <roland@redhat.com>
623 * find-debuginfo.c (dwfl_standard_find_debuginfo): Try path search
624 based on canonicalize_file_name if it differs from the supplied name.
626 * linux-kernel-modules.c (check_module_notes): Use FTS_LOGICAL so
629 2008-04-27 Roland McGrath <roland@redhat.com>
631 * linux-kernel-modules.c (report_kernel): Fix crash when
632 dwfl_report_elf fails.
634 2008-04-05 Roland McGrath <roland@redhat.com>
636 * linux-proc-maps.c (proc_maps_report): Don't leak LAST_FILE.
638 * dwfl_module_getdwarf.c (find_file): Always free build_id_bits.
639 Clear it after freeing.
640 * dwfl_module_report_build_id.c (dwfl_module_report_build_id): Likewise.
642 2008-03-26 Roland McGrath <roland@redhat.com>
644 * dwfl_module_getdwarf.c (load_symtab): Don't return success for
645 SHT_DYNSYM, just set *SYMSCN like the comment says.
647 * dwfl_end.c (dwfl_end): Iterate on modulelist chain, not modules array.
649 * argp-std.c (parse_opt): On failure, call dwfl_end before argp_failure.
651 2008-03-19 Roland McGrath <roland@redhat.com>
653 * dwfl_module_getsrc.c: Adjust address for module bias before search.
655 2008-03-01 Roland McGrath <roland@redhat.com>
657 * libdwflP.h (__libdwfl_seterrno): Remove parameter name from
658 prototype to avoid older compiler's complaint about reuse of the name.
659 (__libdwfl_canon_error): Likewise.
661 2008-02-19 Roland McGrath <roland@redhat.com>
663 * relocate.c (relocate_section): Check for an unhandled relocation
664 type before resolving a reloc's symbol. Lift DWFL_E_BADRELTYPE ->
665 DWFL_E_UNKNOWN_MACHINE check out of loops.
667 * dwfl_module_getdwarf.c (load_dw): Skip relocation if
668 DEBUGFILE->relocated is already set.
670 2008-01-26 Roland McGrath <roland@redhat.com>
672 * dwfl_module_getdwarf.c (open_elf): Open FILE->name if it's non-null.
674 * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Don't clear
675 incoming *FILE_NAME at the start.
677 2008-01-08 Roland McGrath <roland@redhat.com>
679 * Makefile.am (euinclude): Variable removed.
680 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
682 2007-10-23 Roland McGrath <roland@redhat.com>
684 * linux-kernel-modules.c (report_kernel_archive): Reorder the kernel
685 module to appear first.
687 2007-10-20 Roland McGrath <roland@redhat.com>
689 * offline.c (process_archive_member): Take FD argument, pass it down
690 to process_file. Return Elf_Cmd, not bool.
691 Call elf_next here, always before elf_end.
692 (process_archive): Update caller. Don't close FD here unless there
695 * dwfl_module.c (free_file): Close fd only when elf_end returns zero.
697 * libdwflP.h (struct dwfl_file): New bool member `relocated'.
698 * dwfl_module_getdwarf.c (dwfl_module_getelf): For ET_REL, apply
699 partial relocation to one or both files.
700 (dwfl_module_getdwarf): For ET_REL, make sure extra sections'
701 relocations have been applied to the debug file if dwfl_module_getelf
702 has been used before.
704 * relocate.c (resolve_symbol): New function.
705 (relocate_section): Call it.
707 * relocate.c (relocate_getsym): Handle null MOD->symfile.
708 (relocate_section): Take new bool arg, PARTIAL. If true,
709 no error for BADRELTYPE/RELUNDEF, instead just skip them
710 and leave only those skipped relocs behind the reloc section.
711 (__libdwfl_relocate_section): Take new arg, pass it down.
712 (__libdwfl_relocate): Take new bool arg, DEBUG. If false,
713 do partial relocation on all sections.
714 * dwfl_module_getdwarf.c (load_dw): Update caller.
715 * libdwflP.h: Update decls.
716 * derelocate.c (dwfl_module_address_section): Pass new argument
717 to __libdwfl_relocate_section, true.
719 * derelocate.c (cache_sections): Don't cache reloc sections when
720 section_address callback is null.
722 2007-10-19 Roland McGrath <roland@redhat.com>
724 * relocate.c (relocate_section): Fix fencepost error in r_offset check.
726 * derelocate.c (struct dwfl_relocation): Add member `relocs'.
727 (struct secref): Likewise.
728 (cache_sections): Cache the relocation section referring to each
729 section we cache, if any.
730 (dwfl_module_address_section): Use __libdwfl_relocate_section as
733 * relocate.c (struct reloc_symtab_cache): New type.
734 (relocate_getsym): Use it instead of four arguments.
735 (__libdwfl_relocate): Update caller.
736 (relocate_section): New function, broken out of ...
737 (__libdwfl_relocate): ... here.
738 (__libdwfl_relocate_section): New function.
739 * libdwflP.h: Declare it.
741 2007-10-17 Roland McGrath <roland@redhat.com>
743 * dwfl_module_getsym.c (dwfl_module_getsym): Apply MOD->symfile->bias
744 to relocated st_value.
746 * dwfl_report_elf.c (__libdwfl_report_elf): Align initial BASE for
749 2007-10-16 Roland McGrath <roland@redhat.com>
751 * dwfl_report_elf.c (__libdwfl_report_elf): Readjust BASE when a later
752 section has larger alignment requirements not met by the original BASE,
753 rather than padding more between sections.
755 * dwfl_report_elf.c (__libdwfl_report_elf): Fix bias calculation.
757 * dwfl_module_build_id.c (__libdwfl_find_build_id): Apply module bias
760 * dwfl_report_elf.c (__libdwfl_report_elf): Don't be confused by BASE
761 at zero in ET_REL case. Adjust BASE to necessary alignment.
763 * dwfl_module_build_id.c (check_notes): Take -1, not 0, as stub value
765 (__libdwfl_find_build_id): Update caller.
767 * relocate.c (__libdwfl_relocate_value): Don't use sh_offset.
768 * dwfl_report_elf.c (__libdwfl_report_elf): Likewise.
769 * offline.c (dwfl_offline_section_address): Bail early if there is
772 * relocate.c (__libdwfl_relocate): Don't return DWFL_E_NO_DWARF.
774 2007-10-09 Roland McGrath <roland@redhat.com>
776 * dwfl_report_elf.c (__libdwfl_report_elf): Clear SHDR->sh_offset when
777 caching SHDR->sh_addr = 0.
778 * offline.c (dwfl_offline_section_address): Never called for sh_addr
779 really at 0, don't check for it. Use MOD->debug directly, not symfile.
781 * dwfl_module_getdwarf.c (load_symtab): Return success properly when
782 we've found SHT_SYMTAB.
784 * relocate.c (relocate_getsym): New function.
785 (__libdwfl_relocate): Use it.
786 (__libdwfl_relocate_value): Take new Elf * argument. Make SYMSHSTRNDX
787 be a pointer instead of value; cache getshstrndx result there.
788 * libdwflP.h: Update decl.
789 * derelocate.c (cache_sections): Update caller.
790 Always work on the main file, not the symfile.
791 (dwfl_module_address_section): Likewise.
792 * dwfl_module_getsym.c (dwfl_module_getsym): Update caller.
794 2007-10-07 Roland McGrath <roland@redhat.com>
796 * offline.c (process_archive): Initialize MOD.
798 * linux-kernel-modules.c (get_release): New function, broken out of ...
799 (report_kernel): ... here. Call it.
800 (try_kernel_name): Take new arg TRY_DEBUG, only try ".debug" if set.
801 (find_kernel_elf): Update caller.
802 (report_kernel_archive): New function.
803 (dwfl_linux_kernel_report_offline): Call it.
805 * offline.c (process_file): Take new arg PREDICATE, pass it down.
806 (process_archive): Likewise.
807 (process_archive_member): Likewise. When nonnull, let the predicate
808 decide whether to use this member.
809 (__libdwfl_report_offline): New function, broken out of ...
810 (dwfl_report_offline): ... here. Call it.
811 * libdwflP.h: Declare it.
813 * offline.c (process_archive, process_archive_member): New functions.
814 (process_elf, process_file): New functions, broken out of ...
815 (dwfl_report_offline): ... here. Call process_file, which recurses on
818 * dwfl_report_elf.c (__libdwfl_report_elf): New, broken out of ...
819 (dwfl_report_elf): ... here. Call it.
820 * libdwflP.h: Declare it.
822 2007-10-06 Roland McGrath <roland@redhat.com>
824 * derelocate.c (dwfl_module_relocations): Don't call
825 dwfl_module_getdwarf.
827 * derelocate.c (find_section): Use __libdwfl_seterrno, not
830 * relocate.c (__libdwfl_relocate_value): Abuse sh_offset, not
831 SHF_ALLOC, to cache sh_addr resolved to 0.
833 * dwfl_report_elf.c (dwfl_report_elf): When an ET_REL file has sh_addr
834 values nonzero already, just use its existing layout.
836 * relocate.c (__libdwfl_relocate): Clear size of reloc section in its
837 in-core shdr after applying it.
839 2007-10-04 Ulrich Drepper <drepper@redhat.com>
841 * linux-kernel-modules.c (dwfl_linux_kernel_report_kernel): Fake
842 initialization of notes variable.
844 2007-10-04 Roland McGrath <roland@redhat.com>
846 * linux-kernel-modules.c (intuit_kernel_bounds): Take new arg NOTES,
847 fill in with vaddr of "__start_notes" symbol if found.
848 (check_notes): New function.
849 (check_kernel_notes): New function.
850 (dwfl_linux_kernel_report_kernel): Call it.
851 (check_module_notes): New function.
852 (dwfl_linux_kernel_report_modules): Call it.
854 * linux-kernel-modules.c (dwfl_linux_kernel_find_elf):
855 Try dwfl_build_id_find_elf first.
857 * linux-kernel-modules.c (report_kernel): Don't leak FD if !REPORT.
858 Set kernel module e_type to ET_DYN.
860 2007-10-03 Roland McGrath <roland@redhat.com>
862 * find-debuginfo.c (validate): New function, broken out of ...
863 (find_debuginfo_in_path): ... here. New function, broken out of ...
864 (dwfl_standard_find_debuginfo): ... here. Call it, after trying
865 dwfl_build_id_find_debuginfo first.
867 * dwfl_build_id_find_elf.c: New file.
868 * dwfl_build_id_find_debuginfo.c: New file.
869 * Makefile.am (libdwfl_a_SOURCES): Add them.
870 * libdwfl.h: Declare them.
871 * libdwflP.h: Add INTDECLs.
873 * dwfl_module_build_id.c: New file.
874 * dwfl_module_report_build_id.c: New file.
875 * Makefile.am (libdwfl_a_SOURCES): Add them.
876 * libdwfl.h: Declare them.
877 * libdwflP.h (struct Dwfl_Module): New members build_id_bits,
878 build_id_len, build_id_vaddr. Declare __libdwfl_find_build_id.
879 * dwfl_module.c (__libdwfl_module_free): Free MOD->build_id_bits.
881 * dwfl_module_getdwarf.c (find_offsets): New function.
882 (find_dynsym): New function, calls that.
883 (find_symtab): Call it.
885 2007-09-11 Roland McGrath <roland@redhat.com>
887 * dwfl_module_addrsym.c: Prefer a later global symbol at the same
888 address if its st_size is smaller.
890 2007-08-13 Roland McGrath <roland@redhat.com>
892 * dwfl_module_addrsym.c: Add dead initializer for stupid compiler.
894 2007-08-12 Roland McGrath <roland@redhat.com>
896 * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Don't use
899 * elf-from-memory.c (elf_from_remote_memory): Don't reset LOADBASE on
900 a second phdr if it happens to match EHDR_VMA exactly.
902 2007-08-08 Roland McGrath <roland@redhat.com>
904 * dwfl_module_addrsym.c: Don't use STT_SECTION, STT_FILE symbols and
905 those with no names. Rewrite best symbol algorithm not to assume a
906 sorted table and to be smarter handling sizeless symbols.
908 2007-07-16 Roland McGrath <roland@redhat.com>
910 * dwfl_module.c (dwfl_report_module): Increment DWFL->nmodules when
911 reviving an existing module.
913 2007-06-08 Roland McGrath <roland@redhat.com>
915 * libdwflP.h: Fix #ifndef for config.h to use PACKAGE_NAME.
917 2007-05-17 Roland McGrath <roland@redhat.com>
919 * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Look at
920 whole /lib/modules/VERSION tree, not just /lib/modules/VERSION/kernel.
921 (dwfl_linux_kernel_find_elf): Likewise.
923 * linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use
924 getline and sscanf instead of fscanf.
926 2007-05-08 Roland McGrath <roland@redhat.com>
928 * offline.c (dwfl_offline_section_address): Don't assume section
929 numbers match between stripped and debuginfo files. Instead, assume
930 only that the ordering among SHF_ALLOC sections matches.
932 * linux-kernel-modules.c (report_kernel): Change RELEASE argument to
934 (dwfl_linux_kernel_report_offline): Update caller.
935 (dwfl_linux_kernel_report_kernel): Likewise.
937 2007-04-23 Roland McGrath <roland@redhat.com>
939 * argp-std.c (options): Fix group title string.
941 * argp-std.c (parse_opt): Handle ARGP_KEY_ERROR, free the Dwfl.
942 Update via STATE->input every time we set STATE->hook, not only at
945 * dwfl_module.c (free_file): Free FILE->name.
947 2007-04-16 Roland McGrath <roland@redhat.com>
949 * derelocate.c (cache_sections): Apply bias to sh_addr.
950 (compare_secrefs): Fix address comparison to avoid signed overflow.
951 (find_section): New function, broken out of ...
952 (dwfl_module_relocate_address): ... here, call it.
953 (check_module): New function, broken out of ...
954 (dwfl_module_relocate_address): ... here, call it.
955 (dwfl_module_address_section): New function.
956 * libdwfl.h: Declare it.
958 2007-03-26 Roland McGrath <roland@redhat.com>
960 * dwfl_module.c (__libdwfl_module_free): Free MOD itself.
962 2007-03-18 Roland McGrath <roland@redhat.com>
964 * dwfl_module_getdwarf.c (find_debuglink): New function, broken out of
965 (find_debuginfo): ... here. Call it.
966 Don't return error for libelf errors finding .gnu_debuglink section.
968 2007-03-12 Roland McGrath <roland@redhat.com>
970 * dwfl_module.c (dwfl_report_begin_add): New function broken out of ...
971 (dwfl_report_begin): ... here. Call it.
972 * libdwfl.h: Declare it.
973 * libdwflP.h: Add INTDECL.
975 * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo.
977 * offline.c: Comment typo fix.
979 2007-03-04 Roland McGrath <roland@redhat.com>
981 * linux-kernel-modules.c (KERNEL_MODNAME): New macro for "kernel".
982 (find_kernel_elf): New function, broken out of ...
983 (report_kernel): ... here. Call it.
984 (dwfl_linux_kernel_find_elf): Use it for module named KERNEL_MODNAME.
985 (intuit_kernel_bounds): New function, grovel /proc/kallsyms to guess
986 virtual address bounds of kernel from symbols rounded to page size.
987 (dwfl_linux_kernel_report_kernel): Use that if it works, before
988 resorting to report_kernel.
990 * dwfl_module_getdwarf.c (open_elf): Set MOD->e_type to ET_DYN for an
991 ET_EXEC file with nonzero bias.
993 * dwfl_module_addrname.c (dwfl_module_addrname): Just call
994 dwfl_module_addrsym. Guts moved to ...
995 * dwfl_module_addrsym.c: ... here; new file.
996 * Makefile.am (libdwfl_a_SOURCES): Add it.
997 * libdwfl.h: Declare dwfl_module_addrsym.
998 * libdwflP.h: Add INTDECL.
1000 2007-03-03 Roland McGrath <roland@redhat.com>
1002 * dwfl_module.c (free_file): New function, broken out of ...
1003 (__libdwfl_module_free): ... here. In it, close fd after elf_end.
1005 * dwfl_module_getdwarf.c (open_elf): Close fd and reset to -1
1008 2007-03-02 Roland McGrath <roland@redhat.com>
1010 * linux-kernel-modules.c: Fix bogus error test for asprintf call.
1012 2007-02-02 Roland McGrath <roland@redhat.com>
1014 * dwfl_addrmodule.c (dwfl_addrmodule): Match a module's high boundary
1015 address exactly if it's no other module's low boundary.
1017 * dwfl_module_addrname.c (dwfl_module_addrname): If no symbol's value
1018 and size cover the address, select the closest symbol with st_size==0
1019 that lies in the same section.
1021 2007-01-29 Roland McGrath <roland@redhat.com>
1023 * dwfl_version.c (dwfl_version): Return PACKAGE_VERSION,
1026 2007-01-20 Roland McGrath <roland@redhat.com>
1028 * relocate.c (__libdwfl_relocate_value): Treat section_address of -1
1030 * libdwfl.h (Dwfl_Callbacks): Update comment.
1031 * derelocate.c (cache_sections): Don't ignore sh_addr == 0 sections.
1032 * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
1033 For ignored missing section, use -1 instead of 0.
1034 * offline.c (dwfl_offline_section_address): Expect a call for 0.
1036 2007-01-19 Roland McGrath <roland@redhat.com>
1038 * argp-std.c (parse_opt): For -e, reset DWFL->offline_next_address to
1039 zero so a lone -e foo.so is shown without address bias.
1041 2007-01-10 Roland McGrath <roland@redhat.com>
1043 * linux-kernel-modules.c (report_kernel): Check asprintf return value
1044 directly instead of via side effect, to silence warn_unused_result.
1045 (dwfl_linux_kernel_report_offline): Likewise.
1046 (dwfl_linux_kernel_find_elf): Likewise.
1047 (dwfl_linux_kernel_module_section_address): Likewise.
1048 * find-debuginfo.c (try_open): Likewise.
1049 * linux-proc-maps.c (find_sysinfo_ehdr): Likewise.
1050 (dwfl_linux_proc_report): Likewise.
1052 * libdwfl.h (dwfl_begin): Require nonnull argument.
1054 2006-12-27 Roland McGrath <roland@redhat.com>
1056 * dwfl_module.c (compare_modules): Fix address comparison to avoid
1057 signed overflow. Patch by Frank Ch. Eigler <fche@redhat.com>.
1059 2006-10-30 Roland McGrath <roland@redhat.com>
1061 * dwfl_module.c (dwfl_report_module): Comment typo fix.
1063 2006-09-05 Roland McGrath <roland@redhat.com>
1065 * derelocate.c (cache_sections): Use alloca instead of variable-sized
1066 auto array, in function already using alloca.
1068 2006-08-14 Roland McGrath <roland@redhat.com>
1070 * linux-kernel-modules.c (try_kernel_name): If the call to
1071 dwfl_standard_find_debuginfo produces no results, try it again
1072 with NULL as DEBUGLINK_FILE to try *FNAME with .debug suffix.
1074 * find-debuginfo.c (DEFAULT_DEBUGINFO_PATH): Macro moved ...
1075 * libdwflP.h: ... to here.
1076 * linux-kernel-modules.c (try_kernel_name): Skip manual open if it
1077 repeats the first thing dwfl_standard_find_debuginfo will try.
1079 * linux-kernel-modules.c (MODULE_SECT_NAME_LEN): New macro.
1080 (dwfl_linux_kernel_module_section_address): If a /sys file is missing
1081 and the section name is >= MODULE_SECT_NAME_LEN, try truncating the
1084 2006-07-12 Ulrich Drepper <drepper@redhat.com>
1086 * cu.c: Adjust for internal_function_def removal.
1087 * dwfl_error.c: Likewise.
1088 * dwfl_module.c: Likewise.
1089 * dwfl_module_getdwarf.c: Likewise.
1090 * lines.c: Likewise.
1091 * relocate.c: Likewise.
1093 2006-07-11 Ulrich Drepper <drepper@redhat.com>
1095 * dwfl_module.c (compare_modules): Don't return GElf_Sxword value,
1096 it can overflow the return value type.
1097 Patch by Tim Moore <timoore@redhat.com>.
1099 2006-06-28 Roland McGrath <roland@redhat.com>
1101 * libdwfl.h: Cosmetic changes.
1103 * dwfl_line_comp_dir.c: New file.
1104 * Makefile.am (libdwfl_a_SOURCES): Add it.
1105 * libdwfl.h: Declare dwfl_line_comp_dir.
1107 * dwfl_lineinfo.c (dwfl_lineinfo): Remove stray extern in defn.
1109 * dwfl_linecu.c: New file.
1110 * Makefile.am (libdwfl_a_SOURCES): Add it.
1111 * libdwfl.h: Declare dwfl_linecu.
1113 * libdwflP.h (dwfl_linecu_inline): Function renamed from dwfl_linecu.
1114 (dwfl_linecu): Define as macro.
1116 * relocate.c (__libdwfl_relocate): Use dwfl_module_getsym.
1118 * dwfl_module_getdwarf.c (dwfl_module_getsymtab): New function.
1119 (dwfl_module_addrname): Function moved ...
1120 * dwfl_module_addrname.c: ... here, new file.
1121 * dwfl_module_getsym.c: New file.
1122 * Makefile.am (libdwfl_a_SOURCES): Add them.
1123 * libdwfl.h: Declare dwfl_module_getsymtab, dwfl_module_getsym.
1124 * libdwflP.h: Add INTDECLs.
1126 2006-06-27 Roland McGrath <roland@redhat.com>
1128 * dwfl_module.c (dwfl_report_end): Whitespace fix.
1130 2006-06-13 Roland McGrath <roland@redhat.com>
1132 * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo.
1133 Use __libdwfl_seterrno for elf_memory failure.
1135 2006-05-22 Roland McGrath <roland@redhat.com>
1137 * dwfl_module_return_value_location.c
1138 (dwfl_module_return_value_location): Use __libdwfl_module_getebl.
1140 2006-05-27 Ulrich Drepper <drepper@redhat.com>
1142 * libdwfl.h: Add extern "C".
1144 2006-05-22 Ulrich Drepper <drepper@redhat.com>
1146 * cu.c (addrarange): Handle files without aranges information.
1148 2006-05-16 Ulrich Drepper <drepper@redhat.com>
1150 * dwfl_addrmodule.c (dwfl_addrmodule): Also return NULL of
1153 2006-02-26 Roland McGrath <roland@redhat.com>
1155 * dwfl_version.c: New file.
1156 * Makefile.am (libdwfl_a_SOURCES): Add it.
1157 * libdwfl.h: Declare dwfl_version.
1159 * offline.c (dwfl_report_offline): Account for dwfl_report_elf having
1160 aligned up from DWFL->offline_next_address when checking for overlap.
1162 2005-12-22 Roland McGrath <roland@redhat.com>
1164 * argp-std.c (parse_opt): Call dwfl_end in failure cases.
1166 * linux-proc-maps.c (proc_maps_report): New function, broken out of ...
1167 (dwfl_linux_proc_report): ... here. Call it.
1168 (dwfl_linux_proc_maps_report): New function.
1169 * libdwfl.h: Declare it.
1170 * libdwflP.h: Add INTDECL.
1171 * argp-std.c (options, parse_opt): Grok -M/--linux-process-map.
1173 * dwfl_nextcu.c (dwfl_nextcu): Don't fail when dwfl_module_getdwarf
1174 failed with DWFL_E_NO_DWARF.
1176 2005-11-26 Roland McGrath <roland@redhat.com>
1178 * dwfl_end.c (dwfl_end): Free the DWFL itself.
1180 2005-11-25 Roland McGrath <roland@redhat.com>
1182 * dwfl_module_getdwarf.c (__libdwfl_module_getebl): New function.
1184 * dwfl_module_register_names.c (dwfl_module_register_names): Likewise.
1185 * libdwflP.h: Declare it.
1187 * dwfl_module_register_names.c: New file.
1188 * Makefile.am (libdwfl_a_SOURCES): Add it.
1189 * libdwfl.h: Declare dwfl_module_register_names.
1191 2005-11-21 Roland McGrath <roland@redhat.com>
1193 * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
1194 Don't leak malloc'd file name.
1195 If a /sys/.../sections file is missing and starts with ".init",
1196 try the variant with "_init" too; catches PPC64 kernel braindamage.
1198 2005-11-15 Roland McGrath <roland@redhat.com>
1200 * libdwfl.h: Comment fixes.
1202 * dwfl_module_return_value_location.c: Add unlikely for error case.
1204 2005-11-13 Roland McGrath <roland@redhat.com>
1206 * dwfl_return_value_location.c: New file.
1207 * Makefile.am (libdwfl_a_SOURCES): Add it.
1208 * libdwfl.h: Declare dwfl_module_return_value_location.
1209 * libdwflP.h (DWFL_ERRORS): Add DWFL_E_WEIRD_TYPE.
1211 2005-10-20 Roland McGrath <roland@redhat.com>
1213 * libdwflP.h (DWFL_ERRORS): New error UNKNOWN_MACHINE.
1214 * relocate.c (__libdwfl_relocate): Return DWFL_E_UNKNOWN_MACHINE
1215 instead of DWFL_E_BADRELTYPE if ebl_get_elfmachine yields EM_NONE.
1217 2005-10-01 Roland McGrath <roland@redhat.com>
1219 * linux-kernel-modules.c (report_kernel): Return ENOENT if we fail
1222 2005-09-19 Roland McGrath <roland@redhat.com>
1224 * linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use
1225 PRIx64 instead of PRIi64, lest addresses with high bits set overflow
1226 the signed integer reading; they will just have to be in hexadecimal.
1227 (dwfl_linux_kernel_module_section_address): Likewise.
1229 2005-08-28 Ulrich Drepper <drepper@redhat.com>
1231 * Makefile.am (%.os): Use COMPILE.os.
1232 (COMPILE.os): Filter out gconv options.
1234 2005-08-25 Roland McGrath <roland@redhat.com>
1236 * cu.c (__libdwfl_nextcu): Return success when dwarf_nextcu hits end.
1237 * dwfl_nextcu.c (dwfl_nextcu): Skip modules with no dwarf info.
1239 2005-08-24 Roland McGrath <roland@redhat.com>
1241 * dwfl_lineinfo.c (dwfl_lineinfo): Add bias, don't subtract it.
1243 * argp-std.c [_MUDFLAP] (__libdwfl_argp_mudflap_options): New function,
1244 magic initializer to set -heur-stack-bound option.
1246 2005-08-22 Roland McGrath <roland@redhat.com>
1248 * dwfl_validate_address.c: New file.
1249 * Makefile.am (libdwfl_a_SOURCES): Add it.
1250 * libdwfl.h: Declare dwfl_validate_address.
1252 * derelocate.c (dwfl_module_relocate_address): Add INTDEF.
1253 * libdwflP.h: Add INTDECL.
1255 * dwfl_module_getdwarf.c (find_symtab): Use elf_getdata instead of
1256 elf_rawdata for symbol-related sections.
1258 * offline.c (dwfl_report_offline): Move offline_next_address outside
1259 module's range, in case it's an ET_EXEC using fixed segment locations.
1260 * libdwfl.h: Update comment.
1262 * dwfl_report_elf.c (dwfl_report_elf): Align BASE to first segment's
1265 2005-08-20 Roland McGrath <roland@redhat.com>
1267 * linux-kernel-modules.c (report_kernel): Take new argument PREDICATE,
1268 function to choose whether to report.
1269 (dwfl_linux_kernel_report_offline): Likewise.
1270 * libdwfl.h: Update decl.
1271 * argp-std.c (parse_opt): Update caller.
1273 * dwfl_getsrclines.c: New file.
1274 * dwfl_onesrcline.c: New file.
1275 * Makefile.am (libdwfl_a_SOURCES): Add them.
1276 * libdwfl.h: Declare dwfl_getsrclines, dwfl_onesrcline.
1278 * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't leak
1279 MODULESDIR[0]. Call fts_close on failure.
1281 * dwfl_module_getdwarf.c (load_dw): Take dwfl_file * instead of Elf *.
1282 Close ET_REL file descriptors after relocation.
1283 (find_dw): Update caller.
1284 * offline.c (dwfl_report_offline): Get the file into memory and close
1285 the file descriptor.
1287 * dwfl_module_getdwarf.c (find_debuginfo): Do nothing when
1288 MOD->debug.elf is already set.
1290 * find-debuginfo.c (try_open): Use TEMP_FAILURE_RETRY.
1291 (dwfl_standard_find_debuginfo): Fail on errors not ENOENT or ENOTDIR.
1293 * argp-std.c (options, parse_opt): Grok -K/--offline-kernel, use
1294 dwfl_linux_kernel_report_offline with offline_callbacks.
1296 * linux-kernel-modules.c (report_kernel): New function, broken out of
1298 (dwfl_linux_kernel_report_kernel): ... here. Use it.
1299 (dwfl_linux_kernel_report_offline): New function.
1300 * libdwfl.h: Declare it.
1301 * libdwflP.h: Add INTDECL.
1303 2005-08-19 Roland McGrath <roland@redhat.com>
1305 Use standard debuginfo search path to look for vmlinux.
1306 * find-debuginfo.c (dwfl_standard_find_debuginfo): Don't check CRC if
1308 * linux-kernel-modules.c (try_kernel_name): New function, broken out
1310 (dwfl_linux_kernel_report_kernel): ... here. Use it.
1312 * argp-std.c (offline_callbacks): New variable.
1313 (parse_opt): Use it for -e. Allow multiple -e options.
1315 * offline.c: New file.
1316 * Makefile.am (libdwfl_a_SOURCES): Add it.
1317 * libdwfl.h: Declare dwfl_offline_section_address, dwfl_report_offline.
1318 * libdwflP.h: Add INTDECLs.
1319 (OFFLINE_REDZONE): New macro.
1320 (struct Dwfl): New member `offline_next_address'.
1321 * dwfl_begin.c (dwfl_begin): Initialize it.
1322 * dwfl_module.c (dwfl_report_begin): Likewise.
1324 * dwfl_report_elf.c (dwfl_report_elf): Accept all types. When ET_REL,
1325 do a nominal absolute section layout starting at BASE.
1326 * libdwfl.h: Update comment.
1328 2005-08-18 Roland McGrath <roland@redhat.com>
1330 * dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Do
1331 dwfl_module_getdwarf if necessary.
1333 * dwfl_report_elf.c (dwfl_report_elf): Permit ET_REL with BASE==0.
1334 * libdwfl.h: Update comment.
1336 * derelocate.c: New file.
1337 * Makefile.am (libdwfl_a_SOURCES): Add it.
1339 * libdwflP.h (struct Dwfl_Module): isrel -> e_type.
1340 * dwfl_report_elf.c (dwfl_report_elf): Initialize it.
1341 * dwfl_module_getdwarf.c (open_elf): Update initialization.
1342 (load_dw, dwfl_module_addrname): Update uses.
1343 * relocate.c (__libdwfl_relocate): Likewise.
1345 2005-08-04 Roland McGrath <roland@redhat.com>
1347 * libdwfl.h (Dwfl_Callbacks.section_address): Take additional
1348 arguments SHNDX, SHDR.
1349 (dwfl_linux_kernel_module_section_address): Update prototype.
1350 * relocate.c (__libdwfl_relocate_value): Update caller.
1351 * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
1352 Take the new arguments.
1354 2005-08-10 Roland McGrath <roland@redhat.com>
1356 * relocate.c (__libdwfl_relocate): Take argument DEBUGFILE,
1357 use it instead of MOD->debug.file.
1358 * libdwflP.h: Update decl.
1359 * dwfl_module_getdwarf.c (load_dw): Update caller.
1362 2005-08-09 Roland McGrath <roland@redhat.com>
1364 * libdwflP.h: Include ../libdw/libdwP.h for its INTDECLs.
1365 * cu.c: Use INTUSE on dwarf_* calls.
1366 * dwfl_error.c: Likewise.
1367 * dwfl_module.c: Likewise.
1368 * dwfl_module_getdwarf.c: Likewise.
1369 * dwfl_module_getsrc_file.c: Likewise.
1370 * lines.c: Likewise.
1372 2005-08-07 Roland McGrath <roland@redhat.com>
1374 * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): When module
1375 names contain '_' or '-', look for files named either "foo-bar.ko"
1378 2005-07-29 Roland McGrath <roland@redhat.com>
1380 * loc2c.c: File removed.
1381 * loc2c.h: File removed.
1382 * loc2c-runtime.h: File removed.
1383 * test2.c: File removed.
1384 * Makefile.am (EXTRA_DIST): Variable removed.
1385 (noinst_HEADERS): Remove loc2c.h from here.
1387 2005-07-28 Ulrich Drepper <drepper@redhat.com>
1389 * libdwfl.h: Add a few missing extern for function prototypes.
1391 * libdwfl_crc32.c: New file.
1392 * libdwfl_crc32_file.c: New file.
1393 * libdwflP.h: Declare the new functions.
1394 * Makefile.am (libdwfl_a_SOURCES): Add libdwfl_crc32.c and
1395 libdwfl_crc32_file.c.
1396 * libdwfl/find-debuginfo.c (check_crc): Use __libdwfl_crc32_file
1397 instead of crc32_file.
1399 2005-07-28 Roland McGrath <roland@redhat.com>
1401 * ptest.c: Moved to ../tests/dwflmodtest.c.
1403 * Makefile.am (noinst_PROGRAMS): Variable removed.
1404 (libdwfl_so_SOURCES, libdwfl_LIBS, libdwfl_so_LDADD): Likewise.
1405 (EXTRA_DIST, ptest_LDADD, test2_LDADD): Likewise.
1406 (libdwfl): Don't use libdwfl.so any more.
1407 (libdwfl.so, install, uninstall): Targets removed.
1408 (test2_SOURCES): Define EXTRA_DIST instead of this.
1409 * libdwfl.map: File removed.
1411 * libdwfl.h: Use "" for libdw.h #include.
1413 2005-07-27 Roland McGrath <roland@redhat.com>
1415 * libdwfl.map: Add dwfl_getmodules.
1417 2005-07-23 Ulrich Drepper <drepper@redhat.com>
1419 * Makefile.am: Fix rules to allow building with mudflap.
1421 2005-07-21 Roland McGrath <roland@redhat.com>
1423 * Makefile.am (noinst_HEADERS): Add loc2c.c.
1425 * test2.c (main): Check sscanf result to quiet warning.
1427 2005-07-20 Roland McGrath <roland@redhat.com>
1429 * libdwfl-branch merged, creating this direcotry.