1 2014-08-14 Mark Wielaard <mjw@redhat.com>
3 * linux-kernel-modules.c (check-suffix): Also TRY .ko.xz.
5 2014-07-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7 Fix report_r_debug for prelinked libraries.
8 * link_map.c (report_r_debug): Comment out variable l_addr.
9 Use instead new variable base recalculated from l_ld.
11 2014-06-24 Kurt Roeckx <kurt@roeckx.be>
13 * linux-pid-attach.c: Make it build on non linux hosts.
15 2014-06-17 Mark Wielaard <mjw@redhat.com>
17 * frame_unwind.c (handle_cfi): Use ebl_func_addr_mask.
18 * dwfl_module_getsym.c (__libdwfl_getsym): Likewise.
20 2014-06-15 Mark Wielaard <mjw@redhat.com>
22 * linux-core-attach.c (core_memory_read): Use libdw/memory-access.h
23 macros read_4ubyte_unaligned_noncvt and read_8ubyte_unaligned_noncvt
24 to read possibly unaligned data.
25 (core_next_thread): Likewise.
26 (core_set_initial_registers): Likewise.
27 (dwfl_core_file_attach): Likewise.
29 2014-06-11 Mark Wielaard <mjw@redhat.com>
31 * dwfl_frame.c (__libdwfl_process_free): Reset dwfl->attacherr.
32 (dwfl_attach_state): Set dwfl->attacherr.
33 (dwfl_pid): Check and return dwfl->attacherr if set.
34 (dwfl_getthreads): Likewise.
35 (getthread): Likewise.
36 * libdwflP.h: Add DWFL_E_NO_CORE_FILE.
37 (struct Dwfl): Add attacherr field.
38 * linux-core-attach.c (dwfl_core_file_attach): Set dwfl->attacherr.
39 Don't assert if ELF file is not ET_CORE, just return error.
40 * linux-pid-attach.c (dwfl_linux_proc_attach): Set dwfl->attacherr.
42 2014-06-10 Mark Wielaard <mjw@redhat.com>
44 * argp-std.c (parse_opt): Ignore errors from dwfl_core_file_attach
45 or dwfl_linux_proc_attach.
47 2014-05-15 Mark Wielaard <mjw@redhat.com>
49 * linux-proc-maps.c (grovel_auxv): Close fd on error.
51 2014-05-02 Mark Wielaard <mjw@redhat.com>
53 * dwfl_module_getdwarf: Remove ENABLE_DWZ ifdefs so find_debug_altlink
56 2014-05-01 Mark Wielaard <mjw@redhat.com>
58 * libdwflP.h (struct Dwfl_Module): Add alt, alt_fd and alt_elf fields.
59 (__libdwfl_open_mod_by_build_id): Renamed __libdwfl_open_by_build_id.
60 (__libdwfl_open_by_build_id): New declaration that takes an explicit
62 * dwfl_build_id_find_debuginfo.c (dwfl_build_id_find_debuginfo): If
63 we already have the Dwarf then look for the alt dwz multi file by
65 * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Add the
66 build-id we are looking for as argument.
67 (__libdwfl_open_mod_by_build_id): New function, calls
68 __libdwfl_open_by_build_id.
69 (dwfl_build_id_find_elf): Call __libdwfl_open_mod_by_build_id.
70 * dwfl_module.c (__libdwfl_module_free): Release alt, alt_elf and
71 close alt_fd if necessary.
72 * dwfl_module_getdwarf.c (__check_build_id): Removed.
73 (try_debugaltlink): Removed.
74 (open_debugaltlink): Removed.
75 (open_elf_file): First half of open_elf that just opens the elf
76 file but doesn't setup the load address.
77 (open_elf): Call open_elf_file.
78 (find_debug_altlink): New function.
79 (load_dw): Remove loading of dwz multifile.
80 (find_dw): Call find_debug_altlink.
81 * find-debuginfo.c (validate): Handle alt debug case using
82 dwelf_dwarf_gnu_debugaltlink and mod->alt_elf.
83 (find_debuginfo_in_path): Handle alt debug files possibly in .dwz
85 * linux-kernel-modules.c (try_kernel_name): Use fakemod.debug.name
86 to store name to find by dwfl_standard_find_debuginfo instead of
87 allocating an extra variable on stack.
89 2014-04-30 Mark Wielaard <mjw@redhat.com>
91 * dwfl_module_build_id.c (__libdwfl_find_elf_build_id): Moved to
92 dwelf_elf_gnu_build_id.c.
93 (__libdwfl_find_build_id): Add assert to make sure mod is never NULL.
94 * dwfl_segment_report_module.c (dwfl_segment_report_module): Call
95 dwelf_elf_gnu_build_id directly instead of __libdwfl_find_build_id.
96 * dwfl_module_getdwarf.c (__check_build_id): Implement using
97 dwelf_elf_gnu_build_id.
99 2014-04-15 Florian Weimer <fweimer@redhat.com>
101 * dwfl_module_getdwarf.c (__check_build_id): Moved from libdw.
102 (try_debugaltlink): Likewise.
103 (open_debugaltlink): Likewise.
104 (load_dw): Locate alternate debug information using
105 dwelf_dwarf_gnu_debugaltlink and call open_debugaltlink.
107 2014-04-11 Mark Wielaard <mjw@redhat.com>
109 * Makefile.am (AM_CPPFLAGS): Add libdwelf.
110 * libdwflP.h: Include libdwelfP.h.
111 * dwfl_module_getdwarf.c (find_debuglink): Moved to libdwelf.
112 (find_debuginfo): Use dwelf_elf_gnu_debuglink.
114 2014-04-22 Mark Wielaard <mjw@redhat.com>
116 * frame_unwind.c (__libdwfl_frame_reg_get): Use uint64_t when
118 (__libdwfl_frame_reg_set): Likewise.
120 2014-04-22 Kurt Roeckx <kurt@roeckx.be>
122 * linux-pid-attach.c: Make linux only.
124 2014-03-14 Mark Wielaard <mjw@redhat.com>
126 * Makefile.am: Remove !MUDFLAP and MUDFLAP conditions.
127 Remove libelf and libdw definitions when MUDFLAP is defined.
128 * argp-std.c (__libdwfl_argp_mudflap_options): Removed.
130 2014-03-03 Mark Wielaard <mjw@redhat.com>
132 * elf-from-memory.c (elf_from_remote_memory): Keep track of
133 segments_end_mem. Pass memsz to first handle_segment pass. Only
134 extend contents_size and use shdrs if only file bits are in
137 2014-03-11 Josh Stone <jistone@redhat.com>
139 * dwfl_module_getdwarf.c (open_elf): Only explicitly set
140 mod->e_type when processing the main ELF file.
142 2014-03-04 Mark Wielaard <mjw@redhat.com>
144 * libdwflP.h (struct __libdwfl_pid_arg): Moved here and renamed from
145 linux-pid-attach.c (struct pid_arg).
146 (__libdwfl_get_pid_arg): New internal function declaration.
147 (__libdwfl_ptrace_attach): Likewise.
148 (__libdwfl_ptrace_detach): Likewise.
149 * dwfl_frame.c (dwfl_attach_state): Add "(deleted)" files to the
150 special exception modules that cannot be checked at this point.
151 * linux-pid-attach.c (struct pid_arg): Moved to libdwflP.h
152 (ptrace_attach): Renamed to...
153 (__libdwfl_ptrace_attach): New internal function.
154 (__libdwfl_ptrace_detach): Likewise. Extracted from ...
155 (pid_thread_detach): Call __libdwfl_ptrace_detach now.
156 (__libdwfl_get_pid_arg): New internal function.
157 * linux-proc-maps.c (dwfl_linux_proc_find_elf): Check if special
158 module name contains "(deleted)" and dwfl_pid gives an attached
159 pid. If pid is set and try to (re)use ptrace attach state of
160 process before reading memory.
162 2014-03-03 Mark Wielaard <mjw@redhat.com>
164 * elf-from-memory.c (elf_from_remote_memory): Take pagesize as
165 argument. Free buffer when detecting bad elf. Check PT_LOAD
166 alignment requirements on first handle_segment pass. Calculate
167 loadbase, start and end of segment using pagesize, not p_align.
168 * linux-proc-maps.c (dwfl_linux_proc_find_elf): Provide pagesize
169 to elf_from_remote_memory.
171 2014-02-26 Mark Wielaard <mjw@redhat.com>
173 * linux-proc-maps.c (proc_maps_report): Don't assert on bad input.
175 2014-02-26 Mark Wielaard <mjw@redhat.com>
177 * elf-from-memory.c (elf_from_remote_memory): Check against p64
178 p_type in case ELFCLASS64, not against p32 p_type.
180 2014-01-17 Petr Machata <pmachata@redhat.com>
182 * relocate.c (relocate_section): Use gelf_fsize instead of relying
185 2014-01-05 Mark Wielaard <mjw@redhat.com>
187 * frame_unwind.c (handle_cfi): Only skip resetting return register
188 if the regno is not the actual CIE return address register.
190 2014-01-02 Mark Wielaard <mjw@redhat.com>
192 * linux-pid-attach.c (dwfl_linux_proc_attach): Use strtol, not atoi.
194 2013-12-30 Mark Wielaard <mjw@redhat.com>
196 * argp-std.c (parse_opt): Call dwfl_linux_proc_attach and
197 dwfl_core_file_attach explicitly.
198 * core-file.c (dwfl_core_file_report): Don't call
199 __libdwfl_attach_state_for_core implicitly.
200 * dwfl_begin.c (dwfl_begin): Remove setting of process_attach_error.
201 * dwfl_frame.c (dwfl_pid): Set errno to DWFL_E_NO_ATTACH_STATE, not
202 process_attach_error.
203 (dwfl_getthreads): Likewise.
204 (getthread): Likewise.
205 * libdwfl.h (dwfl_core_file_report): Update documentation.
206 (dwfl_linux_proc_report): Likewise.
207 (dwfl_core_file_attach): New function declaration.
208 (dwfl_linux_proc_attach): Likewise.
209 * libdwflP.h (struct Dwfl): Remove process_attach_error.
210 (__libdwfl_attach_state_for_pid): Removed declaration.
211 (__libdwfl_attach_state_for_core): Likewise.
212 (dwfl_core_file_attach): New internal declaration.
213 (dwfl_linux_proc_attach): Likewise.
214 (attach_state_for_core): Renamed to...
215 (dwfl_core_file_attach): ...this. Change return type.
216 (__libdwfl_attach_state_for_core): Removed.
217 * linux-pid-attach.c (struct pid_arg): Add assume_ptrace_stopped.
218 (pid_set_initial_registers): Check assume_ptrace_stopped before
220 (pid_thread_detach): Likewise.
221 (__libdwfl_attach_state_for_pid): Renamed to...
222 (dwfl_linux_proc_attach): ...this. Adjust return type.
223 * linux-proc-maps.c (dwfl_linux_proc_report): Don't call
224 __libdwfl_attach_state_for_pid implicitly.
226 2013-12-28 Mark Wielaard <mjw@redhat.com>
228 * linux-proc-maps.c (dwfl_linux_proc_find_elf): Don't return special
229 character device files, only regular files.
231 2013-12-24 Mark Wielaard <mjw@redhat.com>
233 * linux-core-attach.c (core_next_thread): Check whether thread_argp
234 is NULL. Reset core_arg->thread_note_offset and malloc a thread_arg
235 in that case. Free thread_arg if there are no more threads.
237 2013-12-23 Mark Wielaard <mjw@redhat.com>
239 * dwfl_segment_report_module.c (dwfl_segment_report_module): Free
240 build_id before returning early.
242 2013-12-23 Mark Wielaard <mjw@redhat.com>
244 * linux-pid-attach.c (__libdwfl_attach_state_for_pid): Report actual
245 pid (thread group leader) to dwfl_attach_state.
247 2013-12-21 Mark Wielaard <mjw@redhat.com>
249 * frame_unwind.c (handle_cfi): Track whether the return register
250 has been set and only allow it to be set once.
252 2013-12-20 Mark Wielaard <mjw@redhat.com>
254 * dwfl_frame.c (one_arg): New struct.
255 (get_one_thread_cb): New function.
256 (dwfl_getthread): Likewise.
257 (one_thread): New struct.
258 (get_one_thread_frames_cb): New function.
259 (dwfl_getthread_frames): Likewise.
260 * libdwfl.h (Dwfl_Thread_Callbacks): Add get_thread function.
261 (dwfl_getthread_frames): Likewise.
262 * libdwflP.h (dwfl_getthread_frames): New internal function declaration.
263 * linux-core-attach.c (core_thread_callbacks): Initialize get_thread
265 * linux-pid-attach.c (pid_getthread): New function.
266 (pid_thread_callbacks): Initialize get_thread to pid_getthread.
268 2013-12-20 Mark Wielaard <mjw@redhat.com>
270 * linux-kernel-modules.c (report_kernel_archive): Correct nested
271 asprintf result check for debug.a.
273 2013-12-18 Mark Wielaard <mjw@redhat.com>
275 * derelocate.c (__libdwfl_find_section_ndx): New internal function.
276 * dwfl_module_addrname.c (dwfl_module_addrname): Use
277 dwfl_module_addrinfo.
278 * dwfl_module_addrsym.c (dwfl_module_addrsym_elf): Replace with...
279 (__libdwfl_addrsym): ...this. Use __libdwfl_getsym, use value
280 for comparisons, not st_value. Fill in off. Search for both value
281 and the (adjusted) sym.st_value when different.
282 (dwfl_module_addrsym): Implement using __libdwfl_addrsym.
283 (dwfl_module_addrinfo): New function.
284 * dwfl_module_getsym.c (dwfl_module_getsym_elf): Replace with...
285 (__libdwfl_getsym): ...this. Use ebl_resolve_sym_value if requested
286 and possible. Adjust sym->st_value only when requested. Fill in addr
288 (dwfl_module_getsym_info): New function.
289 (dwfl_module_getsym): Use __libdwfl_getsym.
290 * libdwfl.h (dwfl_module_getsym_elf): Removed.
291 (dwfl_module_getsym_info): New function declaration.
292 (dwfl_module_addrinfo): Likewise.
293 (dwfl_module_addrsym): Add documentation describing differences
294 with addrinfo variants.
295 (dwfl_module_addrsym_elf): Removed.
296 * libdwflP.h (__libdwfl_getsym): New internal function declaration.
297 (__libdwfl_addrsym): Likewise.
298 (__libdwfl_find_section_ndx): Likewise.
299 (dwfl_module_addrinfo): New internal declaration.
300 (dwfl_module_getsym_info): Likewise.
301 (dwfl_module_addrsym_elf): Removed.
302 (dwfl_module_getsym_elf): Likewise.
304 2013-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
306 * argp-std.c (offline_find_elf): Remove.
307 (offline_callbacks): Use dwfl_build_id_find_elf instead.
308 * dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Move here the code
311 2013-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
313 unwinder: s390 and s390x
314 * dwfl_frame_pc.c (dwfl_frame_pc): Call ebl_normalize_pc.
315 * frame_unwind.c (new_unwound): New function from ...
316 (handle_cfi): ... here. Call it.
317 (setfunc, getfunc, readfunc): New functions.
318 (__libdwfl_frame_unwind): Call ebl_unwind with those functions.
319 * linux-core-attach.c (core_set_initial_registers): Always iterate
320 through the Ebl_Register_Location loop. Call
321 dwfl_thread_state_register_pc there.
323 2013-12-17 Jan Kratochvil <jan.kratochvil@redhat.com>
325 * frame_unwind.c (handle_cfi): Call ebl_dwarf_to_regno for RA.
327 2013-12-17 Mark Wielaard <mjw@redhat.com>
329 * linux-pid-attach.c (pid_next_thread): Call rewinddir on first
332 2013-12-16 Mark Wielaard <mjw@redhat.com>
334 * libdwfl.h (dwfl_module_getsymtab_first_global): New function
336 * dwfl_module_getdwarf.c (dwfl_module_getsymtab_first_global): New
338 * libdwflP.h (dwfl_module_getsymtab_first_global): New internal
340 * dwfl_module_addrsym.c (dwfl_module_addrsym_elf): Use new function.
342 2013-12-14 Mark Wielaard <mjw@redhat.com>
344 * dwfl_module.c (__libdwfl_module_free): Free mod->reloc_info if
345 allocated. Call dwarf_cfi_end on mod->eh_cfi if necessary.
346 * frame_unwind.c (handle_cfi): Free frame result from
347 dwarf_cfi_addrframe when done.
349 2013-12-15 Jan Kratochvil <jan.kratochvil@redhat.com>
351 unwinder: ppc and ppc64
352 * frame_unwind.c (__libdwfl_frame_reg_get, __libdwfl_frame_reg_set):
353 Call ebl_dwarf_to_regno.
354 * linux-core-attach.c (core_set_initial_registers): Implement
356 * linux-pid-attach.c (pid_thread_state_registers_cb): Implement
359 2013-11-30 Jan Kratochvil <jan.kratochvil@redhat.com>
361 Introduce process_attach_error.
362 * dwfl_begin.c (dwfl_begin): Initialize process_attach_error.
363 * dwfl_frame.c (dwfl_pid, dwfl_getthreads): Use PROCESS_ATTACH_ERROR if
365 * libdwflP.h (struct Dwfl): New field process_attach_error.
366 * linux-core-attach.c (__libdwfl_attach_state_for_core): Rename to ...
367 (attach_state_for_core): ... here, make it static, change return type,
368 no longer use __libdwfl_seterrno.
369 (__libdwfl_attach_state_for_core): New wrapper for it.
371 2013-11-27 Mark Wielaard <mjw@redhat.com>
373 * dwfl_module_addrsym.c (dwfl_module_addrsym): Rename to and call...
374 (dwfl_module_addrsym_elf): this. Add elfp and biasp arguments,
375 keep track of symelf, addr_symelf, closest_elf and sizeless_elf
376 instead of tracking dwfl_files.
377 * dwfl_module_getsym.c (__libdwfl_module_getsym): Renamed to...
378 (dwfl_module_getsym_elf): ...this. Remove dwfl_file argument, add
379 new elfp and biasp arguments. Track elf instead of file.
380 (dwfl_module_getsym): Call dwfl_module_getsym_elf.
381 dwfl_module_info.c (dwfl_module_info): Pass elf to
382 dwfl_adjusted_st_value.
383 * libdwfl.h (dwfl_module_getsym): Document limitations of shndx.
384 (dwfl_module_getsym_elf): New function declaration.
385 (dwfl_module_addrsym_elf): Likewise.
386 * libdwflP.h (dwfl_module_addrsym_elf): INTDECL.
387 (dwfl_module_getsym_elf): Likewise.
388 (dwfl_adjusted_st_value): Take and check elf not dwfl_file.
389 (dwfl_deadjust_st_value): Likewise.
390 (__libdwfl_module_getsym): Removed.
391 * relocate.c (resolve_symbol): Pass elf to dwfl_adjusted_st_value.
393 2013-11-21 Jan Kratochvil <jan.kratochvil@redhat.com>
395 Fix non-build-id core files on build-id system.
396 * link_map.c (report_r_debug): Remove valid clearing if build-id cannot
399 2013-11-21 Jan Kratochvil <jan.kratochvil@redhat.com>
401 * dwfl_segment_report_module.c (dwfl_segment_report_module): New
402 variable close_elf. Call __libdwfl_find_elf_build_id and compare the
403 content, if possible.
405 2013-11-21 Jan Kratochvil <jan.kratochvil@redhat.com>
407 link_map: Use proper bias, not l_addr.
408 * core-file.c (dynamic_vaddr_get): Rename to ...
409 (__libdwfl_dynamic_vaddr_get): ... here, make it global,
411 (dwfl_core_file_report): Update name in the caller.
412 * libdwflP.h (__libdwfl_dynamic_vaddr_get): New declaration.
413 * link_map.c (report_r_debug): New variable elf_dynamic_vaddr. Call
414 __libdwfl_dynamic_vaddr_get for it. Remove L_ADDR FIXME comment.
415 Use ELF_DYNAMIC_VADDR instead of L_ADDR.
417 2013-11-19 Jan Kratochvil <jan.kratochvil@redhat.com>
419 Compatibility with older kernels such as RHEL-6.
420 * linux-pid-attach.c (struct pid_arg): New field tid_was_stopped.
421 (ptrace_attach): New parameter tid_was_stoppedp. Set it.
422 (pid_set_initial_registers): Pass tid_was_stopped.
423 (pid_thread_detach): Use tid_was_stopped.
425 2013-11-18 Josh Stone <jistone@redhat.com>
427 * dwfl_module_getdwarf.c (find_aux_address_sync): New function.
428 (find_aux_sym): Use it.
430 2013-11-14 Jan Kratochvil <jan.kratochvil@redhat.com>
432 Code cleanup: Remove const in prototype
433 * dwfl_frame_regs.c (dwfl_thread_state_registers): Remove const from
435 * libdwfl.h (dwfl_thread_state_registers): Likewise.
436 * linux-pid-attach.c (pid_thread_state_registers_cb): Likewise.
438 2013-11-14 Jan Kratochvil <jan.kratochvil@redhat.com>
440 Fix dwfl_attach_state machine->elf.
441 * dwfl_frame.c (dwfl_attach_state): Change parameter machine to elf.
442 Call ebl_openbackend instead of ebl_openbackend_machine.
443 * libdwfl.h (dwfl_attach_state): Change parameter machine to elf.
444 Update the function description.
445 * linux-core-attach.c (__libdwfl_attach_state_for_core): Pass CORE to
447 * linux-pid-attach.c (__libdwfl_attach_state_for_pid): Pass NULL to
450 2013-11-06 Jan Kratochvil <jan.kratochvil@redhat.com>
452 Provide __libdwfl_module_getsym to get dwfl_file *.
453 * dwfl_module_addrsym.c (dwfl_module_addrsym) (i_to_symfile): Remove.
454 (dwfl_module_addrsym) (search_table): New variable file. Use
455 __libdwfl_module_getsym. Use file.
456 * dwfl_module_getsym.c (dwfl_module_getsym): Rename to ...
457 (__libdwfl_module_getsym): ... here. Add parameter filep. Set it.
458 (dwfl_module_getsym): New wrapper.
459 * libdwflP.h (__libdwfl_module_getsym): New declaration.
461 2013-11-13 Jan Kratochvil <jan.kratochvil@redhat.com>
463 Fix dwfl_module_addrsym for minidebuginfo.
464 * dwfl_module_addrsym.c (dwfl_module_addrsym): New variable
466 (dwfl_module_addrsym) (same_section): Use it.
467 (dwfl_module_addrsym) (i_to_symfile): New function.
468 (dwfl_module_addrsym) (search_table): Use it.
470 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
471 Mark Wielaard <mjw@redhat.com>
473 * Makefile.am (libdwfl_a_SOURCES): Add dwfl_frame.c, frame_unwind.c,
474 dwfl_frame_pc.c, linux-pid-attach.c, linux-core-attach.c and
476 * core-file.c (dwfl_core_file_report): Call
477 __libdwfl_attach_state_for_core.
478 * dwfl_end.c (dwfl_end): Call __libdwfl_process_free.
479 * dwfl_frame.c: New file.
480 * frame_unwind.c: New file.
481 * dwfl_frame_pc.c: New file.
482 * linux-pid-attach.c: New file.
483 * linux-core-attach.c: New file.
484 * dwfl_frame_regs.c: New file.
485 * libdwfl.h (Dwfl_Thread, Dwfl_Frame): New typedefs.
486 (dwfl_core_file_report, dwfl_linux_proc_report): Extend comments.
487 (Dwfl_Thread_Callbacks): New definition.
488 (struct ebl, dwfl_attach_state, dwfl_pid, dwfl_thread_dwfl)
489 (dwfl_thread_tid, dwfl_frame_thread, dwfl_thread_state_registers)
490 (dwfl_thread_state_register_pc, dwfl_getthreads, dwfl_thread_getframes)
491 (dwfl_frame_pc): New declarations.
492 * libdwflP.h (Dwfl_Process): New typedef.
493 (LIBEBL_BAD, CORE_MISSING, INVALID_REGISTER, PROCESS_MEMORY_READ)
494 (PROCESS_NO_ARCH, PARSE_PROC, INVALID_DWARF, UNSUPPORTED_DWARF)
495 (NEXT_THREAD_FAIL, ATTACH_STATE_CONFLICT, NO_ATTACH_STATE, NO_UNWIND)
496 (INVALID_ARGUMENT): New DWFL_ERROR entries.
497 (struct Dwfl): New entry process.
498 (struct Dwfl_Process, struct Dwfl_Thread, struct Dwfl_Frame)
499 (__libdwfl_frame_reg_get, __libdwfl_frame_reg_set)
500 (__libdwfl_process_free, __libdwfl_frame_unwind)
501 (__libdwfl_attach_state_for_pid, __libdwfl_attach_state_for_core)
502 (__libdwfl_segment_start, __libdwfl_segment_end): New declarations.
503 (dwfl_attach_state, dwfl_pid, dwfl_thread_dwfl, dwfl_thread_tid)
504 (dwfl_frame_thread, dwfl_thread_state_registers)
505 (dwfl_thread_state_register_pc, dwfl_getthreads, dwfl_thread_getframes)
506 (dwfl_frame_pc): New INTDECL entries.
507 * linux-proc-maps.c (dwfl_linux_proc_report): Call
508 __libdwfl_attach_state_for_pid.
509 * segment.c (segment_start): Rename to ...
510 (__libdwfl_segment_start): ... here and make it internal_function.
511 (segment_end): Rename to ...
512 (__libdwfl_segment_end): ... here and make it internal_function.
513 (reify_segments, dwfl_report_segment): Rename them at the callers.
515 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
517 * core-file.c (dwfl_core_file_report): Remove the use of MAX.
519 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
521 * core-file.c (dwfl_core_file_report): Replaced variable sniffed by
522 retval. Fix one forgotten LISTED increase.
524 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
526 Fix core files for re-prelink-ed files.
527 * core-file.c (dynamic_vaddr_get): New function.
528 (dwfl_core_file_report): New variable file_dynamic_vaddr. Call
529 dynamic_vaddr_get instead of using L_ADDR.
530 * libdwflP.h (struct r_debug_info_module): Remove field l_addr.
531 * link_map.c (report_r_debug): Do not initialize l_addr.
533 2013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
536 * core-file.c (dwfl_core_file_report): Reindent block of code by
539 2013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
541 * argp-std.c (parse_opt): Use executable parameter of
542 dwfl_core_file_report.
543 * core-file.c (dwfl_core_file_report): Add parameter executable. Set
544 it to DWFL. Add NEW_VERSION for it.
545 (_compat_without_executable_dwfl_core_file_report): New. Twice.
546 * libdwfl.h (dwfl_core_file_report): Add parameter executable, update
547 the function comment.
549 2013-10-15 Mark Wielaard <mjw@redhat.com>
551 * linux-proc-maps.c (proc_maps_report): Ignore non-absolute file
553 (dwfl_linux_proc_find_elf): Don't abort, just return failure.
555 2013-09-12 Mark Wielaard <mjw@redhat.com>
557 * cu.c (intern_cu): If dwarf_offdie fails free cu.
559 2013-09-12 Mark Wielaard <mjw@redhat.com>
561 * linux-proc-maps.c (proc_maps_report): Don't fclose FILE in
564 2013-09-12 Mark Wielaard <mjw@redhat.com>
566 * dwfl_module_getdwarf.c (find_symtab): Call elf_getdata with
567 aux_xndxscn, not xndxscn, for aux_symxndxdata.
569 2013-08-25 Mark Wielaard <mjw@redhat.com>
571 * linux-kernel-modules.c (report_kernel): Pass add_p_vaddr as true
574 2013-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
576 * dwfl_segment_report_module.c (dwfl_segment_report_module): Check for
577 conflicts all the modules, not just the first one. Compare L_LD if it
578 is equal, not if it is in a module address range.
580 2013-07-23 Jan Kratochvil <jan.kratochvil@redhat.com>
582 * libdwflP.h (__libdwfl_elf_address_range): Add internal_function.
584 2013-07-23 Jan Kratochvil <jan.kratochvil@redhat.com>
586 * core-file.c (clear_r_debug_info): Close also ELF and FD.
587 (dwfl_core_file_report): Call __libdwfl_report_elf for
589 * dwfl_report_elf.c (__libdwfl_elf_address_range): New function from
591 (__libdwfl_report_elf): ... this function. Call it.
592 * dwfl_segment_report_module.c: Include unistd.h.
593 (dwfl_segment_report_module): Use basename for MODULE->NAME.
594 Clear MODULE if it has no build-id and we have segment with build-id.
595 Ignore this segment only if MODULE still contains valid ELF.
596 * libdwflP.h (__libdwfl_elf_address_range): New declaration.
597 (struct r_debug_info_module): New fields fd, elf, l_addr, start, end
598 and disk_file_has_build_id.
599 (dwfl_link_map_report): Extend the comment.
600 * link_map.c (report_r_debug): Extend the comment. Always fill in new
601 r_debug_info_module. Initialize also the new r_debug_info_module
602 fields. Remove one FIXME comment. Call __libdwfl_elf_address_range
603 instead of __libdwfl_report_elf when R_DEBUG_INFO is not NULL.
605 2013-07-19 Jan Kratochvil <jan.kratochvil@redhat.com>
607 * libdwflP.h (__libdwfl_find_elf_build_id): Add internal_function.
609 2013-07-02 Mark Wielaard <mjw@redhat.com>
611 * relocate.c (__libdwfl_relocate_value): Remove mod->e_type assert.
613 2013-06-05 Mark Wielaard <mjw@redhat.com>
615 * link_map.c (report_r_debug): Always call release_buffer after
616 memory_callback succeeded reading build_id.
618 2013-05-30 Jan Kratochvil <jan.kratochvil@redhat.com>
620 * argp-std.c (parse_opt) <ARGP_KEY_SUCCESS> <opt->core> <opt->e>: Set
621 executable_for_core before calling dwfl_core_file_report.
622 * core-file.c (clear_r_debug_info): New function.
623 (dwfl_core_file_report): Move raw segments reporting lower. New
624 variable r_debug_info, pass it to dwfl_segment_report_module. Call
625 clear_r_debug_info in the end. Return sum of LISTED and SNIFFED.
626 * dwfl_module_build_id.c (check_notes): Move into
627 __libdwfl_find_elf_build_id.
628 (__libdwfl_find_build_id): Rename to ...
629 (__libdwfl_find_elf_build_id): ... here. Add parameters build_id_bits,
630 build_id_elfaddr and build_id_len. Verify MOD vs. ELF.
631 (__libdwfl_find_elf_build_id) (check_notes): Remove parameters mod and
632 set, rename data_vaddr to data_elfaddr. Do not call found_build_id.
633 (__libdwfl_find_elf_build_id): Update the check_notes caller, do not
634 adjust its data_elfaddr parameter.
635 (__libdwfl_find_build_id): New wrapper of __libdwfl_find_elf_build_id.
636 * dwfl_segment_report_module.c (dwfl_segment_report_module): New
637 parameter r_debug_info. New variable name_is_final. Adjust addresses
638 according to R_DEBUG_INFO->MODULE. Check conflicts against DWFL.
639 Do not overwrite NAME by SONAME if NAME_IS_FINAL.
640 * libdwflP.h (__libdwfl_find_elf_build_id): New declaration.
641 (struct r_debug_info_module, struct r_debug_info): New definitions.
642 (dwfl_segment_report_module, dwfl_link_map_report): Add parameter
644 * link_map.c: Include fcntl.h.
645 (report_r_debug): Add parameter r_debug_info, describe it in the
646 function comment. Delete dwfl_addrmodule call and its dependent code.
647 Verify build-id before calling dwfl_report_elf, also supply
648 executable_for_core to it. Store r_debug_info->module info when
650 (dwfl_link_map_report): Add parameter r_debug_info. New variable
651 in_ok. Try to read IN from EXECUTABLE_FOR_CORE. Update report_r_debug
654 2013-04-30 Jan Kratochvil <jan.kratochvil@redhat.com>
656 * dwfl_report_elf.c (__libdwfl_report_elf): Add parameter add_p_vaddr.
657 Set it to true for ET_EXEC and ET_CORE. Provide alternative
658 setup of START and BIAS if !ADD_P_VADDR. Set END from BIAS, not BASE.
659 (dwfl_report_elf): Add parameter add_p_vaddr. Pass it down. Add
661 (_compat_without_add_p_vaddr_dwfl_report_elf) <SHARED>: New, with
663 * libdwfl.h (dwfl_report_elf): Add parameter add_p_vaddr. Describe it.
664 * libdwflP.h (__libdwfl_report_elf): Add parameter add_p_vaddr.
665 * link_map.c (report_r_debug): Use true add_p_vaddr for dwfl_report_elf.
666 * linux-kernel-modules.c (report_kernel): Use false add_p_vaddr for
668 * offline.c (process_elf): Use true add_p_vaddr for dwfl_report_elf.
670 2013-04-27 Mark Wielaard <mjw@redhat.com>
672 * link_map.c: #include system.h.
674 2013-04-26 Jan Kratochvil <jan.kratochvil@redhat.com>
676 * link_map.c (BE32, BE64, LE32, LE64): Delete the definitions, move
677 them to lib/system.h.
679 2013-04-24 Mark Wielaard <mjw@redhat.com>
681 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
683 2013-03-20 Jan Kratochvil <jan.kratochvil@redhat.com>
685 * dwfl_report_elf.c (__libdwfl_report_elf): Remove BASE aligning.
687 2013-03-12 Mark Wielaard <mjw@redhat.com>
689 * dwfl_getsrclines.c (dwfl_getsrclines): Return 0 on success.
691 2013-02-22 Mark Wielaard <mjw@redhat.com>
693 * open.c (__libdw_gunzip,__libdw_bunzip2,__libdw_unlzma): Define
694 as DWFL_E_BADELF when not used.
696 2013-02-10 Mark Wielaard <mjw@redhat.com>
698 * argp-std.c (parse_opt): Use opt->core and opt->e explicitly in
699 failure messages When handling ARGP_KEY_SUCCESS because arg will
702 2013-01-30 Jan Kratochvil <jan.kratochvil@redhat.com>
704 * linux-proc-maps.c: Include system.h.
705 (PROCEXEFMT, get_pid_class): New.
706 (grovel_auxv): Detect 32-bit vs. 64-bit auxv, possibly call
709 2013-01-23 Mark Wielaard <mjw@redhat.com>
711 * dwfl_module_getdwarf.c (find_aux_sym): Don't substract one
712 from aux_syments by default.
713 (find_symtab): Also succeed when only aux_symdata is found.
714 When no symtab is found always try to load auxiliary table.
715 (dwfl_module_getsymtab): Substract one from result when both
717 * dwfl_module_getsym.c (dwfl_module_getsym): Only skip auxiliary
718 zero entry when both tables have symbols.
719 * dwfl_module_addrsym.c (dwfl_module_addrsym): Only substract
720 one from first_global when both tables have symbols.
722 2013-01-16 Mark Wielaard <mjw@redhat.com>
724 * libdwflP.h (struct Dwfl_Module): Add aux_sym, aux_symdata,
725 aux_syments, aux_symstrdata, aux_symxndxdata and aux_first_global.
726 (dwfl_adjusted_aux_sym_addr): New function.
727 (dwfl_deadjust_aux_sym_addr): Likewise.
728 (dwfl_adjusted_st_value): Take and check symfile argument.
729 (dwfl_deadjust_st_value): Likewise.
730 * dwfl_module_getdwarf.c (find_prelink_address_sync): Take and
731 use dwfl_file as argument to set address_sync.
732 (find_debuginfo): Call find_prelink_address_sync with debug file.
733 (find_aux_sym): New function.
734 (find_symtab): Use find_aux_sym if all we have is the dynsym table
735 and fill in aux DwflModule fields.
736 (dwfl_module_getsymtab): Return syments plus aux_syments.
737 (load_symtab): Always set first_global.
738 * dwfl_module_addrsym.c (dwfl_module_addrsym): Check symfile
739 when using same_section. Calculate first_global based on both
740 mod->first_global and mod->aux_first_global.
741 * dwfl_module.c (__libdwfl_module_free): Free aux_sym.
742 * dwfl_module_getsym.c (dwfl_module_getsym): Use auxsym table
743 to retrieve symbol and name if necessary, making sure all locals
744 from any table come before any globals.
745 * dwfl_module_info.c (dwfl_module_info): Call dwfl_adjusted_st_value
747 * relocate.c (resolve_symbol): Likewise.
749 2013-01-07 Roland McGrath <roland@hack.frob.com>
751 * link_map.c (auxv_format_probe): Handle unaligned 64-bit data, but
752 still assume the data is at least 32-bit aligned anyway.
753 (dwfl_link_map_report): Handle unaligned auxv data.
755 2012-12-11 Mark Wielaard <mjw@redhat.com>
757 * linux-kernel-modules.c (report_kernel): Only free fname if
758 find_kernel_elf succeeds and allocates it.
759 (report_kernel_archive): Fix brackets around unlikely expression.
761 2012-11-29 Jan Kratochvil <jan.kratochvil@redhat.com>
763 * argp-std.c: Update Copyright year.
764 (offline_find_elf): New function.
765 (offline_callbacks): Use it for find_elf.
766 (struct parse_opt): New.
767 (parse_opt): New key ARGP_KEY_INIT. In other make hook struct
768 parse_opt pointer from former Dwfl pointer. Delay 'e and OPT_COREFILE
769 processing till ARGP_KEY_SUCCESS. Initialize state->input already from
770 ARGP_KEY_SUCCESS. Modify the cleanup in ARGP_KEY_ERROR. Make the
771 final state->input initialization optional.
772 * dwfl_end.c: Update Copyright year.
773 (dwfl_end): Free executable_for_core.
774 * libdwflP.h: Update Copyright year.
775 (struct Dwfl): New field executable_for_core.
777 2012-11-20 Jan Kratochvil <jan.kratochvil@redhat.com>
779 * dwfl_report_elf.c (__libdwfl_report_elf): Simplify START and BIAS
782 2012-10-17 Jan Kratochvil <jan.kratochvil@redhat.com>
784 * dwfl_module_getdwarf.c (mod_verify_build_id): New function with code
786 (__libdwfl_getelf): ... here. Call it.
788 2012-10-17 Jan Kratochvil <jan.kratochvil@redhat.com>
790 * libdwfl.h (dwfl_module_getelf): Add __nonnull_attribute__.
792 2012-10-10 Jan Kratochvil <jan.kratochvil@redhat.com>
794 * dwfl_segment_report_module.c (dwfl_segment_report_module):
795 Initialize mod->MAIN_BIAS.
797 2012-10-10 Jan Kratochvil <jan.kratochvil@redhat.com>
799 * dwfl_module_addrsym.c (dwfl_module_addrsym): New function
800 binding_value. Use it for both zero and non-zero size symbols
803 2012-10-01 Mark Wielaard <mjw@redhat.com>
805 * cu.c (cudie_offset): Don't use type_sig8, it might not be
806 initialized and these are always real CUs, never TUs.
808 2012-10-01 Mark Wielaard <mjw@redhat.com>
810 * derelocate.c (find_section): Check next section exists before
813 2012-08-01 Petr Machata <pmachata@redhat.com>
815 * offline.c (process_archive_member): Ignore entry "/SYM64/".
817 2012-03-28 Roland McGrath <roland@hack.frob.com>
819 * dwfl_segment_report_module.c
820 (dwfl_segment_report_module: read_portion): Don't use existing buffer
821 when FILESZ is zero (string mode) and available portion doesn't hold
824 2011-12-02 Roland McGrath <roland@hack.frob.com>
826 * elf-from-memory.c (elf_from_remote_memory): Fix ELFCLASS64 case
827 to use elf64_xlatetom and PHDRS.p64.
828 Reported by Serge Pavlov <serge.pavlov.at.gnu@gmail.com>.
830 2011-11-31 Mark Wielaard <mjw@redhat.com>
832 * dwfl_module_addrsym.c (dwfl_module_addrsym): First search all
833 global symbols. Then only when that doesn't provide a match search
834 all local symbols too.
835 * dwfl_module_getdwarf.c (load_symtab): Take first_global int arg
837 (find_symtab): Initialize mod->first_global and pass it to load_symtab.
838 * libdwfl/libdwflP.h (Dwfl_Module): Add first_global field.
840 2011-11-31 Mark Wielaard <mjw@redhat.com>
842 * dwfl_module_addrsym.c (dwfl_module_addrsym): Only update
843 sizeless_sym if needed and closer to desired addr.
845 2011-10-20 Mark Wielaard <mjw@redhat.com>
847 * derelocate.c (cache_sections): Intern mod->reloc_info check.
848 (dwfl_module_relocations): Don't check mod->reloc_info.
849 (dwfl_module_relocation_info): Likewise.
850 (find_section): Likewise.
852 2011-07-09 Roland McGrath <roland@hack.frob.com>
854 * image-header.c (LE32): Macro removed (now in lib/system.h).
856 2011-04-11 Mark Wielaard <mjw@redhat.com>
858 * linux-kernel-modules.c (vmlinux_suffixes): Guard definition
859 by check for zlib, bzlib or lzma defines to check it isn't empty.
860 (try_kernel_name): Use same guard for use of vmlinux_suffixes.
862 2011-03-08 Roland McGrath <roland@redhat.com>
864 * dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL.
865 Reported by Kurt Roeckx <kurt@roeckx.be>.
867 2011-02-11 Roland McGrath <roland@redhat.com>
869 * linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz
870 suffixes if corresponding decompression support is enabled.
872 2011-02-01 Roland McGrath <roland@redhat.com>
874 * dwfl_module_getdwarf.c (find_prelink_address_sync): Use the
875 section-end address as the synchronization point, rather than sh_addr.
877 * dwfl_module_getdwarf.c (find_prelink_address_sync): Discover
878 PT_INTERP p_vaddr separately from main phdrs and undo phdrs.
880 * dwfl_module_getdwarf.c (find_prelink_address_sync): Fix pasto in
881 last change, so we recognize PT_INTERP in ELFCLASS64 correctly.
883 2011-01-11 Roland McGrath <roland@redhat.com>
885 * dwfl_module_getdwarf.c (open_elf): Remove section-based
886 address_sync fixup from here.
887 (find_prelink_address_sync): New function.
888 (find_debuginfo): Call it.
889 * libdwflP.h (DWFL_ERRORS): Add BAD_PRELINK error.
891 2011-01-04 Roland McGrath <roland@redhat.com>
893 * dwfl_module_getdwarf.c (open_elf): Enhance address_sync calculation
894 logic to consider section addresses, the better to survive all the
895 possible prelink machinations.
896 * libdwflP.h (struct dwfl_file): Comment change.
898 2010-11-30 Roland McGrath <roland@redhat.com>
900 * derelocate.c (dwfl_module_relocations): Remove over-eager assert.
902 2010-11-12 Roland McGrath <roland@redhat.com>
904 * libdwflP.h (struct Dwfl_Module): New member main_bias.
905 (dwfl_adjusted_address, dwfl_deadjust_address): Use it.
906 * dwfl_module_getdwarf.c (__libdwfl_getelf): Initialize it.
908 * libdwflP.h (dwfl_deadjust_address): New function.
909 (dwfl_deadjust_dwarf_addr, dwfl_deadjust_st_value): New functions.
910 * cu.c (addrarange): Use dwfl_deadjust_dwarf_addr.
911 * dwfl_module_addrsym.c: Use dwfl_deadjust_st_value.
913 2010-11-11 Roland McGrath <roland@redhat.com>
915 * libdwflP.h (struct dwfl_file): Remove bias member.
916 Add vaddr and address_sync members instead.
917 (dwfl_adjusted_address): Calculate using vaddr.
918 (dwfl_adjusted_dwarf_addr): Calculate using address_sync and call that.
919 (dwfl_adjusted_st_value): Use one of those calls.
920 * dwfl_module_getdwarf.c (open_elf): Initialize vaddr and address_sync.
921 * dwfl_segment_report_module.c (dwfl_segment_report_module): Likewise.
922 * derelocate.c (dwfl_module_relocations): Update ET_EXEC assertions.
923 * link_map.c (consider_executable): Adjust only MOD->low_addr for
924 detected PIE bias change.
926 * libdwflP.h (dwfl_adjusted_dwarf_addr): New function.
927 * dwfl_module_info.c: Use it.
928 * cu.c (addrarange): Likewise.
929 * dwfl_dwarf_line.c: Likewise.
930 * dwfl_module_dwarf_cfi.c: Likewise.
931 * dwfl_lineinfo.c: Likewise.
932 * dwfl_nextcu.c: Likewise.
933 * dwfl_module_getdwarf.c (dwfl_module_getdwarf): Likewise.
935 * libdwflP.h (dwfl_adjusted_st_value): New function.
936 * relocate.c (resolve_symbol): Use it.
937 * dwfl_module_getsym.c: Likewise.
938 * dwfl_module_addrsym.c: Likewise.
939 * dwfl_module_info.c: Likewise.
941 * libdwflP.h (dwfl_adjusted_address): New function.
942 * dwfl_module_build_id.c (__libdwfl_find_build_id): Use it.
943 * relocate.c (__libdwfl_relocate_value): Likewise.
944 * derelocate.c (cache_sections): Likewise.
945 (dwfl_module_address_section): Likewise.
946 * dwfl_module_getelf.c: Likewise.
947 * dwfl_module_eh_cfi.c: Likewise.
948 * link_map.c (consider_executable): Likewise.
950 2010-08-24 Roland McGrath <roland@redhat.com>
952 * dwfl_dwarf_line.c: New file.
953 * Makefile.am (libdwfl_a_SOURCES): Add it.
955 2010-08-18 Roland McGrath <roland@redhat.com>
957 * link_map.c (report_r_debug): Use found name if we have no name,
958 even if we already have an Elf handle.
960 2010-06-30 Roland McGrath <roland@redhat.com>
962 * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't be
963 confused by -1 return from dwfl_build_id_find_elf after it opened
965 * find-debuginfo.c (dwfl_standard_find_debuginfo): Likewise for
966 dwfl_build_id_find_debuginfo.
968 2010-06-16 Roland McGrath <roland@redhat.com>
970 * cu.c (cudie_offset): Use DIE_OFFSET_FROM_CU_OFFSET macro.
972 2010-06-14 Roland McGrath <roland@redhat.com>
974 * find-debuginfo.c (try_open): Take new arg MAIN_STAT. Compare
975 candidate file to that st_dev/st_ino and pretend it didn't exist
977 (find_debuginfo_in_path): Update caller, pass main file's info.
979 2010-05-20 Roland McGrath <roland@redhat.com>
981 * linux-proc-maps.c (find_sysinfo_ehdr): Renamed to ...
982 (grovel_auxv): ... this. Take DWFL argument.
983 (dwfl_linux_proc_report): Update caller.
985 * dwfl_module_getdwarf.c (open_elf): Calculate alignment for bias
986 based on dwfl->segment_align or manifest alignment of MOD->low_addr.
988 2010-05-19 Roland McGrath <roland@redhat.com>
990 * linux-kernel-modules.c (intuit_kernel_bounds): Rewritten.
992 2010-05-06 Roland McGrath <roland@redhat.com>
994 * segment.c (insert): Clear inserted elements of DWFL->lookup_module.
996 * libdwflP.h (DWFL_ERRORS): Add WRONG_ID_ELF.
997 * dwfl_build_id_find_elf.c: Set MOD->main.valid when there is a build
998 ID but we didn't find a file.
999 * dwfl_module_getdwarf.c (__libdwfl_getelf): When that's set, check
1000 and refuse any fallback file-by-name if it lacks the matching ID.
1002 * dwfl_error.c (dwfl_errno): Add INTDEF.
1003 * libdwflP.h: Add INTDECL.
1005 * dwfl_module_getdwarf.c (open_elf): Do elf_end and clear FILE->elf in
1008 2010-05-04 Roland McGrath <roland@redhat.com>
1010 * dwfl_segment_report_module.c: Use "[pie]" rather than "[dso]" for an
1011 ET_DYN that has a DT_DEBUG.
1013 * dwfl_segment_report_module.c: Fix jump-start of NDX-finding loop.
1015 * segment.c (insert): Fix moving of values following insertion.
1016 (reify_segments): Fix up MOD->segment backpointer indices after
1017 later insertions in the main loop invalidate them.
1019 * link_map.c (dwfl_link_map_report): Detect bias of embedded phdrs and
1020 apply it to PT_DYNAMIC p_vaddr so we handle a PIE correctly.
1022 * core-file.c (dwfl_core_file_report): Return any nonzero count of
1023 modules reported, even if link_map grovelling failed and only sniffing
1026 2010-04-26 Roland McGrath <roland@redhat.com>
1028 * relocate.c (relocate_section): Treat R_*_NONE reloc as no reloc.
1029 Works around probably-wrong ld -r behavior for case of a DWARF address
1030 constant that refers to a discarded SHF_ALLOC section.
1032 2010-04-14 Roland McGrath <roland@redhat.com>
1034 * link_map.c (report_r_debug): Limit iterations on the l_next chain to
1035 an upper bound on sane possible number of elements.
1037 2010-03-11 Roland McGrath <roland@redhat.com>
1039 * link_map.c (auxv_format_probe): Fix scanning loop, so we really scan
1040 the second half for 32-bit matches.
1042 2010-03-10 Roland McGrath <roland@redhat.com>
1044 * core-file.c (dwfl_core_file_report): Punt EHDR argument.
1045 * argp-std.c (parse_opt): Update caller.
1046 * libdwfl.h: Declare dwfl_core_file_report.
1047 * libdwflP.h: Don't.
1049 2010-02-17 Roland McGrath <roland@redhat.com>
1051 * dwfl_segment_report_module.c (addr_segndx): Take new flag argument.
1052 If set, find the first index not below ADDR.
1053 (dwfl_segment_report_module): Update callers.
1054 Pass true when calculating return value.
1056 2010-02-15 Roland McGrath <roland@redhat.com>
1058 * Makefile.am: Use config/eu.am for common stuff.
1060 * find-debuginfo.c (find_debuginfo_in_path): Fix uninitialized
1061 variable in failure path.
1063 2010-02-02 Mark Wielaard <mjw@redhat.com>
1065 * dwfl_module_dwarf_cfi.c (dwfl_module_dwarf_cfi): Always set bias.
1066 * dwfl_module_eh_cfi.c (dwfl_module_eh_cfi): Likewise
1068 2010-01-07 Roland McGrath <roland@redhat.com>
1070 * core-file.c (dwfl_core_file_report): Use elf_getphdrnum.
1071 * dwfl_module_build_id.c (__libdwfl_find_build_id): Likewise.
1072 * dwfl_module_getdwarf.c (open_elf, find_dynsym): Likewise.
1073 * dwfl_report_elf.c (__libdwfl_report_elf): Likewise.
1075 2010-01-06 Roland McGrath <roland@redhat.com>
1077 * relocate.c (relocate_getsym): For SHN_COMMON, zero st_value.
1078 (relocate_section): Let unresolved SHN_COMMON symbol stay 0.
1080 2009-11-16 Roland McGrath <roland@redhat.com>
1082 * relocate.c (relocate_section): Skip SHT_NOBITS or empty target scn.
1084 2009-11-12 Petr Machata <pmachata@redhat.com>
1086 * core-file.c (dwfl_elf_phdr_memory_callback): Only load ahead if
1087 the chunk is both offset-contiguous and vaddr-contiguous.
1089 2009-11-05 Roland McGrath <roland@redhat.com>
1091 * link_map.c (report_r_debug): Skip entries with l_ld==0.
1092 Use dwfl_addrmodule for l_ld lookup, don't bail on lookup failure.
1094 2009-09-04 Roland McGrath <roland@redhat.com>
1096 * image-header.c (__libdw_image_header): Fix tranposed comparison.
1098 2009-08-27 Roland McGrath <roland@redhat.com>
1100 * image-header.c: New file.
1101 * Makefile.am (libdwfl_a_SOURCES): Add it.
1102 * libdwflP.h: Declare __libdw_image_header.
1103 * open.c (decompress): Don't consume ELF on failure.
1104 (what_kind): New function, broken out of ...
1105 (__libdw_open_file): ... here. Call it.
1106 If it fails, try __libdw_image_header and then try what_kind again.
1108 * gzip.c (unzip): Reuse *WHOLE as first INPUT_BUFFER,
1109 leave it behind for next decompressor.
1110 * open.c (decompress): Free BUFFER on failure.
1112 2009-08-26 Roland McGrath <roland@redhat.com>
1114 * gzip.c (find_zImage_payload): New function, broken out of ...
1115 (mapped_zImage): ... here. Call it.
1116 (find_zImage_payload) [LZMA]: Match LZMA-compressed kernels with
1117 stupid method of just trying the decoder.
1119 * open.c [USE_LZMA]: Try __libdw_unlzma.
1120 * libdwflP.h: Declare it.
1121 (DWFL_ERRORS): Add DWFL_E_LZMA.
1122 * gzip.c [LZMA]: Implement liblzma version for XZ file format.
1124 * Makefile.am [LZMA] (libdwfl_a_SOURCES): Add it.
1126 * gzip.c (mapped_zImage): Limit scan to 32kb.
1127 Make this unconditional, support bzip2 kernel images too.
1128 (unzip): Use direct inflate method for non-mmap case too.
1129 Only zlib uses the stream method.
1131 2009-08-09 Roland McGrath <roland@redhat.com>
1133 * dwfl_module_build_id.c: Use new macros for versioned definitions.
1135 2009-07-08 Roland McGrath <roland@redhat.com>
1137 * dwfl_module_dwarf_cfi.c: New file.
1138 * dwfl_module_eh_cfi.c: New file.
1139 * Makefile.am (libdwfl_a_SOURCES): Add them.
1140 * libdwflP.h (struct Dwfl_Module): New members `dwarf_cfi', `eh_cfi.
1141 Add INTDECL for dwfl_module_eh_cfi, dwfl_module_dwarf_cfi.
1143 2009-07-08 Roland McGrath <roland@redhat.com>
1145 * libdwflP.h (struct Dwfl_Module): Reorder members to pack better.
1147 2009-06-18 Mark Wielaard <mjw@redhat.com>
1149 * dwfl_report_elf.c (__libdwfl_report_elf): Return NULL on overlap.
1151 2009-06-13 Ulrich Drepper <drepper@redhat.com>
1153 * derelocate.c: Don't use deprecated libelf functions.
1154 * dwfl_module_getdwarf.c: Likewise.
1155 * relocate.c: Likewise.
1157 2009-04-23 Ulrich Drepper <drepper@redhat.com>
1159 * dwfl_module_build_id.c: Define versioned symbols only if SHARED is
1160 defined. Otherwise just define the latest version.
1162 2009-04-22 Roland McGrath <roland@redhat.com>
1164 * relocate.c (resolve_symbol): Apply correct bias to st_value found in
1165 a non-ET_REL module.
1167 * dwfl_module_build_id.c (__libdwfl_find_build_id): Fix last change to
1168 adjust properly for non-ET_REL.
1170 2009-04-21 Roland McGrath <roland@redhat.com>
1172 * dwfl_module_getsym.c: Apply non-ET_REL bias only if SHF_ALLOC.
1174 * relocate.c (__libdwfl_relocate_value): Assert that MOD is ET_REL.
1175 * derelocate.c (cache_sections): Call __libdwfl_relocate_value only
1177 * dwfl_module_build_id.c (__libdwfl_find_build_id): Likewise.
1179 2009-04-20 Roland McGrath <roland@redhat.com>
1181 * dwfl_module_getdwarf.c (__libdwfl_getelf): Add internal_function.
1183 2009-04-19 Roland McGrath <roland@redhat.com>
1185 * dwfl_module_getdwarf.c (find_file): Renamed to ...
1186 (__libdwfl_getelf): ... this. Make it global.
1187 (find_symtab, find_dw): Update callers.
1188 (dwfl_module_getelf): Functions moved ...
1189 * dwfl_module_getelf.c: ... here, new file.
1190 * Makefile.am (libdwfl_a_SOURCES): Add it.
1191 * libdwflP.h: Declare __libdwfl_getelf.
1193 2009-04-14 Roland McGrath <roland@redhat.com>
1195 * dwfl_segment_report_module.c: Handle DT_STRTAB value being either
1196 absolute (already adjusted in place) or needing load bias adjustment.
1198 * core-file.c (dwfl_elf_phdr_memory_callback): Fix return value for
1199 gelf_getphdr failure. Fix file size limit checks.
1201 * dwfl_segment_report_module.c: Fix underflow in DYNSTRSZ check.
1203 2009-04-08 Roland McGrath <roland@redhat.com>
1205 * dwfl_module_getsym.c: Don't adjust for bias again after
1206 __libdwfl_relocate_value.
1208 * relocate.c (__libdwfl_relocate_value): Don't adjust a value from
1209 a non-SHF_ALLOC section.
1210 (relocate_getsym): Test st_shndx for SHN_* values, not *SHNDX.
1211 * dwfl_module_getsym.c (dwfl_module_getsym): Likewise.
1213 2009-03-09 Roland McGrath <roland@redhat.com>
1215 * dwfl_module_build_id.c (__libdwfl_find_build_id): Move SHSTRNDX
1216 variable to outer scope, so we cache it for the loop.
1218 * relocate.c (__libdwfl_relocate_value): Add MOD->main.bias to sh_addr.
1220 2009-02-12 Roland McGrath <roland@redhat.com>
1222 * dwfl_module_build_id.c (__libdwfl_find_build_id): Use
1223 __libdwfl_relocate_value to find correct sh_addr value.
1225 2009-02-10 Roland McGrath <roland@redhat.com>
1227 * dwfl_report_elf.c (__libdwfl_report_elf): Take new arg SANITY.
1228 If false, don't fail for NO_PHDR.
1229 (dwfl_report_elf): Update caller.
1230 * libdwflP.h: Update decl.
1231 * offline.c (process_elf): Call it with false, so we don't refuse
1232 dubiously-formed objects here.
1234 * link_map.c (consider_executable): Don't assert dwfl_addrsegment
1235 finds our module. We shouldn't crash when we confuse some guesses.
1237 2009-02-10 Ulrich Drepper <drepper@redhat.com>
1239 * open.c (decompress): Avoid crash with empty input file.
1241 2009-01-27 Roland McGrath <roland@redhat.com>
1243 * dwfl_report_elf.c (__libdwfl_report_elf): Ignore trailing PT_LOAD
1244 with zero vaddr and memsz.
1246 2009-01-22 Roland McGrath <roland@redhat.com>
1248 * open.c (decompress): Move BUFFER, SIZE decls outside #if.
1250 * dwfl_segment_report_module.c (addr_segndx): Remove bogus adjustments
1251 after address-matching loop.
1253 * segment.c (lookup): Fix fencepost in checking for HINT match.
1255 2009-01-14 Roland McGrath <roland@redhat.com>
1257 * gzip.c [!BZLIB] (mapped_zImage): New function.
1258 (unzip) [!BZLIB]: Grok Linux kernel zImage format.
1260 2009-01-10 Ulrich Drepper <drepper@redhat.com>
1262 * dwfl_error.c: Always use __thread. Remove all !USE_TLS code.
1264 2009-01-08 Roland McGrath <roland@redhat.com>
1266 * linux-kernel-modules.c (dwfl_linux_kernel_report_offline):
1267 Skip subdirectory named "source".
1268 (dwfl_linux_kernel_find_elf): Likewise.
1270 2009-01-06 Roland McGrath <roland@redhat.com>
1272 * linux-kernel-modules.c (check_suffix): New function.
1273 Match ".ko", ".ko.gz", and ".ko.bz2" suffixes.
1274 (dwfl_linux_kernel_report_offline): Use it.
1275 (dwfl_linux_kernel_find_elf): Likewise.
1277 2009-01-05 Roland McGrath <roland@redhat.com>
1279 * argp-std.c (parse_opt): Use __libdw_open_file for core file.
1280 * dwfl_build_id_find_debuginfo.c: Use it to open the file.
1281 * dwfl_build_id_find_elf.c: Likewise.
1282 * dwfl_module_getdwarf.c (open_elf): Likewise.
1283 * dwfl_report_elf.c: Likewise.
1284 * find-debuginfo.c (validate): Likewise.
1285 * offline.c (__libdwfl_report_offline): Likewise.
1287 * libdwflP.h: Declare __libdw_open_file.
1289 * Makefile.am (libdwfl_a_SOURCES): Add it.
1292 * Makefile.am [ZLIB] (libdwfl_a_SOURCES): Add it.
1293 * bzip2.c: New file.
1294 * Makefile.am [BZLIB] (libdwfl_a_SOURCES): Add it.
1295 * libdwflP.h: Declare __libdw_gunzip, __libdw_bunzip2.
1297 2008-12-16 Roland McGrath <roland@redhat.com>
1299 * dwfl_module_build_id.c (dwfl_module_build_id): Define with alias and
1300 symver magic to bind to ELFUTILS_0.138.
1301 (_BUG_COMPAT_dwfl_module_build_id): New function, bug compatible
1302 wrapper for ELFUTILS_0.130 version set.
1304 2008-12-18 Roland McGrath <roland@redhat.com>
1306 * derelocate.c (dwfl_module_relocate_address): Fix last fix: ET_DYN
1307 addresses are taken as relative to MOD->low_addr.
1309 2008-12-15 Roland McGrath <roland@redhat.com>
1311 * derelocate.c (dwfl_module_relocate_address): Apply main.bias, not
1314 2008-12-11 Roland McGrath <roland@redhat.com>
1316 * offline.c (process_archive): Don't call elf_end and close if
1317 returning NULL. Check first elf_begin call and set error code
1318 specially for empty archive.
1321 2008-12-02 Roland McGrath <roland@redhat.com>
1323 * dwfl_getmodules.c (dwfl_getmodules): Typo fix in last change.
1325 2008-11-26 Roland McGrath <roland@redhat.com>
1327 * dwfl_getmodules.c (dwfl_getmodules): Encode iteration style in
1328 return value, and interpret encoded OFFSET argument.
1330 2008-10-07 Roland McGrath <roland@redhat.com>
1332 * dwfl_module_build_id.c (check_notes): Fix typo in vaddr calculation.
1334 2008-09-29 Roland McGrath <roland@redhat.com>
1336 * segment.c (insert): Must realloc DWFL->lookup_module here too.
1337 (dwfl_report_segment): Clear DWFL->lookup_module before insert calls.
1339 2008-08-28 Roland McGrath <roland@redhat.com>
1341 * segment.c (reify_segments): Fix last change.
1343 2008-08-27 Roland McGrath <roland@redhat.com>
1345 * linux-proc-maps.c (read_proc_memory): Return 0 for EINVAL or EPERM
1346 failure from pread64.
1348 2008-08-26 Roland McGrath <roland@redhat.com>
1350 * segment.c (reify_segments): Insert a trailing segment for a module
1351 end that is above the highest current segment.
1353 2008-08-25 Roland McGrath <roland@redhat.com>
1355 * dwfl_module_getdwarf.c (open_elf): Extract elf_errno () for
1356 coded return value, not plain DWFL_E_LIBELF. Return DWFL_E_BADELF
1357 if FILE->elf is not ELF_K_ELF.
1359 * dwfl_segment_report_module.c: Add a cast.
1361 2008-08-21 Denys Vlasenko <dvlasenk@redhat.com>
1363 * dwfl_module_addrsym.c (dwfl_module_addrsym): Improve logic
1364 which decides which symbol is "closest" to a given address.
1366 2008-08-15 Roland McGrath <roland@redhat.com>
1368 * argp-std.c (offline_callbacks): Use dwfl_build_id_find_elf.
1369 (options, parse_opt): Handle --core.
1371 * core-file.c: New file.
1372 * Makefile.am (libdwfl_a_SOURCES): Add it.
1373 * libdwflP.h (dwfl_core_file_report): Declare it.
1375 * link_map.c: New file.
1376 * Makefile.am (libdwfl_a_SOURCES): Add it.
1377 * libdwflP.h (dwfl_link_map_report): Declare it.
1379 * libdwflP.h (MIN, MAX): New macros.
1380 (Dwfl_Memory_Callback): New typedef.
1381 (Dwfl_Module_Callback): New typedef.
1382 (dwfl_segment_report_module): Declare it.
1383 * dwfl_segment_report_module.c: New file.
1384 * Makefile.am (libdwfl_a_SOURCES): Add it.
1386 * derelocate.c (dwfl_module_address_section): Add INTDEF.
1387 * libdwflP.h: Add INTDECL.
1389 * segment.c: New file.
1390 * Makefile.am (libdwfl_a_SOURCES): Add it.
1391 * libdwfl.h: Declare dwfl_addrsegment, dwfl_report_segment.
1392 * libdwflP.h (struct Dwfl): New members lookup_elts, lookup_alloc,
1393 lookup_addr, lookup_module, lookup_segndx, replace removed members
1395 (struct Dwfl_Module): New member segment.
1396 * dwfl_end.c (dwfl_end): Free the new ones. Iterate via modulelist
1397 to each free module.
1398 * dwfl_module.c (dwfl_report_begin_add): Do nothing.
1399 (dwfl_report_begin): Don't call it. Truncate the segment table instead.
1400 (dwfl_report_module): Don't touch DWFL->nmodules.
1401 (dwfl_report_end): Don't touch DWFL->modules and DWFL->nmodules.
1402 (compare_modules): Function removed.
1403 * dwfl_getmodules.c: Rewritten.
1405 * libdwflP.h: Add INTDECLs.
1406 * dwfl_getdwarf.c: Rewritten to call dwfl_getmodules.
1407 * dwfl_addrmodule.c: Rewritten to just call dwfl_addrsegment.
1409 2008-08-03 Roland McGrath <roland@redhat.com>
1411 * linux-kernel-modules.c: Include <fts.h> before <config.h>.
1413 2008-07-17 Roland McGrath <roland@redhat.com>
1415 * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Set errno to
1416 zero if the failure was only ENOENT.
1418 2008-06-03 Roland McGrath <roland@redhat.com>
1420 * dwfl_module_addrsym.c (dwfl_module_addrsym): Exclude undefined
1423 2008-05-22 Petr Machata <pmachata@redhat.com>
1425 * dwfl_module_getdwarf.c (open_elf): Bias of ET_EXEC files is always 0.
1427 2008-05-06 Roland McGrath <roland@frob.com>
1429 * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Use
1430 FTS_LOGICAL here too.
1431 (dwfl_linux_kernel_find_elf): Likewise.
1433 2008-04-29 Roland McGrath <roland@redhat.com>
1435 * find-debuginfo.c (dwfl_standard_find_debuginfo): Try path search
1436 based on canonicalize_file_name if it differs from the supplied name.
1438 * linux-kernel-modules.c (check_module_notes): Use FTS_LOGICAL so
1441 2008-04-27 Roland McGrath <roland@redhat.com>
1443 * linux-kernel-modules.c (report_kernel): Fix crash when
1444 dwfl_report_elf fails.
1446 2008-04-05 Roland McGrath <roland@redhat.com>
1448 * linux-proc-maps.c (proc_maps_report): Don't leak LAST_FILE.
1450 * dwfl_module_getdwarf.c (find_file): Always free build_id_bits.
1451 Clear it after freeing.
1452 * dwfl_module_report_build_id.c (dwfl_module_report_build_id): Likewise.
1454 2008-03-26 Roland McGrath <roland@redhat.com>
1456 * dwfl_module_getdwarf.c (load_symtab): Don't return success for
1457 SHT_DYNSYM, just set *SYMSCN like the comment says.
1459 * dwfl_end.c (dwfl_end): Iterate on modulelist chain, not modules array.
1461 * argp-std.c (parse_opt): On failure, call dwfl_end before argp_failure.
1463 2008-03-19 Roland McGrath <roland@redhat.com>
1465 * dwfl_module_getsrc.c: Adjust address for module bias before search.
1467 2008-03-01 Roland McGrath <roland@redhat.com>
1469 * libdwflP.h (__libdwfl_seterrno): Remove parameter name from
1470 prototype to avoid older compiler's complaint about reuse of the name.
1471 (__libdwfl_canon_error): Likewise.
1473 2008-02-19 Roland McGrath <roland@redhat.com>
1475 * relocate.c (relocate_section): Check for an unhandled relocation
1476 type before resolving a reloc's symbol. Lift DWFL_E_BADRELTYPE ->
1477 DWFL_E_UNKNOWN_MACHINE check out of loops.
1479 * dwfl_module_getdwarf.c (load_dw): Skip relocation if
1480 DEBUGFILE->relocated is already set.
1482 2008-01-26 Roland McGrath <roland@redhat.com>
1484 * dwfl_module_getdwarf.c (open_elf): Open FILE->name if it's non-null.
1486 * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Don't clear
1487 incoming *FILE_NAME at the start.
1489 2008-01-08 Roland McGrath <roland@redhat.com>
1491 * Makefile.am (euinclude): Variable removed.
1492 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1494 2007-10-23 Roland McGrath <roland@redhat.com>
1496 * linux-kernel-modules.c (report_kernel_archive): Reorder the kernel
1497 module to appear first.
1499 2007-10-20 Roland McGrath <roland@redhat.com>
1501 * offline.c (process_archive_member): Take FD argument, pass it down
1502 to process_file. Return Elf_Cmd, not bool.
1503 Call elf_next here, always before elf_end.
1504 (process_archive): Update caller. Don't close FD here unless there
1507 * dwfl_module.c (free_file): Close fd only when elf_end returns zero.
1509 * libdwflP.h (struct dwfl_file): New bool member `relocated'.
1510 * dwfl_module_getdwarf.c (dwfl_module_getelf): For ET_REL, apply
1511 partial relocation to one or both files.
1512 (dwfl_module_getdwarf): For ET_REL, make sure extra sections'
1513 relocations have been applied to the debug file if dwfl_module_getelf
1514 has been used before.
1516 * relocate.c (resolve_symbol): New function.
1517 (relocate_section): Call it.
1519 * relocate.c (relocate_getsym): Handle null MOD->symfile.
1520 (relocate_section): Take new bool arg, PARTIAL. If true,
1521 no error for BADRELTYPE/RELUNDEF, instead just skip them
1522 and leave only those skipped relocs behind the reloc section.
1523 (__libdwfl_relocate_section): Take new arg, pass it down.
1524 (__libdwfl_relocate): Take new bool arg, DEBUG. If false,
1525 do partial relocation on all sections.
1526 * dwfl_module_getdwarf.c (load_dw): Update caller.
1527 * libdwflP.h: Update decls.
1528 * derelocate.c (dwfl_module_address_section): Pass new argument
1529 to __libdwfl_relocate_section, true.
1531 * derelocate.c (cache_sections): Don't cache reloc sections when
1532 section_address callback is null.
1534 2007-10-19 Roland McGrath <roland@redhat.com>
1536 * relocate.c (relocate_section): Fix fencepost error in r_offset check.
1538 * derelocate.c (struct dwfl_relocation): Add member `relocs'.
1539 (struct secref): Likewise.
1540 (cache_sections): Cache the relocation section referring to each
1541 section we cache, if any.
1542 (dwfl_module_address_section): Use __libdwfl_relocate_section as
1545 * relocate.c (struct reloc_symtab_cache): New type.
1546 (relocate_getsym): Use it instead of four arguments.
1547 (__libdwfl_relocate): Update caller.
1548 (relocate_section): New function, broken out of ...
1549 (__libdwfl_relocate): ... here.
1550 (__libdwfl_relocate_section): New function.
1551 * libdwflP.h: Declare it.
1553 2007-10-17 Roland McGrath <roland@redhat.com>
1555 * dwfl_module_getsym.c (dwfl_module_getsym): Apply MOD->symfile->bias
1556 to relocated st_value.
1558 * dwfl_report_elf.c (__libdwfl_report_elf): Align initial BASE for
1561 2007-10-16 Roland McGrath <roland@redhat.com>
1563 * dwfl_report_elf.c (__libdwfl_report_elf): Readjust BASE when a later
1564 section has larger alignment requirements not met by the original BASE,
1565 rather than padding more between sections.
1567 * dwfl_report_elf.c (__libdwfl_report_elf): Fix bias calculation.
1569 * dwfl_module_build_id.c (__libdwfl_find_build_id): Apply module bias
1572 * dwfl_report_elf.c (__libdwfl_report_elf): Don't be confused by BASE
1573 at zero in ET_REL case. Adjust BASE to necessary alignment.
1575 * dwfl_module_build_id.c (check_notes): Take -1, not 0, as stub value
1577 (__libdwfl_find_build_id): Update caller.
1579 * relocate.c (__libdwfl_relocate_value): Don't use sh_offset.
1580 * dwfl_report_elf.c (__libdwfl_report_elf): Likewise.
1581 * offline.c (dwfl_offline_section_address): Bail early if there is
1582 separate debug file.
1584 * relocate.c (__libdwfl_relocate): Don't return DWFL_E_NO_DWARF.
1586 2007-10-09 Roland McGrath <roland@redhat.com>
1588 * dwfl_report_elf.c (__libdwfl_report_elf): Clear SHDR->sh_offset when
1589 caching SHDR->sh_addr = 0.
1590 * offline.c (dwfl_offline_section_address): Never called for sh_addr
1591 really at 0, don't check for it. Use MOD->debug directly, not symfile.
1593 * dwfl_module_getdwarf.c (load_symtab): Return success properly when
1594 we've found SHT_SYMTAB.
1596 * relocate.c (relocate_getsym): New function.
1597 (__libdwfl_relocate): Use it.
1598 (__libdwfl_relocate_value): Take new Elf * argument. Make SYMSHSTRNDX
1599 be a pointer instead of value; cache getshstrndx result there.
1600 * libdwflP.h: Update decl.
1601 * derelocate.c (cache_sections): Update caller.
1602 Always work on the main file, not the symfile.
1603 (dwfl_module_address_section): Likewise.
1604 * dwfl_module_getsym.c (dwfl_module_getsym): Update caller.
1606 2007-10-07 Roland McGrath <roland@redhat.com>
1608 * offline.c (process_archive): Initialize MOD.
1610 * linux-kernel-modules.c (get_release): New function, broken out of ...
1611 (report_kernel): ... here. Call it.
1612 (try_kernel_name): Take new arg TRY_DEBUG, only try ".debug" if set.
1613 (find_kernel_elf): Update caller.
1614 (report_kernel_archive): New function.
1615 (dwfl_linux_kernel_report_offline): Call it.
1617 * offline.c (process_file): Take new arg PREDICATE, pass it down.
1618 (process_archive): Likewise.
1619 (process_archive_member): Likewise. When nonnull, let the predicate
1620 decide whether to use this member.
1621 (__libdwfl_report_offline): New function, broken out of ...
1622 (dwfl_report_offline): ... here. Call it.
1623 * libdwflP.h: Declare it.
1625 * offline.c (process_archive, process_archive_member): New functions.
1626 (process_elf, process_file): New functions, broken out of ...
1627 (dwfl_report_offline): ... here. Call process_file, which recurses on
1630 * dwfl_report_elf.c (__libdwfl_report_elf): New, broken out of ...
1631 (dwfl_report_elf): ... here. Call it.
1632 * libdwflP.h: Declare it.
1634 2007-10-06 Roland McGrath <roland@redhat.com>
1636 * derelocate.c (dwfl_module_relocations): Don't call
1637 dwfl_module_getdwarf.
1639 * derelocate.c (find_section): Use __libdwfl_seterrno, not
1642 * relocate.c (__libdwfl_relocate_value): Abuse sh_offset, not
1643 SHF_ALLOC, to cache sh_addr resolved to 0.
1645 * dwfl_report_elf.c (dwfl_report_elf): When an ET_REL file has sh_addr
1646 values nonzero already, just use its existing layout.
1648 * relocate.c (__libdwfl_relocate): Clear size of reloc section in its
1649 in-core shdr after applying it.
1651 2007-10-04 Ulrich Drepper <drepper@redhat.com>
1653 * linux-kernel-modules.c (dwfl_linux_kernel_report_kernel): Fake
1654 initialization of notes variable.
1656 2007-10-04 Roland McGrath <roland@redhat.com>
1658 * linux-kernel-modules.c (intuit_kernel_bounds): Take new arg NOTES,
1659 fill in with vaddr of "__start_notes" symbol if found.
1660 (check_notes): New function.
1661 (check_kernel_notes): New function.
1662 (dwfl_linux_kernel_report_kernel): Call it.
1663 (check_module_notes): New function.
1664 (dwfl_linux_kernel_report_modules): Call it.
1666 * linux-kernel-modules.c (dwfl_linux_kernel_find_elf):
1667 Try dwfl_build_id_find_elf first.
1669 * linux-kernel-modules.c (report_kernel): Don't leak FD if !REPORT.
1670 Set kernel module e_type to ET_DYN.
1672 2007-10-03 Roland McGrath <roland@redhat.com>
1674 * find-debuginfo.c (validate): New function, broken out of ...
1675 (find_debuginfo_in_path): ... here. New function, broken out of ...
1676 (dwfl_standard_find_debuginfo): ... here. Call it, after trying
1677 dwfl_build_id_find_debuginfo first.
1679 * dwfl_build_id_find_elf.c: New file.
1680 * dwfl_build_id_find_debuginfo.c: New file.
1681 * Makefile.am (libdwfl_a_SOURCES): Add them.
1682 * libdwfl.h: Declare them.
1683 * libdwflP.h: Add INTDECLs.
1685 * dwfl_module_build_id.c: New file.
1686 * dwfl_module_report_build_id.c: New file.
1687 * Makefile.am (libdwfl_a_SOURCES): Add them.
1688 * libdwfl.h: Declare them.
1689 * libdwflP.h (struct Dwfl_Module): New members build_id_bits,
1690 build_id_len, build_id_vaddr. Declare __libdwfl_find_build_id.
1691 * dwfl_module.c (__libdwfl_module_free): Free MOD->build_id_bits.
1693 * dwfl_module_getdwarf.c (find_offsets): New function.
1694 (find_dynsym): New function, calls that.
1695 (find_symtab): Call it.
1697 2007-09-11 Roland McGrath <roland@redhat.com>
1699 * dwfl_module_addrsym.c: Prefer a later global symbol at the same
1700 address if its st_size is smaller.
1702 2007-08-13 Roland McGrath <roland@redhat.com>
1704 * dwfl_module_addrsym.c: Add dead initializer for stupid compiler.
1706 2007-08-12 Roland McGrath <roland@redhat.com>
1708 * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Don't use
1711 * elf-from-memory.c (elf_from_remote_memory): Don't reset LOADBASE on
1712 a second phdr if it happens to match EHDR_VMA exactly.
1714 2007-08-08 Roland McGrath <roland@redhat.com>
1716 * dwfl_module_addrsym.c: Don't use STT_SECTION, STT_FILE symbols and
1717 those with no names. Rewrite best symbol algorithm not to assume a
1718 sorted table and to be smarter handling sizeless symbols.
1720 2007-07-16 Roland McGrath <roland@redhat.com>
1722 * dwfl_module.c (dwfl_report_module): Increment DWFL->nmodules when
1723 reviving an existing module.
1725 2007-06-08 Roland McGrath <roland@redhat.com>
1727 * libdwflP.h: Fix #ifndef for config.h to use PACKAGE_NAME.
1729 2007-05-17 Roland McGrath <roland@redhat.com>
1731 * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Look at
1732 whole /lib/modules/VERSION tree, not just /lib/modules/VERSION/kernel.
1733 (dwfl_linux_kernel_find_elf): Likewise.
1735 * linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use
1736 getline and sscanf instead of fscanf.
1738 2007-05-08 Roland McGrath <roland@redhat.com>
1740 * offline.c (dwfl_offline_section_address): Don't assume section
1741 numbers match between stripped and debuginfo files. Instead, assume
1742 only that the ordering among SHF_ALLOC sections matches.
1744 * linux-kernel-modules.c (report_kernel): Change RELEASE argument to
1746 (dwfl_linux_kernel_report_offline): Update caller.
1747 (dwfl_linux_kernel_report_kernel): Likewise.
1749 2007-04-23 Roland McGrath <roland@redhat.com>
1751 * argp-std.c (options): Fix group title string.
1753 * argp-std.c (parse_opt): Handle ARGP_KEY_ERROR, free the Dwfl.
1754 Update via STATE->input every time we set STATE->hook, not only at
1757 * dwfl_module.c (free_file): Free FILE->name.
1759 2007-04-16 Roland McGrath <roland@redhat.com>
1761 * derelocate.c (cache_sections): Apply bias to sh_addr.
1762 (compare_secrefs): Fix address comparison to avoid signed overflow.
1763 (find_section): New function, broken out of ...
1764 (dwfl_module_relocate_address): ... here, call it.
1765 (check_module): New function, broken out of ...
1766 (dwfl_module_relocate_address): ... here, call it.
1767 (dwfl_module_address_section): New function.
1768 * libdwfl.h: Declare it.
1770 2007-03-26 Roland McGrath <roland@redhat.com>
1772 * dwfl_module.c (__libdwfl_module_free): Free MOD itself.
1774 2007-03-18 Roland McGrath <roland@redhat.com>
1776 * dwfl_module_getdwarf.c (find_debuglink): New function, broken out of
1777 (find_debuginfo): ... here. Call it.
1778 Don't return error for libelf errors finding .gnu_debuglink section.
1780 2007-03-12 Roland McGrath <roland@redhat.com>
1782 * dwfl_module.c (dwfl_report_begin_add): New function broken out of ...
1783 (dwfl_report_begin): ... here. Call it.
1784 * libdwfl.h: Declare it.
1785 * libdwflP.h: Add INTDECL.
1787 * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo.
1789 * offline.c: Comment typo fix.
1791 2007-03-04 Roland McGrath <roland@redhat.com>
1793 * linux-kernel-modules.c (KERNEL_MODNAME): New macro for "kernel".
1794 (find_kernel_elf): New function, broken out of ...
1795 (report_kernel): ... here. Call it.
1796 (dwfl_linux_kernel_find_elf): Use it for module named KERNEL_MODNAME.
1797 (intuit_kernel_bounds): New function, grovel /proc/kallsyms to guess
1798 virtual address bounds of kernel from symbols rounded to page size.
1799 (dwfl_linux_kernel_report_kernel): Use that if it works, before
1800 resorting to report_kernel.
1802 * dwfl_module_getdwarf.c (open_elf): Set MOD->e_type to ET_DYN for an
1803 ET_EXEC file with nonzero bias.
1805 * dwfl_module_addrname.c (dwfl_module_addrname): Just call
1806 dwfl_module_addrsym. Guts moved to ...
1807 * dwfl_module_addrsym.c: ... here; new file.
1808 * Makefile.am (libdwfl_a_SOURCES): Add it.
1809 * libdwfl.h: Declare dwfl_module_addrsym.
1810 * libdwflP.h: Add INTDECL.
1812 2007-03-03 Roland McGrath <roland@redhat.com>
1814 * dwfl_module.c (free_file): New function, broken out of ...
1815 (__libdwfl_module_free): ... here. In it, close fd after elf_end.
1817 * dwfl_module_getdwarf.c (open_elf): Close fd and reset to -1
1820 2007-03-02 Roland McGrath <roland@redhat.com>
1822 * linux-kernel-modules.c: Fix bogus error test for asprintf call.
1824 2007-02-02 Roland McGrath <roland@redhat.com>
1826 * dwfl_addrmodule.c (dwfl_addrmodule): Match a module's high boundary
1827 address exactly if it's no other module's low boundary.
1829 * dwfl_module_addrname.c (dwfl_module_addrname): If no symbol's value
1830 and size cover the address, select the closest symbol with st_size==0
1831 that lies in the same section.
1833 2007-01-29 Roland McGrath <roland@redhat.com>
1835 * dwfl_version.c (dwfl_version): Return PACKAGE_VERSION,
1838 2007-01-20 Roland McGrath <roland@redhat.com>
1840 * relocate.c (__libdwfl_relocate_value): Treat section_address of -1
1842 * libdwfl.h (Dwfl_Callbacks): Update comment.
1843 * derelocate.c (cache_sections): Don't ignore sh_addr == 0 sections.
1844 * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
1845 For ignored missing section, use -1 instead of 0.
1846 * offline.c (dwfl_offline_section_address): Expect a call for 0.
1848 2007-01-19 Roland McGrath <roland@redhat.com>
1850 * argp-std.c (parse_opt): For -e, reset DWFL->offline_next_address to
1851 zero so a lone -e foo.so is shown without address bias.
1853 2007-01-10 Roland McGrath <roland@redhat.com>
1855 * linux-kernel-modules.c (report_kernel): Check asprintf return value
1856 directly instead of via side effect, to silence warn_unused_result.
1857 (dwfl_linux_kernel_report_offline): Likewise.
1858 (dwfl_linux_kernel_find_elf): Likewise.
1859 (dwfl_linux_kernel_module_section_address): Likewise.
1860 * find-debuginfo.c (try_open): Likewise.
1861 * linux-proc-maps.c (find_sysinfo_ehdr): Likewise.
1862 (dwfl_linux_proc_report): Likewise.
1864 * libdwfl.h (dwfl_begin): Require nonnull argument.
1866 2006-12-27 Roland McGrath <roland@redhat.com>
1868 * dwfl_module.c (compare_modules): Fix address comparison to avoid
1869 signed overflow. Patch by Frank Ch. Eigler <fche@redhat.com>.
1871 2006-10-30 Roland McGrath <roland@redhat.com>
1873 * dwfl_module.c (dwfl_report_module): Comment typo fix.
1875 2006-09-05 Roland McGrath <roland@redhat.com>
1877 * derelocate.c (cache_sections): Use alloca instead of variable-sized
1878 auto array, in function already using alloca.
1880 2006-08-14 Roland McGrath <roland@redhat.com>
1882 * linux-kernel-modules.c (try_kernel_name): If the call to
1883 dwfl_standard_find_debuginfo produces no results, try it again
1884 with NULL as DEBUGLINK_FILE to try *FNAME with .debug suffix.
1886 * find-debuginfo.c (DEFAULT_DEBUGINFO_PATH): Macro moved ...
1887 * libdwflP.h: ... to here.
1888 * linux-kernel-modules.c (try_kernel_name): Skip manual open if it
1889 repeats the first thing dwfl_standard_find_debuginfo will try.
1891 * linux-kernel-modules.c (MODULE_SECT_NAME_LEN): New macro.
1892 (dwfl_linux_kernel_module_section_address): If a /sys file is missing
1893 and the section name is >= MODULE_SECT_NAME_LEN, try truncating the
1896 2006-07-12 Ulrich Drepper <drepper@redhat.com>
1898 * cu.c: Adjust for internal_function_def removal.
1899 * dwfl_error.c: Likewise.
1900 * dwfl_module.c: Likewise.
1901 * dwfl_module_getdwarf.c: Likewise.
1902 * lines.c: Likewise.
1903 * relocate.c: Likewise.
1905 2006-07-11 Ulrich Drepper <drepper@redhat.com>
1907 * dwfl_module.c (compare_modules): Don't return GElf_Sxword value,
1908 it can overflow the return value type.
1909 Patch by Tim Moore <timoore@redhat.com>.
1911 2006-06-28 Roland McGrath <roland@redhat.com>
1913 * libdwfl.h: Cosmetic changes.
1915 * dwfl_line_comp_dir.c: New file.
1916 * Makefile.am (libdwfl_a_SOURCES): Add it.
1917 * libdwfl.h: Declare dwfl_line_comp_dir.
1919 * dwfl_lineinfo.c (dwfl_lineinfo): Remove stray extern in defn.
1921 * dwfl_linecu.c: New file.
1922 * Makefile.am (libdwfl_a_SOURCES): Add it.
1923 * libdwfl.h: Declare dwfl_linecu.
1925 * libdwflP.h (dwfl_linecu_inline): Function renamed from dwfl_linecu.
1926 (dwfl_linecu): Define as macro.
1928 * relocate.c (__libdwfl_relocate): Use dwfl_module_getsym.
1930 * dwfl_module_getdwarf.c (dwfl_module_getsymtab): New function.
1931 (dwfl_module_addrname): Function moved ...
1932 * dwfl_module_addrname.c: ... here, new file.
1933 * dwfl_module_getsym.c: New file.
1934 * Makefile.am (libdwfl_a_SOURCES): Add them.
1935 * libdwfl.h: Declare dwfl_module_getsymtab, dwfl_module_getsym.
1936 * libdwflP.h: Add INTDECLs.
1938 2006-06-27 Roland McGrath <roland@redhat.com>
1940 * dwfl_module.c (dwfl_report_end): Whitespace fix.
1942 2006-06-13 Roland McGrath <roland@redhat.com>
1944 * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo.
1945 Use __libdwfl_seterrno for elf_memory failure.
1947 2006-05-22 Roland McGrath <roland@redhat.com>
1949 * dwfl_module_return_value_location.c
1950 (dwfl_module_return_value_location): Use __libdwfl_module_getebl.
1952 2006-05-27 Ulrich Drepper <drepper@redhat.com>
1954 * libdwfl.h: Add extern "C".
1956 2006-05-22 Ulrich Drepper <drepper@redhat.com>
1958 * cu.c (addrarange): Handle files without aranges information.
1960 2006-05-16 Ulrich Drepper <drepper@redhat.com>
1962 * dwfl_addrmodule.c (dwfl_addrmodule): Also return NULL of
1965 2006-02-26 Roland McGrath <roland@redhat.com>
1967 * dwfl_version.c: New file.
1968 * Makefile.am (libdwfl_a_SOURCES): Add it.
1969 * libdwfl.h: Declare dwfl_version.
1971 * offline.c (dwfl_report_offline): Account for dwfl_report_elf having
1972 aligned up from DWFL->offline_next_address when checking for overlap.
1974 2005-12-22 Roland McGrath <roland@redhat.com>
1976 * argp-std.c (parse_opt): Call dwfl_end in failure cases.
1978 * linux-proc-maps.c (proc_maps_report): New function, broken out of ...
1979 (dwfl_linux_proc_report): ... here. Call it.
1980 (dwfl_linux_proc_maps_report): New function.
1981 * libdwfl.h: Declare it.
1982 * libdwflP.h: Add INTDECL.
1983 * argp-std.c (options, parse_opt): Grok -M/--linux-process-map.
1985 * dwfl_nextcu.c (dwfl_nextcu): Don't fail when dwfl_module_getdwarf
1986 failed with DWFL_E_NO_DWARF.
1988 2005-11-26 Roland McGrath <roland@redhat.com>
1990 * dwfl_end.c (dwfl_end): Free the DWFL itself.
1992 2005-11-25 Roland McGrath <roland@redhat.com>
1994 * dwfl_module_getdwarf.c (__libdwfl_module_getebl): New function.
1996 * dwfl_module_register_names.c (dwfl_module_register_names): Likewise.
1997 * libdwflP.h: Declare it.
1999 * dwfl_module_register_names.c: New file.
2000 * Makefile.am (libdwfl_a_SOURCES): Add it.
2001 * libdwfl.h: Declare dwfl_module_register_names.
2003 2005-11-21 Roland McGrath <roland@redhat.com>
2005 * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
2006 Don't leak malloc'd file name.
2007 If a /sys/.../sections file is missing and starts with ".init",
2008 try the variant with "_init" too; catches PPC64 kernel braindamage.
2010 2005-11-15 Roland McGrath <roland@redhat.com>
2012 * libdwfl.h: Comment fixes.
2014 * dwfl_module_return_value_location.c: Add unlikely for error case.
2016 2005-11-13 Roland McGrath <roland@redhat.com>
2018 * dwfl_return_value_location.c: New file.
2019 * Makefile.am (libdwfl_a_SOURCES): Add it.
2020 * libdwfl.h: Declare dwfl_module_return_value_location.
2021 * libdwflP.h (DWFL_ERRORS): Add DWFL_E_WEIRD_TYPE.
2023 2005-10-20 Roland McGrath <roland@redhat.com>
2025 * libdwflP.h (DWFL_ERRORS): New error UNKNOWN_MACHINE.
2026 * relocate.c (__libdwfl_relocate): Return DWFL_E_UNKNOWN_MACHINE
2027 instead of DWFL_E_BADRELTYPE if ebl_get_elfmachine yields EM_NONE.
2029 2005-10-01 Roland McGrath <roland@redhat.com>
2031 * linux-kernel-modules.c (report_kernel): Return ENOENT if we fail
2034 2005-09-19 Roland McGrath <roland@redhat.com>
2036 * linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use
2037 PRIx64 instead of PRIi64, lest addresses with high bits set overflow
2038 the signed integer reading; they will just have to be in hexadecimal.
2039 (dwfl_linux_kernel_module_section_address): Likewise.
2041 2005-08-28 Ulrich Drepper <drepper@redhat.com>
2043 * Makefile.am (%.os): Use COMPILE.os.
2044 (COMPILE.os): Filter out gconv options.
2046 2005-08-25 Roland McGrath <roland@redhat.com>
2048 * cu.c (__libdwfl_nextcu): Return success when dwarf_nextcu hits end.
2049 * dwfl_nextcu.c (dwfl_nextcu): Skip modules with no dwarf info.
2051 2005-08-24 Roland McGrath <roland@redhat.com>
2053 * dwfl_lineinfo.c (dwfl_lineinfo): Add bias, don't subtract it.
2055 * argp-std.c [_MUDFLAP] (__libdwfl_argp_mudflap_options): New function,
2056 magic initializer to set -heur-stack-bound option.
2058 2005-08-22 Roland McGrath <roland@redhat.com>
2060 * dwfl_validate_address.c: New file.
2061 * Makefile.am (libdwfl_a_SOURCES): Add it.
2062 * libdwfl.h: Declare dwfl_validate_address.
2064 * derelocate.c (dwfl_module_relocate_address): Add INTDEF.
2065 * libdwflP.h: Add INTDECL.
2067 * dwfl_module_getdwarf.c (find_symtab): Use elf_getdata instead of
2068 elf_rawdata for symbol-related sections.
2070 * offline.c (dwfl_report_offline): Move offline_next_address outside
2071 module's range, in case it's an ET_EXEC using fixed segment locations.
2072 * libdwfl.h: Update comment.
2074 * dwfl_report_elf.c (dwfl_report_elf): Align BASE to first segment's
2077 2005-08-20 Roland McGrath <roland@redhat.com>
2079 * linux-kernel-modules.c (report_kernel): Take new argument PREDICATE,
2080 function to choose whether to report.
2081 (dwfl_linux_kernel_report_offline): Likewise.
2082 * libdwfl.h: Update decl.
2083 * argp-std.c (parse_opt): Update caller.
2085 * dwfl_getsrclines.c: New file.
2086 * dwfl_onesrcline.c: New file.
2087 * Makefile.am (libdwfl_a_SOURCES): Add them.
2088 * libdwfl.h: Declare dwfl_getsrclines, dwfl_onesrcline.
2090 * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't leak
2091 MODULESDIR[0]. Call fts_close on failure.
2093 * dwfl_module_getdwarf.c (load_dw): Take dwfl_file * instead of Elf *.
2094 Close ET_REL file descriptors after relocation.
2095 (find_dw): Update caller.
2096 * offline.c (dwfl_report_offline): Get the file into memory and close
2097 the file descriptor.
2099 * dwfl_module_getdwarf.c (find_debuginfo): Do nothing when
2100 MOD->debug.elf is already set.
2102 * find-debuginfo.c (try_open): Use TEMP_FAILURE_RETRY.
2103 (dwfl_standard_find_debuginfo): Fail on errors not ENOENT or ENOTDIR.
2105 * argp-std.c (options, parse_opt): Grok -K/--offline-kernel, use
2106 dwfl_linux_kernel_report_offline with offline_callbacks.
2108 * linux-kernel-modules.c (report_kernel): New function, broken out of
2110 (dwfl_linux_kernel_report_kernel): ... here. Use it.
2111 (dwfl_linux_kernel_report_offline): New function.
2112 * libdwfl.h: Declare it.
2113 * libdwflP.h: Add INTDECL.
2115 2005-08-19 Roland McGrath <roland@redhat.com>
2117 Use standard debuginfo search path to look for vmlinux.
2118 * find-debuginfo.c (dwfl_standard_find_debuginfo): Don't check CRC if
2120 * linux-kernel-modules.c (try_kernel_name): New function, broken out
2122 (dwfl_linux_kernel_report_kernel): ... here. Use it.
2124 * argp-std.c (offline_callbacks): New variable.
2125 (parse_opt): Use it for -e. Allow multiple -e options.
2127 * offline.c: New file.
2128 * Makefile.am (libdwfl_a_SOURCES): Add it.
2129 * libdwfl.h: Declare dwfl_offline_section_address, dwfl_report_offline.
2130 * libdwflP.h: Add INTDECLs.
2131 (OFFLINE_REDZONE): New macro.
2132 (struct Dwfl): New member `offline_next_address'.
2133 * dwfl_begin.c (dwfl_begin): Initialize it.
2134 * dwfl_module.c (dwfl_report_begin): Likewise.
2136 * dwfl_report_elf.c (dwfl_report_elf): Accept all types. When ET_REL,
2137 do a nominal absolute section layout starting at BASE.
2138 * libdwfl.h: Update comment.
2140 2005-08-18 Roland McGrath <roland@redhat.com>
2142 * dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Do
2143 dwfl_module_getdwarf if necessary.
2145 * dwfl_report_elf.c (dwfl_report_elf): Permit ET_REL with BASE==0.
2146 * libdwfl.h: Update comment.
2148 * derelocate.c: New file.
2149 * Makefile.am (libdwfl_a_SOURCES): Add it.
2151 * libdwflP.h (struct Dwfl_Module): isrel -> e_type.
2152 * dwfl_report_elf.c (dwfl_report_elf): Initialize it.
2153 * dwfl_module_getdwarf.c (open_elf): Update initialization.
2154 (load_dw, dwfl_module_addrname): Update uses.
2155 * relocate.c (__libdwfl_relocate): Likewise.
2157 2005-08-04 Roland McGrath <roland@redhat.com>
2159 * libdwfl.h (Dwfl_Callbacks.section_address): Take additional
2160 arguments SHNDX, SHDR.
2161 (dwfl_linux_kernel_module_section_address): Update prototype.
2162 * relocate.c (__libdwfl_relocate_value): Update caller.
2163 * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
2164 Take the new arguments.
2166 2005-08-10 Roland McGrath <roland@redhat.com>
2168 * relocate.c (__libdwfl_relocate): Take argument DEBUGFILE,
2169 use it instead of MOD->debug.file.
2170 * libdwflP.h: Update decl.
2171 * dwfl_module_getdwarf.c (load_dw): Update caller.
2174 2005-08-09 Roland McGrath <roland@redhat.com>
2176 * libdwflP.h: Include ../libdw/libdwP.h for its INTDECLs.
2177 * cu.c: Use INTUSE on dwarf_* calls.
2178 * dwfl_error.c: Likewise.
2179 * dwfl_module.c: Likewise.
2180 * dwfl_module_getdwarf.c: Likewise.
2181 * dwfl_module_getsrc_file.c: Likewise.
2182 * lines.c: Likewise.
2184 2005-08-07 Roland McGrath <roland@redhat.com>
2186 * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): When module
2187 names contain '_' or '-', look for files named either "foo-bar.ko"
2190 2005-07-29 Roland McGrath <roland@redhat.com>
2192 * loc2c.c: File removed.
2193 * loc2c.h: File removed.
2194 * loc2c-runtime.h: File removed.
2195 * test2.c: File removed.
2196 * Makefile.am (EXTRA_DIST): Variable removed.
2197 (noinst_HEADERS): Remove loc2c.h from here.
2199 2005-07-28 Ulrich Drepper <drepper@redhat.com>
2201 * libdwfl.h: Add a few missing extern for function prototypes.
2203 * libdwfl_crc32.c: New file.
2204 * libdwfl_crc32_file.c: New file.
2205 * libdwflP.h: Declare the new functions.
2206 * Makefile.am (libdwfl_a_SOURCES): Add libdwfl_crc32.c and
2207 libdwfl_crc32_file.c.
2208 * libdwfl/find-debuginfo.c (check_crc): Use __libdwfl_crc32_file
2209 instead of crc32_file.
2211 2005-07-28 Roland McGrath <roland@redhat.com>
2213 * ptest.c: Moved to ../tests/dwflmodtest.c.
2215 * Makefile.am (noinst_PROGRAMS): Variable removed.
2216 (libdwfl_so_SOURCES, libdwfl_LIBS, libdwfl_so_LDADD): Likewise.
2217 (EXTRA_DIST, ptest_LDADD, test2_LDADD): Likewise.
2218 (libdwfl): Don't use libdwfl.so any more.
2219 (libdwfl.so, install, uninstall): Targets removed.
2220 (test2_SOURCES): Define EXTRA_DIST instead of this.
2221 * libdwfl.map: File removed.
2223 * libdwfl.h: Use "" for libdw.h #include.
2225 2005-07-27 Roland McGrath <roland@redhat.com>
2227 * libdwfl.map: Add dwfl_getmodules.
2229 2005-07-23 Ulrich Drepper <drepper@redhat.com>
2231 * Makefile.am: Fix rules to allow building with mudflap.
2233 2005-07-21 Roland McGrath <roland@redhat.com>
2235 * Makefile.am (noinst_HEADERS): Add loc2c.c.
2237 * test2.c (main): Check sscanf result to quiet warning.
2239 2005-07-20 Roland McGrath <roland@redhat.com>
2241 * libdwfl-branch merged, creating this direcotry.