1 2008-12-16 Roland McGrath <roland@redhat.com>
3 * dwfl_module_build_id.c (dwfl_module_build_id): Define with alias and
4 symver magic to bind to ELFUTILS_0.138.
5 (_BUG_COMPAT_dwfl_module_build_id): New function, bug compatible
6 wrapper for ELFUTILS_0.130 version set.
8 2008-12-18 Roland McGrath <roland@redhat.com>
10 * derelocate.c (dwfl_module_relocate_address): Fix last fix: ET_DYN
11 addresses are taken as relative to MOD->low_addr.
13 2008-12-15 Roland McGrath <roland@redhat.com>
15 * derelocate.c (dwfl_module_relocate_address): Apply main.bias, not
18 2008-12-11 Roland McGrath <roland@redhat.com>
20 * offline.c (process_archive): Don't call elf_end and close if
21 returning NULL. Check first elf_begin call and set error code
22 specially for empty archive.
25 2008-12-02 Roland McGrath <roland@redhat.com>
27 * dwfl_getmodules.c (dwfl_getmodules): Typo fix in last change.
29 2008-11-26 Roland McGrath <roland@redhat.com>
31 * dwfl_getmodules.c (dwfl_getmodules): Encode iteration style in
32 return value, and interpret encoded OFFSET argument.
34 2008-10-07 Roland McGrath <roland@redhat.com>
36 * dwfl_module_build_id.c (check_notes): Fix typo in vaddr calculation.
38 2008-09-29 Roland McGrath <roland@redhat.com>
40 * segment.c (insert): Must realloc DWFL->lookup_module here too.
41 (dwfl_report_segment): Clear DWFL->lookup_module before insert calls.
43 2008-08-28 Roland McGrath <roland@redhat.com>
45 * segment.c (reify_segments): Fix last change.
47 2008-08-27 Roland McGrath <roland@redhat.com>
49 * linux-proc-maps.c (read_proc_memory): Return 0 for EINVAL or EPERM
52 2008-08-26 Roland McGrath <roland@redhat.com>
54 * segment.c (reify_segments): Insert a trailing segment for a module
55 end that is above the highest current segment.
57 2008-08-25 Roland McGrath <roland@redhat.com>
59 * dwfl_module_getdwarf.c (open_elf): Extract elf_errno () for
60 coded return value, not plain DWFL_E_LIBELF. Return DWFL_E_BADELF
61 if FILE->elf is not ELF_K_ELF.
63 * dwfl_segment_report_module.c: Add a cast.
65 2008-08-21 Denys Vlasenko <dvlasenk@redhat.com>
67 * dwfl_module_addrsym.c (dwfl_module_addrsym): Improve logic
68 which decides which symbol is "closest" to a given address.
70 2008-08-15 Roland McGrath <roland@redhat.com>
72 * argp-std.c (offline_callbacks): Use dwfl_build_id_find_elf.
73 (options, parse_opt): Handle --core.
75 * core-file.c: New file.
76 * Makefile.am (libdwfl_a_SOURCES): Add it.
77 * libdwflP.h (dwfl_core_file_report): Declare it.
79 * link_map.c: New file.
80 * Makefile.am (libdwfl_a_SOURCES): Add it.
81 * libdwflP.h (dwfl_link_map_report): Declare it.
83 * libdwflP.h (MIN, MAX): New macros.
84 (Dwfl_Memory_Callback): New typedef.
85 (Dwfl_Module_Callback): New typedef.
86 (dwfl_segment_report_module): Declare it.
87 * dwfl_segment_report_module.c: New file.
88 * Makefile.am (libdwfl_a_SOURCES): Add it.
90 * derelocate.c (dwfl_module_address_section): Add INTDEF.
91 * libdwflP.h: Add INTDECL.
93 * segment.c: New file.
94 * Makefile.am (libdwfl_a_SOURCES): Add it.
95 * libdwfl.h: Declare dwfl_addrsegment, dwfl_report_segment.
96 * libdwflP.h (struct Dwfl): New members lookup_elts, lookup_alloc,
97 lookup_addr, lookup_module, lookup_segndx, replace removed members
99 (struct Dwfl_Module): New member segment.
100 * dwfl_end.c (dwfl_end): Free the new ones. Iterate via modulelist
102 * dwfl_module.c (dwfl_report_begin_add): Do nothing.
103 (dwfl_report_begin): Don't call it. Truncate the segment table instead.
104 (dwfl_report_module): Don't touch DWFL->nmodules.
105 (dwfl_report_end): Don't touch DWFL->modules and DWFL->nmodules.
106 (compare_modules): Function removed.
107 * dwfl_getmodules.c: Rewritten.
109 * libdwflP.h: Add INTDECLs.
110 * dwfl_getdwarf.c: Rewritten to call dwfl_getmodules.
111 * dwfl_addrmodule.c: Rewritten to just call dwfl_addrsegment.
113 2008-08-03 Roland McGrath <roland@redhat.com>
115 * linux-kernel-modules.c: Include <fts.h> before <config.h>.
117 2008-07-17 Roland McGrath <roland@redhat.com>
119 * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Set errno to
120 zero if the failure was only ENOENT.
122 2008-06-03 Roland McGrath <roland@redhat.com>
124 * dwfl_module_addrsym.c (dwfl_module_addrsym): Exclude undefined
127 2008-05-22 Petr Machata <pmachata@redhat.com>
129 * dwfl_module_getdwarf.c (open_elf): Bias of ET_EXEC files is always 0.
131 2008-05-06 Roland McGrath <roland@frob.com>
133 * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Use
134 FTS_LOGICAL here too.
135 (dwfl_linux_kernel_find_elf): Likewise.
137 2008-04-29 Roland McGrath <roland@redhat.com>
139 * find-debuginfo.c (dwfl_standard_find_debuginfo): Try path search
140 based on canonicalize_file_name if it differs from the supplied name.
142 * linux-kernel-modules.c (check_module_notes): Use FTS_LOGICAL so
145 2008-04-27 Roland McGrath <roland@redhat.com>
147 * linux-kernel-modules.c (report_kernel): Fix crash when
148 dwfl_report_elf fails.
150 2008-04-05 Roland McGrath <roland@redhat.com>
152 * linux-proc-maps.c (proc_maps_report): Don't leak LAST_FILE.
154 * dwfl_module_getdwarf.c (find_file): Always free build_id_bits.
155 Clear it after freeing.
156 * dwfl_module_report_build_id.c (dwfl_module_report_build_id): Likewise.
158 2008-03-26 Roland McGrath <roland@redhat.com>
160 * dwfl_module_getdwarf.c (load_symtab): Don't return success for
161 SHT_DYNSYM, just set *SYMSCN like the comment says.
163 * dwfl_end.c (dwfl_end): Iterate on modulelist chain, not modules array.
165 * argp-std.c (parse_opt): On failure, call dwfl_end before argp_failure.
167 2008-03-19 Roland McGrath <roland@redhat.com>
169 * dwfl_module_getsrc.c: Adjust address for module bias before search.
171 2008-03-01 Roland McGrath <roland@redhat.com>
173 * libdwflP.h (__libdwfl_seterrno): Remove parameter name from
174 prototype to avoid older compiler's complaint about reuse of the name.
175 (__libdwfl_canon_error): Likewise.
177 2008-02-19 Roland McGrath <roland@redhat.com>
179 * relocate.c (relocate_section): Check for an unhandled relocation
180 type before resolving a reloc's symbol. Lift DWFL_E_BADRELTYPE ->
181 DWFL_E_UNKNOWN_MACHINE check out of loops.
183 * dwfl_module_getdwarf.c (load_dw): Skip relocation if
184 DEBUGFILE->relocated is already set.
186 2008-01-26 Roland McGrath <roland@redhat.com>
188 * dwfl_module_getdwarf.c (open_elf): Open FILE->name if it's non-null.
190 * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Don't clear
191 incoming *FILE_NAME at the start.
193 2008-01-08 Roland McGrath <roland@redhat.com>
195 * Makefile.am (euinclude): Variable removed.
196 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
198 2007-10-23 Roland McGrath <roland@redhat.com>
200 * linux-kernel-modules.c (report_kernel_archive): Reorder the kernel
201 module to appear first.
203 2007-10-20 Roland McGrath <roland@redhat.com>
205 * offline.c (process_archive_member): Take FD argument, pass it down
206 to process_file. Return Elf_Cmd, not bool.
207 Call elf_next here, always before elf_end.
208 (process_archive): Update caller. Don't close FD here unless there
211 * dwfl_module.c (free_file): Close fd only when elf_end returns zero.
213 * libdwflP.h (struct dwfl_file): New bool member `relocated'.
214 * dwfl_module_getdwarf.c (dwfl_module_getelf): For ET_REL, apply
215 partial relocation to one or both files.
216 (dwfl_module_getdwarf): For ET_REL, make sure extra sections'
217 relocations have been applied to the debug file if dwfl_module_getelf
218 has been used before.
220 * relocate.c (resolve_symbol): New function.
221 (relocate_section): Call it.
223 * relocate.c (relocate_getsym): Handle null MOD->symfile.
224 (relocate_section): Take new bool arg, PARTIAL. If true,
225 no error for BADRELTYPE/RELUNDEF, instead just skip them
226 and leave only those skipped relocs behind the reloc section.
227 (__libdwfl_relocate_section): Take new arg, pass it down.
228 (__libdwfl_relocate): Take new bool arg, DEBUG. If false,
229 do partial relocation on all sections.
230 * dwfl_module_getdwarf.c (load_dw): Update caller.
231 * libdwflP.h: Update decls.
232 * derelocate.c (dwfl_module_address_section): Pass new argument
233 to __libdwfl_relocate_section, true.
235 * derelocate.c (cache_sections): Don't cache reloc sections when
236 section_address callback is null.
238 2007-10-19 Roland McGrath <roland@redhat.com>
240 * relocate.c (relocate_section): Fix fencepost error in r_offset check.
242 * derelocate.c (struct dwfl_relocation): Add member `relocs'.
243 (struct secref): Likewise.
244 (cache_sections): Cache the relocation section referring to each
245 section we cache, if any.
246 (dwfl_module_address_section): Use __libdwfl_relocate_section as
249 * relocate.c (struct reloc_symtab_cache): New type.
250 (relocate_getsym): Use it instead of four arguments.
251 (__libdwfl_relocate): Update caller.
252 (relocate_section): New function, broken out of ...
253 (__libdwfl_relocate): ... here.
254 (__libdwfl_relocate_section): New function.
255 * libdwflP.h: Declare it.
257 2007-10-17 Roland McGrath <roland@redhat.com>
259 * dwfl_module_getsym.c (dwfl_module_getsym): Apply MOD->symfile->bias
260 to relocated st_value.
262 * dwfl_report_elf.c (__libdwfl_report_elf): Align initial BASE for
265 2007-10-16 Roland McGrath <roland@redhat.com>
267 * dwfl_report_elf.c (__libdwfl_report_elf): Readjust BASE when a later
268 section has larger alignment requirements not met by the original BASE,
269 rather than padding more between sections.
271 * dwfl_report_elf.c (__libdwfl_report_elf): Fix bias calculation.
273 * dwfl_module_build_id.c (__libdwfl_find_build_id): Apply module bias
276 * dwfl_report_elf.c (__libdwfl_report_elf): Don't be confused by BASE
277 at zero in ET_REL case. Adjust BASE to necessary alignment.
279 * dwfl_module_build_id.c (check_notes): Take -1, not 0, as stub value
281 (__libdwfl_find_build_id): Update caller.
283 * relocate.c (__libdwfl_relocate_value): Don't use sh_offset.
284 * dwfl_report_elf.c (__libdwfl_report_elf): Likewise.
285 * offline.c (dwfl_offline_section_address): Bail early if there is
288 * relocate.c (__libdwfl_relocate): Don't return DWFL_E_NO_DWARF.
290 2007-10-09 Roland McGrath <roland@redhat.com>
292 * dwfl_report_elf.c (__libdwfl_report_elf): Clear SHDR->sh_offset when
293 caching SHDR->sh_addr = 0.
294 * offline.c (dwfl_offline_section_address): Never called for sh_addr
295 really at 0, don't check for it. Use MOD->debug directly, not symfile.
297 * dwfl_module_getdwarf.c (load_symtab): Return success properly when
298 we've found SHT_SYMTAB.
300 * relocate.c (relocate_getsym): New function.
301 (__libdwfl_relocate): Use it.
302 (__libdwfl_relocate_value): Take new Elf * argument. Make SYMSHSTRNDX
303 be a pointer instead of value; cache getshstrndx result there.
304 * libdwflP.h: Update decl.
305 * derelocate.c (cache_sections): Update caller.
306 Always work on the main file, not the symfile.
307 (dwfl_module_address_section): Likewise.
308 * dwfl_module_getsym.c (dwfl_module_getsym): Update caller.
310 2007-10-07 Roland McGrath <roland@redhat.com>
312 * offline.c (process_archive): Initialize MOD.
314 * linux-kernel-modules.c (get_release): New function, broken out of ...
315 (report_kernel): ... here. Call it.
316 (try_kernel_name): Take new arg TRY_DEBUG, only try ".debug" if set.
317 (find_kernel_elf): Update caller.
318 (report_kernel_archive): New function.
319 (dwfl_linux_kernel_report_offline): Call it.
321 * offline.c (process_file): Take new arg PREDICATE, pass it down.
322 (process_archive): Likewise.
323 (process_archive_member): Likewise. When nonnull, let the predicate
324 decide whether to use this member.
325 (__libdwfl_report_offline): New function, broken out of ...
326 (dwfl_report_offline): ... here. Call it.
327 * libdwflP.h: Declare it.
329 * offline.c (process_archive, process_archive_member): New functions.
330 (process_elf, process_file): New functions, broken out of ...
331 (dwfl_report_offline): ... here. Call process_file, which recurses on
334 * dwfl_report_elf.c (__libdwfl_report_elf): New, broken out of ...
335 (dwfl_report_elf): ... here. Call it.
336 * libdwflP.h: Declare it.
338 2007-10-06 Roland McGrath <roland@redhat.com>
340 * derelocate.c (dwfl_module_relocations): Don't call
341 dwfl_module_getdwarf.
343 * derelocate.c (find_section): Use __libdwfl_seterrno, not
346 * relocate.c (__libdwfl_relocate_value): Abuse sh_offset, not
347 SHF_ALLOC, to cache sh_addr resolved to 0.
349 * dwfl_report_elf.c (dwfl_report_elf): When an ET_REL file has sh_addr
350 values nonzero already, just use its existing layout.
352 * relocate.c (__libdwfl_relocate): Clear size of reloc section in its
353 in-core shdr after applying it.
355 2007-10-04 Ulrich Drepper <drepper@redhat.com>
357 * linux-kernel-modules.c (dwfl_linux_kernel_report_kernel): Fake
358 initialization of notes variable.
360 2007-10-04 Roland McGrath <roland@redhat.com>
362 * linux-kernel-modules.c (intuit_kernel_bounds): Take new arg NOTES,
363 fill in with vaddr of "__start_notes" symbol if found.
364 (check_notes): New function.
365 (check_kernel_notes): New function.
366 (dwfl_linux_kernel_report_kernel): Call it.
367 (check_module_notes): New function.
368 (dwfl_linux_kernel_report_modules): Call it.
370 * linux-kernel-modules.c (dwfl_linux_kernel_find_elf):
371 Try dwfl_build_id_find_elf first.
373 * linux-kernel-modules.c (report_kernel): Don't leak FD if !REPORT.
374 Set kernel module e_type to ET_DYN.
376 2007-10-03 Roland McGrath <roland@redhat.com>
378 * find-debuginfo.c (validate): New function, broken out of ...
379 (find_debuginfo_in_path): ... here. New function, broken out of ...
380 (dwfl_standard_find_debuginfo): ... here. Call it, after trying
381 dwfl_build_id_find_debuginfo first.
383 * dwfl_build_id_find_elf.c: New file.
384 * dwfl_build_id_find_debuginfo.c: New file.
385 * Makefile.am (libdwfl_a_SOURCES): Add them.
386 * libdwfl.h: Declare them.
387 * libdwflP.h: Add INTDECLs.
389 * dwfl_module_build_id.c: New file.
390 * dwfl_module_report_build_id.c: New file.
391 * Makefile.am (libdwfl_a_SOURCES): Add them.
392 * libdwfl.h: Declare them.
393 * libdwflP.h (struct Dwfl_Module): New members build_id_bits,
394 build_id_len, build_id_vaddr. Declare __libdwfl_find_build_id.
395 * dwfl_module.c (__libdwfl_module_free): Free MOD->build_id_bits.
397 * dwfl_module_getdwarf.c (find_offsets): New function.
398 (find_dynsym): New function, calls that.
399 (find_symtab): Call it.
401 2007-09-11 Roland McGrath <roland@redhat.com>
403 * dwfl_module_addrsym.c: Prefer a later global symbol at the same
404 address if its st_size is smaller.
406 2007-08-13 Roland McGrath <roland@redhat.com>
408 * dwfl_module_addrsym.c: Add dead initializer for stupid compiler.
410 2007-08-12 Roland McGrath <roland@redhat.com>
412 * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Don't use
415 * elf-from-memory.c (elf_from_remote_memory): Don't reset LOADBASE on
416 a second phdr if it happens to match EHDR_VMA exactly.
418 2007-08-08 Roland McGrath <roland@redhat.com>
420 * dwfl_module_addrsym.c: Don't use STT_SECTION, STT_FILE symbols and
421 those with no names. Rewrite best symbol algorithm not to assume a
422 sorted table and to be smarter handling sizeless symbols.
424 2007-07-16 Roland McGrath <roland@redhat.com>
426 * dwfl_module.c (dwfl_report_module): Increment DWFL->nmodules when
427 reviving an existing module.
429 2007-06-08 Roland McGrath <roland@redhat.com>
431 * libdwflP.h: Fix #ifndef for config.h to use PACKAGE_NAME.
433 2007-05-17 Roland McGrath <roland@redhat.com>
435 * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Look at
436 whole /lib/modules/VERSION tree, not just /lib/modules/VERSION/kernel.
437 (dwfl_linux_kernel_find_elf): Likewise.
439 * linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use
440 getline and sscanf instead of fscanf.
442 2007-05-08 Roland McGrath <roland@redhat.com>
444 * offline.c (dwfl_offline_section_address): Don't assume section
445 numbers match between stripped and debuginfo files. Instead, assume
446 only that the ordering among SHF_ALLOC sections matches.
448 * linux-kernel-modules.c (report_kernel): Change RELEASE argument to
450 (dwfl_linux_kernel_report_offline): Update caller.
451 (dwfl_linux_kernel_report_kernel): Likewise.
453 2007-04-23 Roland McGrath <roland@redhat.com>
455 * argp-std.c (options): Fix group title string.
457 * argp-std.c (parse_opt): Handle ARGP_KEY_ERROR, free the Dwfl.
458 Update via STATE->input every time we set STATE->hook, not only at
461 * dwfl_module.c (free_file): Free FILE->name.
463 2007-04-16 Roland McGrath <roland@redhat.com>
465 * derelocate.c (cache_sections): Apply bias to sh_addr.
466 (compare_secrefs): Fix address comparison to avoid signed overflow.
467 (find_section): New function, broken out of ...
468 (dwfl_module_relocate_address): ... here, call it.
469 (check_module): New function, broken out of ...
470 (dwfl_module_relocate_address): ... here, call it.
471 (dwfl_module_address_section): New function.
472 * libdwfl.h: Declare it.
474 2007-03-26 Roland McGrath <roland@redhat.com>
476 * dwfl_module.c (__libdwfl_module_free): Free MOD itself.
478 2007-03-18 Roland McGrath <roland@redhat.com>
480 * dwfl_module_getdwarf.c (find_debuglink): New function, broken out of
481 (find_debuginfo): ... here. Call it.
482 Don't return error for libelf errors finding .gnu_debuglink section.
484 2007-03-12 Roland McGrath <roland@redhat.com>
486 * dwfl_module.c (dwfl_report_begin_add): New function broken out of ...
487 (dwfl_report_begin): ... here. Call it.
488 * libdwfl.h: Declare it.
489 * libdwflP.h: Add INTDECL.
491 * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo.
493 * offline.c: Comment typo fix.
495 2007-03-04 Roland McGrath <roland@redhat.com>
497 * linux-kernel-modules.c (KERNEL_MODNAME): New macro for "kernel".
498 (find_kernel_elf): New function, broken out of ...
499 (report_kernel): ... here. Call it.
500 (dwfl_linux_kernel_find_elf): Use it for module named KERNEL_MODNAME.
501 (intuit_kernel_bounds): New function, grovel /proc/kallsyms to guess
502 virtual address bounds of kernel from symbols rounded to page size.
503 (dwfl_linux_kernel_report_kernel): Use that if it works, before
504 resorting to report_kernel.
506 * dwfl_module_getdwarf.c (open_elf): Set MOD->e_type to ET_DYN for an
507 ET_EXEC file with nonzero bias.
509 * dwfl_module_addrname.c (dwfl_module_addrname): Just call
510 dwfl_module_addrsym. Guts moved to ...
511 * dwfl_module_addrsym.c: ... here; new file.
512 * Makefile.am (libdwfl_a_SOURCES): Add it.
513 * libdwfl.h: Declare dwfl_module_addrsym.
514 * libdwflP.h: Add INTDECL.
516 2007-03-03 Roland McGrath <roland@redhat.com>
518 * dwfl_module.c (free_file): New function, broken out of ...
519 (__libdwfl_module_free): ... here. In it, close fd after elf_end.
521 * dwfl_module_getdwarf.c (open_elf): Close fd and reset to -1
524 2007-03-02 Roland McGrath <roland@redhat.com>
526 * linux-kernel-modules.c: Fix bogus error test for asprintf call.
528 2007-02-02 Roland McGrath <roland@redhat.com>
530 * dwfl_addrmodule.c (dwfl_addrmodule): Match a module's high boundary
531 address exactly if it's no other module's low boundary.
533 * dwfl_module_addrname.c (dwfl_module_addrname): If no symbol's value
534 and size cover the address, select the closest symbol with st_size==0
535 that lies in the same section.
537 2007-01-29 Roland McGrath <roland@redhat.com>
539 * dwfl_version.c (dwfl_version): Return PACKAGE_VERSION,
542 2007-01-20 Roland McGrath <roland@redhat.com>
544 * relocate.c (__libdwfl_relocate_value): Treat section_address of -1
546 * libdwfl.h (Dwfl_Callbacks): Update comment.
547 * derelocate.c (cache_sections): Don't ignore sh_addr == 0 sections.
548 * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
549 For ignored missing section, use -1 instead of 0.
550 * offline.c (dwfl_offline_section_address): Expect a call for 0.
552 2007-01-19 Roland McGrath <roland@redhat.com>
554 * argp-std.c (parse_opt): For -e, reset DWFL->offline_next_address to
555 zero so a lone -e foo.so is shown without address bias.
557 2007-01-10 Roland McGrath <roland@redhat.com>
559 * linux-kernel-modules.c (report_kernel): Check asprintf return value
560 directly instead of via side effect, to silence warn_unused_result.
561 (dwfl_linux_kernel_report_offline): Likewise.
562 (dwfl_linux_kernel_find_elf): Likewise.
563 (dwfl_linux_kernel_module_section_address): Likewise.
564 * find-debuginfo.c (try_open): Likewise.
565 * linux-proc-maps.c (find_sysinfo_ehdr): Likewise.
566 (dwfl_linux_proc_report): Likewise.
568 * libdwfl.h (dwfl_begin): Require nonnull argument.
570 2006-12-27 Roland McGrath <roland@redhat.com>
572 * dwfl_module.c (compare_modules): Fix address comparison to avoid
573 signed overflow. Patch by Frank Ch. Eigler <fche@redhat.com>.
575 2006-10-30 Roland McGrath <roland@redhat.com>
577 * dwfl_module.c (dwfl_report_module): Comment typo fix.
579 2006-09-05 Roland McGrath <roland@redhat.com>
581 * derelocate.c (cache_sections): Use alloca instead of variable-sized
582 auto array, in function already alloca.
584 2006-08-14 Roland McGrath <roland@redhat.com>
586 * linux-kernel-modules.c (try_kernel_name): If the call to
587 dwfl_standard_find_debuginfo produces no results, try it again
588 with NULL as DEBUGLINK_FILE to try *FNAME with .debug suffix.
590 * find-debuginfo.c (DEFAULT_DEBUGINFO_PATH): Macro moved ...
591 * libdwflP.h: ... to here.
592 * linux-kernel-modules.c (try_kernel_name): Skip manual open if it
593 repeats the first thing dwfl_standard_find_debuginfo will try.
595 * linux-kernel-modules.c (MODULE_SECT_NAME_LEN): New macro.
596 (dwfl_linux_kernel_module_section_address): If a /sys file is missing
597 and the section name is >= MODULE_SECT_NAME_LEN, try truncating the
600 2006-07-12 Ulrich Drepper <drepper@redhat.com>
602 * cu.c: Adjust for internal_function_def removal.
603 * dwfl_error.c: Likewise.
604 * dwfl_module.c: Likewise.
605 * dwfl_module_getdwarf.c: Likewise.
607 * relocate.c: Likewise.
609 2006-07-11 Ulrich Drepper <drepper@redhat.com>
611 * dwfl_module.c (compare_modules): Don't return GElf_Sxword value,
612 it can overflow the return value type.
613 Patch by Tim Moore <timoore@redhat.com>.
615 2006-06-28 Roland McGrath <roland@redhat.com>
617 * libdwfl.h: Cosmetic changes.
619 * dwfl_line_comp_dir.c: New file.
620 * Makefile.am (libdwfl_a_SOURCES): Add it.
621 * libdwfl.h: Declare dwfl_line_comp_dir.
623 * dwfl_lineinfo.c (dwfl_lineinfo): Remove stray extern in defn.
625 * dwfl_linecu.c: New file.
626 * Makefile.am (libdwfl_a_SOURCES): Add it.
627 * libdwfl.h: Declare dwfl_linecu.
629 * libdwflP.h (dwfl_linecu_inline): Function renamed from dwfl_linecu.
630 (dwfl_linecu): Define as macro.
632 * relocate.c (__libdwfl_relocate): Use dwfl_module_getsym.
634 * dwfl_module_getdwarf.c (dwfl_module_getsymtab): New function.
635 (dwfl_module_addrname): Function moved ...
636 * dwfl_module_addrname.c: ... here, new file.
637 * dwfl_module_getsym.c: New file.
638 * Makefile.am (libdwfl_a_SOURCES): Add them.
639 * libdwfl.h: Declare dwfl_module_getsymtab, dwfl_module_getsym.
640 * libdwflP.h: Add INTDECLs.
642 2006-06-27 Roland McGrath <roland@redhat.com>
644 * dwfl_module.c (dwfl_report_end): Whitespace fix.
646 2006-06-13 Roland McGrath <roland@redhat.com>
648 * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo.
649 Use __libdwfl_seterrno for elf_memory failure.
651 2006-05-22 Roland McGrath <roland@redhat.com>
653 * dwfl_module_return_value_location.c
654 (dwfl_module_return_value_location): Use __libdwfl_module_getebl.
656 2006-05-27 Ulrich Drepper <drepper@redhat.com>
658 * libdwfl.h: Add extern "C".
660 2006-05-22 Ulrich Drepper <drepper@redhat.com>
662 * cu.c (addrarange): Handle files without aranges information.
664 2006-05-16 Ulrich Drepper <drepper@redhat.com>
666 * dwfl_addrmodule.c (dwfl_addrmodule): Also return NULL of
669 2006-02-26 Roland McGrath <roland@redhat.com>
671 * dwfl_version.c: New file.
672 * Makefile.am (libdwfl_a_SOURCES): Add it.
673 * libdwfl.h: Declare dwfl_version.
675 * offline.c (dwfl_report_offline): Account for dwfl_report_elf having
676 aligned up from DWFL->offline_next_address when checking for overlap.
678 2005-12-22 Roland McGrath <roland@redhat.com>
680 * argp-std.c (parse_opt): Call dwfl_end in failure cases.
682 * linux-proc-maps.c (proc_maps_report): New function, broken out of ...
683 (dwfl_linux_proc_report): ... here. Call it.
684 (dwfl_linux_proc_maps_report): New function.
685 * libdwfl.h: Declare it.
686 * libdwflP.h: Add INTDECL.
687 * argp-std.c (options, parse_opt): Grok -M/--linux-process-map.
689 * dwfl_nextcu.c (dwfl_nextcu): Don't fail when dwfl_module_getdwarf
690 failed with DWFL_E_NO_DWARF.
692 2005-11-26 Roland McGrath <roland@redhat.com>
694 * dwfl_end.c (dwfl_end): Free the DWFL itself.
696 2005-11-25 Roland McGrath <roland@redhat.com>
698 * dwfl_module_getdwarf.c (__libdwfl_module_getebl): New function.
700 * dwfl_module_register_names.c (dwfl_module_register_names): Likewise.
701 * libdwflP.h: Declare it.
703 * dwfl_module_register_names.c: New file.
704 * Makefile.am (libdwfl_a_SOURCES): Add it.
705 * libdwfl.h: Declare dwfl_module_register_names.
707 2005-11-21 Roland McGrath <roland@redhat.com>
709 * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
710 Don't leak malloc'd file name.
711 If a /sys/.../sections file is missing and starts with ".init",
712 try the variant with "_init" too; catches PPC64 kernel braindamage.
714 2005-11-15 Roland McGrath <roland@redhat.com>
716 * libdwfl.h: Comment fixes.
718 * dwfl_module_return_value_location.c: Add unlikely for error case.
720 2005-11-13 Roland McGrath <roland@redhat.com>
722 * dwfl_return_value_location.c: New file.
723 * Makefile.am (libdwfl_a_SOURCES): Add it.
724 * libdwfl.h: Declare dwfl_module_return_value_location.
725 * libdwflP.h (DWFL_ERRORS): Add DWFL_E_WEIRD_TYPE.
727 2005-10-20 Roland McGrath <roland@redhat.com>
729 * libdwflP.h (DWFL_ERRORS): New error UNKNOWN_MACHINE.
730 * relocate.c (__libdwfl_relocate): Return DWFL_E_UNKNOWN_MACHINE
731 instead of DWFL_E_BADRELTYPE if ebl_get_elfmachine yields EM_NONE.
733 2005-10-01 Roland McGrath <roland@redhat.com>
735 * linux-kernel-modules.c (report_kernel): Return ENOENT if we fail
738 2005-09-19 Roland McGrath <roland@redhat.com>
740 * linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use
741 PRIx64 instead of PRIi64, lest addresses with high bits set overflow
742 the signed integer reading; they will just have to be in hexadecimal.
743 (dwfl_linux_kernel_module_section_address): Likewise.
745 2005-08-28 Ulrich Drepper <drepper@redhat.com>
747 * Makefile.am (%.os): Use COMPILE.os.
748 (COMPILE.os): Filter out gconv options.
750 2005-08-25 Roland McGrath <roland@redhat.com>
752 * cu.c (__libdwfl_nextcu): Return success when dwarf_nextcu hits end.
753 * dwfl_nextcu.c (dwfl_nextcu): Skip modules with no dwarf info.
755 2005-08-24 Roland McGrath <roland@redhat.com>
757 * dwfl_lineinfo.c (dwfl_lineinfo): Add bias, don't subtract it.
759 * argp-std.c [_MUDFLAP] (__libdwfl_argp_mudflap_options): New function,
760 magic initializer to set -heur-stack-bound option.
762 2005-08-22 Roland McGrath <roland@redhat.com>
764 * dwfl_validate_address.c: New file.
765 * Makefile.am (libdwfl_a_SOURCES): Add it.
766 * libdwfl.h: Declare dwfl_validate_address.
768 * derelocate.c (dwfl_module_relocate_address): Add INTDEF.
769 * libdwflP.h: Add INTDECL.
771 * dwfl_module_getdwarf.c (find_symtab): Use elf_getdata instead of
772 elf_rawdata for symbol-related sections.
774 * offline.c (dwfl_report_offline): Move offline_next_address outside
775 module's range, in case it's an ET_EXEC using fixed segment locations.
776 * libdwfl.h: Update comment.
778 * dwfl_report_elf.c (dwfl_report_elf): Align BASE to first segment's
781 2005-08-20 Roland McGrath <roland@redhat.com>
783 * linux-kernel-modules.c (report_kernel): Take new argument PREDICATE,
784 function to choose whether to report.
785 (dwfl_linux_kernel_report_offline): Likewise.
786 * libdwfl.h: Update decl.
787 * argp-std.c (parse_opt): Update caller.
789 * dwfl_getsrclines.c: New file.
790 * dwfl_onesrcline.c: New file.
791 * Makefile.am (libdwfl_a_SOURCES): Add them.
792 * libdwfl.h: Declare dwfl_getsrclines, dwfl_onesrcline.
794 * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't leak
795 MODULESDIR[0]. Call fts_close on failure.
797 * dwfl_module_getdwarf.c (load_dw): Take dwfl_file * instead of Elf *.
798 Close ET_REL file descriptors after relocation.
799 (find_dw): Update caller.
800 * offline.c (dwfl_report_offline): Get the file into memory and close
803 * dwfl_module_getdwarf.c (find_debuginfo): Do nothing when
804 MOD->debug.elf is already set.
806 * find-debuginfo.c (try_open): Use TEMP_FAILURE_RETRY.
807 (dwfl_standard_find_debuginfo): Fail on errors not ENOENT or ENOTDIR.
809 * argp-std.c (options, parse_opt): Grok -K/--offline-kernel, use
810 dwfl_linux_kernel_report_offline with offline_callbacks.
812 * linux-kernel-modules.c (report_kernel): New function, broken out of
814 (dwfl_linux_kernel_report_kernel): ... here. Use it.
815 (dwfl_linux_kernel_report_offline): New function.
816 * libdwfl.h: Declare it.
817 * libdwflP.h: Add INTDECL.
819 2005-08-19 Roland McGrath <roland@redhat.com>
821 Use standard debuginfo search path to look for vmlinux.
822 * find-debuginfo.c (dwfl_standard_find_debuginfo): Don't check CRC if
824 * linux-kernel-modules.c (try_kernel_name): New function, broken out
826 (dwfl_linux_kernel_report_kernel): ... here. Use it.
828 * argp-std.c (offline_callbacks): New variable.
829 (parse_opt): Use it for -e. Allow multiple -e options.
831 * offline.c: New file.
832 * Makefile.am (libdwfl_a_SOURCES): Add it.
833 * libdwfl.h: Declare dwfl_offline_section_address, dwfl_report_offline.
834 * libdwflP.h: Add INTDECLs.
835 (OFFLINE_REDZONE): New macro.
836 (struct Dwfl): New member `offline_next_address'.
837 * dwfl_begin.c (dwfl_begin): Initialize it.
838 * dwfl_module.c (dwfl_report_begin): Likewise.
840 * dwfl_report_elf.c (dwfl_report_elf): Accept all types. When ET_REL,
841 do a nominal absolute section layout starting at BASE.
842 * libdwfl.h: Update comment.
844 2005-08-18 Roland McGrath <roland@redhat.com>
846 * dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Do
847 dwfl_module_getdwarf if necessary.
849 * dwfl_report_elf.c (dwfl_report_elf): Permit ET_REL with BASE==0.
850 * libdwfl.h: Update comment.
852 * derelocate.c: New file.
853 * Makefile.am (libdwfl_a_SOURCES): Add it.
855 * libdwflP.h (struct Dwfl_Module): isrel -> e_type.
856 * dwfl_report_elf.c (dwfl_report_elf): Initialize it.
857 * dwfl_module_getdwarf.c (open_elf): Update initialization.
858 (load_dw, dwfl_module_addrname): Update uses.
859 * relocate.c (__libdwfl_relocate): Likewise.
861 2005-08-04 Roland McGrath <roland@redhat.com>
863 * libdwfl.h (Dwfl_Callbacks.section_address): Take additional
864 arguments SHNDX, SHDR.
865 (dwfl_linux_kernel_module_section_address): Update prototype.
866 * relocate.c (__libdwfl_relocate_value): Update caller.
867 * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
868 Take the new arguments.
870 2005-08-10 Roland McGrath <roland@redhat.com>
872 * relocate.c (__libdwfl_relocate): Take argument DEBUGFILE,
873 use it instead of MOD->debug.file.
874 * libdwflP.h: Update decl.
875 * dwfl_module_getdwarf.c (load_dw): Update caller.
878 2005-08-09 Roland McGrath <roland@redhat.com>
880 * libdwflP.h: Include ../libdw/libdwP.h for its INTDECLs.
881 * cu.c: Use INTUSE on dwarf_* calls.
882 * dwfl_error.c: Likewise.
883 * dwfl_module.c: Likewise.
884 * dwfl_module_getdwarf.c: Likewise.
885 * dwfl_module_getsrc_file.c: Likewise.
888 2005-08-07 Roland McGrath <roland@redhat.com>
890 * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): When module
891 names contain '_' or '-', look for files named either "foo-bar.ko"
894 2005-07-29 Roland McGrath <roland@redhat.com>
896 * loc2c.c: File removed.
897 * loc2c.h: File removed.
898 * loc2c-runtime.h: File removed.
899 * test2.c: File removed.
900 * Makefile.am (EXTRA_DIST): Variable removed.
901 (noinst_HEADERS): Remove loc2c.h from here.
903 2005-07-28 Ulrich Drepper <drepper@redhat.com>
905 * libdwfl.h: Add a few missing extern for function prototypes.
907 * libdwfl_crc32.c: New file.
908 * libdwfl_crc32_file.c: New file.
909 * libdwflP.h: Declare the new functions.
910 * Makefile.am (libdwfl_a_SOURCES): Add libdwfl_crc32.c and
911 libdwfl_crc32_file.c.
912 * libdwfl/find-debuginfo.c (check_crc): Use __libdwfl_crc32_file
913 instead of crc32_file.
915 2005-07-28 Roland McGrath <roland@redhat.com>
917 * ptest.c: Moved to ../tests/dwflmodtest.c.
919 * Makefile.am (noinst_PROGRAMS): Variable removed.
920 (libdwfl_so_SOURCES, libdwfl_LIBS, libdwfl_so_LDADD): Likewise.
921 (EXTRA_DIST, ptest_LDADD, test2_LDADD): Likewise.
922 (libdwfl): Don't use libdwfl.so any more.
923 (libdwfl.so, install, uninstall): Targets removed.
924 (test2_SOURCES): Define EXTRA_DIST instead of this.
925 * libdwfl.map: File removed.
927 * libdwfl.h: Use "" for libdw.h #include.
929 2005-07-27 Roland McGrath <roland@redhat.com>
931 * libdwfl.map: Add dwfl_getmodules.
933 2005-07-23 Ulrich Drepper <drepper@redhat.com>
935 * Makefile.am: Fix rules to allow building with mudflap.
937 2005-07-21 Roland McGrath <roland@redhat.com>
939 * Makefile.am (noinst_HEADERS): Add loc2c.c.
941 * test2.c (main): Check sscanf result to quiet warning.
943 2005-07-20 Roland McGrath <roland@redhat.com>
945 * libdwfl-branch merged, creating this direcotry.