f4a3cad9af87c4a54fa70517ce11e391e34323bc
[platform/upstream/elfutils.git] / libdwfl / ChangeLog
1 2019-10-07  Omar Sandoval  <osandov@fb.com>
2
3         * dwfl_frame.c (dwfl_getthreads): Get rid of unnecessary
4         thread_free_all_states calls.
5         (getthread): Ditto.
6
7 2019-08-12  Mark Wielaard  <mark@klomp.org>
8
9         * gzip.c (open_stream): Return DWFL_E_ERRNO on bad file operation.
10         * open.c (libdw_open_elf): New argument bad_elf_ok. Check it and
11         return DWFL_E_NOERROR in case it is set and error was DWFL_E_BADELF.
12         (__libdw_open_file): Call libdw_open_elf with bad_elf_ok false.
13         (__libdw_open_elf): Call libdw_open_elf with bad_elf_ok true.
14
15 2019-08-05  Omar Sandoval  <osandov@fb.com>
16
17         * dwfl_segment_report_module.c (dwfl_segment_report_module): Assign
18         mod->main.fd.
19
20 2019-04-28  Mark Wielaard  <mark@klomp.org>
21
22         * frame_unwind.c (expr_eval): Make sure we left shift a unsigned
23         64bit value.
24
25 2019-04-28  Mark Wielaard  <mark@klomp.org>
26
27         * cu.c (addrarange): Only call realloc when naranges is not zero.
28
29 2019-03-27  Mark Wielaard  <mark@klomp.org>
30
31         * dwfl_segment_report_module.c (dwfl_segment_report_module): Check
32         ph_buffer_size vs xlatefrom.d_size after read_portion call.
33
34 2019-02-24  Mark Wielaard  <mark@klomp.org>
35
36         * linux-kernel-modules.c (intuit_kernel_bounds): Init *notes before
37         fopen.
38         (dwfl_linux_kernel_report_kernel): Remove fake note init empty asm.
39
40 2019-01-25  Yonghong Song  <yhs@fb.com>
41
42         * linux-proc-maps.c (proc_maps_report): Use PRIu64, not PRIi64, to
43         read the inode number.
44
45 2019-01-20  Mark Wielaard  <mark@klomp.org>
46
47         * dwfl_segment_report_module.c (dwfl_segment_report_module): Check
48         dyn_filesz vs dyn_data_size after read_portion call.
49
50 2019-01-16  Mark Wielaard  <mark@klomp.org>
51
52         * linux-core-attach.c (core_next_thread): Pass desc to ebl_core_note.
53         (core_set_initial_registers): Likewise.
54
55 2018-10-23  Mark Wielaard  <mark@klomp.org>
56
57         * relocate.c (relocate_section): Only sanity check mmapped Elf files
58         for overlap. Don't error when section data was malloced, not mmapped.
59
60 2018-10-20  Mark Wielaard  <mark@klomp.org>
61
62         * libdwflP.h (__libdw_open_elf): New internal function declaration.
63         * open.c (what_kind): Rename close_fd to may_close_fd.
64         (__libdw_open_file): Replaced (and renamed) by a call to ...
65         (libdw_open_elf): this. And add never_close_fd argument.
66         (__libdw_open_elf): New function that calls libdw_open_elf.
67
68 2018-10-18  Mark Wielaard  <mark@klomp.org>
69
70         * dwfl_segment_report_module.c (consider_note): Take align as new
71         argument.  Use align to set d_type and calculate padding.
72         (dwfl_segment_report_module): Pass align to consider_notes.
73         * core-file.c (dwfl_core_file_report): Check p_align to set ELF
74         type.
75         * linux-kernel-modules.c (check_notes): Check name and type of note
76         to determine padding.
77
78 2018-10-19  Mark Wielaard  <mark@klomp.org>
79
80         * dwfl_module_getdwarf.c (find_aux_sym): Check sh_entsize is not zero.
81
82 2018-10-14  Mark Wielaard  <mark@klomp.org>
83
84         * dwfl_segment_report_module.c (read_portion): Check requested
85         filesz isn't larger than buffer_available.
86         (dwfl_segment_report_module): Check data_size vs filesz after
87         read_portion call.
88
89 2018-10-02  Andreas Schwab  <schwab@suse.de>
90
91         * relocate.c (relocate): Handle ADD/SUB relocations.
92
93 2018-09-13  Mark Wielaard  <mark@klomp.org>
94
95         * dwfl_segment_report_module.c (dwfl_segment_report_module):
96         Document why we use e_shnum directly.
97         * elf-from-memory.c (elf_from_remote_memory): Likewise.
98
99 2018-07-17  Ulf Hermann  <ulf.hermann@qt.io>
100
101         * linux-pid-attach.c: Include sys/uio.h only on linux.
102
103 2018-06-04  Mark Wielaard  <mark@klomp.org>
104
105         * libdwflP.h (__libdwfl_addrsym): Remove function declaration.
106         * dwfl_module_addrsym.c (__libdwfl_addrsym): Make a static function.
107
108 2018-05-27  Mark Wielaard  <mark@klomp.org>
109
110         * relocate.c (__libdwfl_relocate): Always call relocate_section with
111         partial true.
112
113 2018-05-17  Mark Wielaard  <mark@klomp.org>
114
115         * dwfl_module (__libdwfl_module_free): Free elfdir.
116         * dwfl_module_getdwarf.c (load_dw): Close file descriptors after
117         dwarf_begin_elf call. Set Dwarf debugdir if it is NULL, this is the
118         main module file and we recorded the elfdir.
119         * libdwflP.h (struct Dwfl_Module): Add elfdir field.
120         * offline.c (process_elf): Record the elfdir before we close the
121         main ELF file descriptor.
122
123 2018-04-10  Mark Wielaard  <mark@klomp.org>
124
125         * frame_unwind.c (unwind): If __libdwfl_frame_reg_get fails for
126         the return address either set an error or mark the pc undefined.
127
128 2018-03-17  Mark Wielaard  <mark@klomp.org>
129
130         * libdwflP.h (struct __libdwfl_remote_mem_cache): New.
131         (struct __libdwfl_pid_arg): Add mem_cache field.
132         * linux-pid-attach.c (read_cached_memory): New function.
133         (clear_cached_memory): Likewise.
134         (pid_memory_read): Call read_cached_memory.
135         (pid_detach): Free mem_cache.
136         (pid_thread_detach): Call clear_cached_memory.
137         (dwfl_linux_proc_attach): Initialize mem_cache to NULL.
138
139 2018-03-05  Mark Wielaard  <mark@klomp.org>
140
141         * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Use
142         realpath (name, NULL) instead of canonicalize_file_name (name).
143         * find-debuginfo.c (dwfl_standard_find_debuginfo): Likewise.
144
145 2018-01-29  Mark Wielaard  <mark@klomp.org>
146
147         * cu.c (cudie_offset): Use __libdw_first_die_off_from_cu instead of
148         DIE_OFFSET_FROM_CU_OFFSET.
149         (intern_cu): Simply use a copy of the given die CU as key instead of
150         trying to construct a dummy one by hand.
151
152 2018-02-15  Mark Wielaard  <mark@klomp.org>
153
154         * linux-pid-attach.c: Include sys/wait.h after sys/ptrace.h.
155
156 2018-02-09  Joshua Watt  <JPEWhacker@gmail.com>
157
158         * dwfl_report_elf.c (__libdwfl_elf_address_range): Use FALLTHROUGH
159         macro instead of comment.
160         * frame_unwind.c (expr_eval): Likewise.
161
162 2017-11-20  Mark Wielaard  <mark@klomp.org>
163
164         * link_map.c (do_check64): Take a char * and calculate type and val
165         offsets before reading, possibly unaligned, values.
166         (do_check32): Likewise.
167         (check64): Remove define.
168         (check32): Likewise.
169         (auxv_format_probe): Call do_check32 and do_check64 directly with
170         a, possibly unaligned, auxv entry pointer.
171         (dwfl_link_map_report): Redefine AUXV_SCAN to not dereference a
172         possibly unaligned auxv entry pointer.
173
174 2017-10-16  Mark Wielaard  <mark@klomp.org>
175
176         * argp-std.c (parse_opt): For -k call argp_failure not failure to
177         keep dwfl around.
178
179 2017-07-26  Yunlian Jiang  <yunlian@google.com>
180
181         * argp-std.c (failure): Move to file scope.
182         (fail): Likewise.
183
184 2017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
185             Mark Wielaard  <mark@klomp.org>
186
187         * derelocate.c (compare_secrefs): Compare by end address and then by
188         section number if addresses are equal.
189
190 2017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
191             Mark Wielaard  <mark@klomp.org>
192
193         * linux-kernel-modules.c: Always return NULL from kernel_release() on
194         non-linux systems and set errno to ENOTSUP.
195
196 2017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
197
198         * libdwflP.h: Don't include config.h.
199         * argp-std.c: Include config.h.
200         * cu.c: Likewise.
201         * derelocate.c: Likewise.
202         * dwfl_addrdie.c: Likewise.
203         * dwfl_addrdwarf.c: Likewise.
204         * dwfl_addrmodule.c: Likewise.
205         * dwfl_begin.c: Likewise.
206         * dwfl_build_id_find_debuginfo.c: Likewise.
207         * dwfl_build_id_find_elf.c: Likewise.
208         * dwfl_cumodule.c: Likewise.
209         * dwfl_dwarf_line.c: Likewise.
210         * dwfl_end.c: Likewise.
211         * dwfl_frame.c: Likewise.
212         * dwfl_frame_regs.c: Likewise.
213         * dwfl_getdwarf.c: Likewise.
214         * dwfl_getmodules.c: Likewise.
215         * dwfl_getsrc.c: Likewise.
216         * dwfl_getsrclines.c: Likewise.
217         * dwfl_line_comp_dir.c: Likewise.
218         * dwfl_linecu.c: Likewise.
219         * dwfl_lineinfo.c: Likewise.
220         * dwfl_linemodule.c: Likewise.
221         * dwfl_module.c: Likewise.
222         * dwfl_module_addrdie.c: Likewise.
223         * dwfl_module_addrname.c: Likewise.
224         * dwfl_module_addrsym.c: Likewise.
225         * dwfl_module_build_id.c: Likewise.
226         * dwfl_module_dwarf_cfi.c: Likewise.
227         * dwfl_module_eh_cfi.c: Likewise.
228         * dwfl_module_getdarf.c: Likewise.
229         * dwfl_module_getelf.c: Likewise.
230         * dwfl_module_getsrc.c: Likewise.
231         * dwfl_module_getsrc_file.c: Likewise.
232         * dwfl_module_getsym.c: Likewise.
233         * dwfl_module_info.c: Likewise.
234         * dwfl_module_nextcu.c: Likewise.
235         * dwfl_module_register_names.c: Likewise.
236         * dwfl_module_report_build_id.c: Likewise.
237         * dwfl_module_return_value_location.c: Likewise.
238         * dwfl_nextcu.c: Likewise.
239         * dwfl_onesrcline.c: Likewise.
240         * dwfl_report_elf.c: Likewise.
241         * dwfl_validate_address.c: Likewise.
242         * dwfl_version.c: Likewise.
243         * find-debuginfo.c: Likewise.
244         * gzip.c: Likewise.
245         * image-header.c: Likewise.
246         * lines.c: Likewise.
247         * linux-core-attach.c: Likewise.
248         * linux-pid-attach.c: Likewise.
249         * offline.c: Likewise.
250         * open.c: Likewise.
251         * relocate.c: Likewise.
252         * segment.c: Likewise.
253
254 2017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
255
256         * libdwfl.h: Use __const_attribute__.
257
258 2017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
259
260         * elf-from-memory.c: Explicitly cast phnum to size_t.
261
262 2017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
263
264         * dwfl_module_getdwarf.c: Check shnum for 0 before subtracting from
265         it.
266
267 2017-04-20  Ulf Hermann  <ulf.hermann@qt.io>
268
269         * dwfl_frame.c: Drop unused sys/ptrace.h include.
270         * frame_unwind.c: Likewise.
271         * linux-pid-attach.c: Include sys/ptrace.h and sys/syscall.h only on
272         linux.
273
274 2017-04-20  Ulf Hermann <ulf.hermann@qt.io>
275
276         * linux-kernel-modules.c: Include sys/types.h before fts.h
277
278 2017-03-24  Mark Wielaard  <mark@klomp.org>
279
280         * linux-core-attach.c (core_next_thread): If n_namesz == 0 then
281         the note name data is the empty string.
282         (dwfl_core_file_attach): Likewise.
283
284 2017-02-15  Ulf Hermann  <ulf.hermann@qt.io>
285
286         * linux-kernel-modules.c: Include system.h.
287
288 2017-02-15  Ulf Hermann  <ulf.hermann@qt.io>
289
290         * linux-kernel-modules.c: Use sysconf(_SC_PAGESIZE) to get page size.
291         * linux-proc-maps.c: Likewise.
292
293 2016-12-29  Luiz Angelo Daros de Luca  <luizluca@gmail.com>
294
295         * dwfl_build_id_find_elf.c: Include system.h.
296         * dwfl_module_getdwarf.c: Likewise.
297         * libdwfl_crc32_file.c: Don't define LIB_SYSTEM_H.
298
299 2016-11-23  Mark Wielaard  <mjw@redhat.com>
300
301         * linux-kernel-modules.c: Only include fts.h early if BAD_FTS is
302         defined.
303
304 2016-10-11  Akihiko Odaki  <akihiko.odaki.4i@stu.hosei.ac.jp>
305
306         * core-file.c: Remove sys/param.h.
307         * dwfl_segment_report_module.c: Likewise. Add system.h include.
308         (MAX): Remove definition.
309         * frame_unwind.c: Add system.h include.
310         (MAX): Remove definition.
311         * linux-core-attach.c (MIN): Remove definition.
312         * linux-pid-attach.c (MAX): Likewise.
313
314 2016-08-12  Mark Wielaard  <mjw@redhat.com>
315
316         * link_map.c (dwfl_link_map_report): Fix assert, set in.d_size.
317
318 2016-04-14  Mark Wielaard  <mjw@redhat.com>
319
320         * dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Free match
321         on invalid DWARF if we allocated it.
322
323 2016-04-14  Mark Wielaard  <mjw@redhat.com>
324
325         * linux-proc-maps.c (proc_maps_report): Free last_file on bad file
326         mapping.
327
328 2016-03-01  Steven Chamberlain  <steven@pyro.eu.org>
329
330         * linux-pid-attach.c: Removed unused pid_thread_callbacks,
331         pid_thread_detach, pid_detach, pid_set_initial_registers,
332         pid_memory_read, pid_getthread, pid_next_thread in #ifndef
333         __linux__ code.
334
335 2016-02-22  Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
336             Mark Wielaard  <mjw@redhat.com>
337
338         * find-debuginfo.c (find_debuginfo_in_path): Remember whether
339         debuglink_file is NULL. Try file basename (without .debug) ofr
340         absolute and relative path if debug_file was NULL.
341         * linux-kernel-modules.c (try_kernel_name): If try_debug is true call
342         dwfl_standard_find_debuginfo with NULL debuglink_file, otherwise with
343         basename of fname.
344
345 2016-02-13  Mark Wielaard  <mjw@redhat.com>
346
347         * linux-proc-maps.c (proc_maps_report): Free last_file when ENOEXEC.
348
349 2016-02-13  Mark Wielaard  <mjw@redhat.com>
350
351         * frame_unwind.c (new_unwound): Check and return unwound.
352         (handle_cfi): Check new_unwound was able to allocate new memory
353         before use. Return DWFL_E_NOMEM otherwise.
354
355 2016-02-11  Mark Wielaard  <mjw@redhat.com>
356
357         * relocate.c (relocate_section): Check result of all gelf_get* calls.
358         (__libdwfl_relocate): Likewise.
359         (__libdwfl_relocate_section): Likewise.
360
361 2016-02-11  Mark Wielaard  <mjw@redhat.com>
362
363         * relocate.c (relocate_section): Check result of gelf_update_* calls.
364
365 2016-01-08  Mark Wielaard  <mjw@redhat.com>
366
367         * libdwfl_a_SOURCES: Unconditionally add gzip.c.
368         * linux-kernel-modules.c (vmlinux_suffixes): We always have at least
369         .gz support.
370         (try_kernel_name): Likewise.
371         (check_suffix): Likewise.
372         * open.c (decompress): Likewise.
373
374 2015-12-18  Mark Wielaard  <mjw@redhat.com>
375
376         * dwfl_module_getdwarf.c (find_symtab): Uncompress symstr, xndx, sym
377         sections and aux_str, aux_xndx and aux_sym sections if necessary.
378         * relocate.c (relocate_getsym): Uncompress symtab and symtab_shndx
379         if necessary.
380         (resolve_symbol): Uncompress strtab section if necessary.
381         (relocate_section): Uncompress the section the relocations apply to
382         if necessary.
383
384 2015-11-18  Chih-Hung Hsieh <chh@google.com>
385
386         * linux-proc-maps.c (proc_maps_report): Move nested function
387         'report' to file scope.
388
389 2015-11-18  Chih-Hung Hsieh <chh@google.com>
390
391         * core-file.c (elf_begin_rand): Move nested function 'fail' to file
392         scope.
393         * core-file.c (dwfl_elf_phdr_memory_callback): Move nested functions
394         'update_end' and 'more' to file scope.
395
396 2015-11-17  Chih-Hung Hsieh <chh@google.com>
397
398         * link_map.c (auxv_format_probe): Move nested functions
399         check64 and check32 to file scope.
400
401 2015-12-08  Jose E. Marchesi  <jose.marchesi@oracle.com>
402
403         * dwfl_frame.c (state_fetch_pc): Add a backend-defined offset to
404         the value of the return address register as defined by the CFI
405         abi.
406         * frame_unwind.c (handle_cfi): Likewise.
407
408 2015-12-01  Mark Wielaard  <mjw@redhat.com>
409
410         * link_map.c (dwfl_link_map_report): Track whether in.d_buf comes
411         from exec or memory_callback, free as appropriate.
412
413 2015-12-01  Mark Wielaard  <mjw@redhat.com>
414
415         * libdwflP.h (struct Dwfl_User_Core): New.
416         (struct DWfl): Replace executable_for_core with user_core.
417         * argp-std.c (parse_opt): Store core and fd in Dwfl user_core.
418         * core-file.c (dwfl_core_file_report): Check and store
419         executable_for_core in Dwfl user_core.
420         * dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Check and use
421         executable_for_core in Dwfl user_core.
422         * dwfl_end.c (dwfl_end): Release resources held in Dwfl user_core.
423         * link-map.c (report_r_debug): Check executable_for_core in Dwfl
424         user_core.
425         (dwfl_link_map_report): Likewise.
426
427 2015-11-16  Chih-Hung Hsieh <chh@google.com>
428
429         * dwfl_module_getdwarf.c (find_prelink_address_sync): Move nested
430         function 'consider_shdr' to file scope.
431         * dwfl_module_getdwarf.c (find_dynsym): Move nested function
432         'translate_offs' to file scope.
433
434 2015-11-16  Chih-Hung Hsieh <chh@google.com>
435
436         * dwfl_module_addrsym.c (__libdwfl_addrsym): Move nested functions
437         'same_section', 'binding_value', 'try_sym_value', and 'search_table'
438         to file scope.
439
440 2015-11-19  Mark Wielaard  <mjw@redhat.com>
441
442         * dwfl_module.c (__libdwfl_module_free): Remove Dwfl_Module Ebl from
443         eh_cfi and dwarf_cfi cache if necessary before calling dwarf_end and
444         dwarf_cfi_end.
445
446 2015-11-13  Chih-Hung Hsieh <chh@google.com>
447
448         * gzip.c (unzip): Move nested functions to file scope.
449
450 2015-10-21  Chih-Hung Hsieh <chh@google.com>
451             Mark Wielaard  <mjw@redhat.com>
452
453         * dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Move nested
454         functions 'dwarf_line_file', 'dwfl_line', and 'dwfl_line_file' to
455         file scope. Rename dwarf_line_file to dwfl_dwarf_line_file. Don't
456         use INTUSE.
457
458 2015-10-21  Chih-Hung Hsieh <chh@google.com>
459
460         * frame_unwind.c (expr_eval): Move nested function 'push' and 'pop'
461         to file scope. Pass used local variables in struct eval_stack.
462
463 2015-10-21  Chih-Hung Hsieh <chh@google.com>
464
465         * dwfl_module.c (dwfl_report_module): Move nested function 'use' to
466         file scope.
467
468 2015-10-09  Josh Stone  <jistone@redhat.com>
469
470         * core-file.c (elf_begin_rand): Replace loff_t with off_t.
471         * open.c (decompress): Replace off64_t with off_t.
472         * gzip.c (unzip): Likewise.
473         * image-header.c (__libdw_image_header): Likewise.
474         * libdwflP.h: Likewise in function declarations.
475         * argp-std.c (parse_opt): Replace open64 with open.
476         * dwfl_build_id_find_elf.c (__libdwfl_open_mod_by_build_id,
477         dwfl_build_id_find_elf): Likewise.
478         * dwfl_module_getdwarf.c (open_elf_file): Likewise.
479         * dwfl_report_elf.c (dwfl_report_elf): Likewise.
480         * dwfl_segment_report_module.c (dwfl_segment_report_module): Likewise.
481         * link_map.c (report_r_debug): Likewise.
482         * offline.c (dwfl_report_offline): Likewise.
483         * linux-proc-maps.c (grovel_auxv, get_pid_class,
484         dwfl_linux_proc_find_elf): Likewise.
485         (read_proc_memory): Replace off64_t with off_t.
486         * find-debuginfo.c (find_debuginfo_in_path): Replace stat64 and
487         fstat64 with stat and fstat.
488         (try_open): Likewise, and replace open64 with open.
489         * linux-kernel-modules.c: Manually define open and fopen to open64 and
490         fopen64 when needed, since the early fts.h include breaks that.
491         (try_kernel_name): Replace open64 with open.
492         (check_notes): Likewise.
493
494 2015-10-09  Jose E. Marchesi  <jose.marchesi@oracle.com>
495
496         * linux-proc-maps.c (read_proc_memory): Use seek+read instead of
497         pread, as the later doesn't accept negative offsets.
498
499 2015-10-07  Mark Wielaard  <mjw@redhat.com>
500
501         * dwfl_module_getdwarf.c (MAX): Removed.
502         (find_prelink_address_sync): Allocate exact amount of bytes for
503         phdrs and shdrs.
504         * dwfl_segment_report_module.c (dwfl_segment_report_module):
505         Likewise for phdrs.
506         * elf-from-memory.c (MAX): Removed.
507         (elf_from_remote_memory): Allocate exact amount of bytes for phdrs.
508
509 2015-10-05  Chih-Hung Hsieh <chh@google.com>
510
511         * dwfl_module_getdwarf.c (find_prelink_address_sync): Do not use
512         union of variable length arrays.
513         * dwfl_segment_report_module.c (dwfl_segment_report_module): Likewise.
514         * elf-from-memory.c (elf_from_remote_memory): Likewise.
515         * link_map.c (auxv_format_probe): Likewise.
516         * link_map.c (report_r_debug): Likewise.
517         * link_map.c (dwfl_link_map_report): Likewise.
518
519 2015-09-18  Chih-Hung Hsieh  <chh@google.com>
520
521         * relocate.c (relocate_section): Move nested function "relocate"
522         to file scope, pass all used local variables as constants.
523         Move nested "check_badreltype" to file scope, pass addresses of
524         updated used local variables.
525         * linux-kernel-modules.c (intuit_kernel_bounds): Move nested function
526         "read_address" to file scope, pass all updated local variables in
527         a state structure.
528         * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Move nested
529         function "subst_name" to file scope, pass all used local variables
530         as constants.
531         * linux-kernel-modules.c (dwfl_linux_kernel_report_kernel): Replace
532         simple nested function "report" with a macro. Work around gcc static
533         analysis error -Werror=maybe-uninitialized.
534
535 2015-09-22  Mark Wielaard  <mjw@redhat.com>
536
537         * core-file.c: Remove old-style function definitions.
538         * dwfl_error.c: Likewise.
539         * dwfl_module_dwarf_cfi.c: Likewise.
540         * dwfl_module_eh_cfi.c: Likewise.
541         * dwfl_module_register_names.c: Likewise.
542         * dwfl_module_return_value_location.c: Likewise.
543         * dwfl_version.c: Likewise.
544
545 2015-09-09  Chih-Hung Hsieh  <chh@google.com>
546             Mark Wielaard  <mjw@redhat.com>
547
548         * dwfl_frame.c (dwfl_attach_state): Remove redundant NULL tests
549         on parameters declared with __nonnull_attribute__.
550         * libdwfl.h (dwfl_module_getelf): Don't mark first argument as
551         nonnull.
552
553 2015-09-08  Mark Wielaard  <mjw@redhat.com>
554
555         * libdwflP.h (struct __libdwfl_pid_arg): Add elf and elf_fd.
556         * linux-pid-attach.c (pid_detach): Call elf_end and close.
557         (dwfl_linux_proc_attach): Open and save /proc/PID/exe.
558
559 2015-09-04  Chih-Hung Hsieh  <chh@google.com
560
561         * frame_unwind.c (expr_eval): Use llabs instead of abs.
562
563 2015-08-14  Dodji Seketeli  <dodji@seketeli.org>
564
565         * find-debuginfo.c (find_debuginfo_in_path): Try to locate the
566         debug info file named debuglink_file under
567         mod->dwfl->callbacks->debuginfo_path, by looking at
568         the set of sub-trees under mod->dwfl->callbacks->debuginfo_path
569         which is common to the set of non-absolute parent trees of
570         file_name.
571
572 2015-06-18  Mark Wielaard  <mjw@redhat.com>
573
574         * find-debuginfo.c (try_open): Free fname on all failure paths.
575
576 2015-06-18  Mark Wielaard  <mjw@redhat.com>
577
578         * dwfl_module_getdwarf.c (find_symtab): Check shdr is not NULL and
579         sh_entsize is not zero.
580
581 2015-06-06  Mark Wielaard  <mjw@redhat.com>
582
583         * find-debuginfo.c (find_debuginfo_in_path): Always free localpath,
584         localname and file_dirname.
585
586 2015-06-06  Mark Wielaard  <mjw@redhat.com>
587
588         * derelocate.c (cache_sections): Free sortrefs.
589
590 2015-06-05  Mark Wielaard  <mjw@redhat.com>
591
592         * dwfl_segment_report_module.c (dwfl_segment_report_module):
593         If the note_file exists, but the build_id doesn't match discard
594         the file and continue reporting.
595
596 2015-06-01  Mark Wielaard  <mjw@redhat.com>
597
598         * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Copy path
599         pointer before passing to strsep.
600
601 2015-05-30  Mark Wielaard  <mjw@redhat.com>
602
603         * link_map.c (check32): Use read_4ubyte_unaligned_noncvt to read
604         type and value.
605         (read_addrs): Use read_(4|8)ubyte_unaligned_noncvt or to read
606         adresses.
607
608 2015-05-30  Mark Wielaard  <mjw@redhat.com>
609
610         * find-debuginfo.c (dwfl_standard_find_debuginfo): Check file_name is
611         not NULL before calling canonicalize_file_name.
612
613 2015-05-24  Mark Wielaard  <mjw@redhat.com>
614
615         * derelocate.c (check_module): Check mod is not NULL.
616
617 2015-05-22  Mark Wielaard  <mjw@redhat.com>
618
619         * link_map.c (dwfl_link_map_report): Allocate phdrs and dyn with
620         malloc instead of stack allocating. Call free when done with data.
621
622 2015-05-22  Mark Wielaard  <mjw@redhat.com>
623
624         * dwfl_segment_report_module.c (dwfl_segment_report_module):
625         Allocate phdrs with malloc, not on stack. free in finish.
626         Allocate dyn with malloc, not on stack, free after use.
627
628 2015-05-22  Mark Wielaard  <mjw@redhat.com>
629
630         * find-debuginfo.c (find_debuginfo_in_path): malloc or strdup,
631         instead of alloca or strdupa, local strings of unknown size.
632         Call free before return.
633
634 2015-05-22  Mark Wielaard  <mjw@redhat.com>
635
636         * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Return
637         error when id_len too small or too large. strdup, not strdupa,
638         and free path when done.
639
640 2015-05-19  Mark Wielaard  <mjw@redhat.com>
641
642         * elf-from-memory.c (elf_from_remote_memory): Don't allocate all
643         phdrs on the stack. Allocate with malloc and free when done.
644
645 2015-05-19  Mark Wielaard  <mjw@redhat.com>
646
647         * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): malloc and
648         free alternate_name.
649
650 2015-05-19  Mark Wielaard  <mjw@redhat.com>
651
652         * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Don't
653         stack allocate name. Only change chars up to suffix.
654
655 2015-05-18  Mark Wielaard  <mjw@redhat.com>
656
657         * dwfl_module_getdwarf.c (find_prelink_address_sync): Allocate
658         phdrs and shdrs unions with malloc, not alloca. Free after use.
659
660 2015-05-18  Mark Wielaard  <mjw@redhat.com>
661
662         * derelocate.c (cache_sections): Allocate temporary newrefs and
663         sortrefs with malloc, not alloca. Always free them on return.
664
665 2015-05-07  Mark Wielaard  <mjw@redhat.com>
666
667         * cu.c (intern_cu): Check for EOF and check cuoff points to a real
668         Dwarf_Die before interning. Explicitly check EOF is expected.
669
670 2015-05-05  Mark Wielaard  <mjw@redhat.com>
671
672         * dwfl_lineinfo.c (dwfl_lineinfo): Check info->file is valid.
673
674 2015-05-06  Roland McGrath  <roland@hack.frob.com>
675
676         * dwfl_error.c (struct msgtable): Break type definition out of
677         the 'msgtable' initializer.
678         (msgtable): Make it a union of struct msgtable and a char array.
679         (msgstr): Use the full-table char array rather than the msg_0 entry.
680
681 2015-04-23  Max Filippov  <jcmvbkbc@gmail.com>
682
683         * core-file.c (_compat_without_executable_dwfl_core_file_report):
684         Guard with SYMBOL_VERSIONING.
685         * dwfl_module_build_id.c (_compat_vaddr_at_end_dwfl_module_build_id):
686         Likewise.
687         * dwfl_report_elf.c (_compat_without_add_p_vaddr_dwfl_report_elf):
688         Likewise.
689
690 2015-04-02  Mark Wielaard  <mjw@redhat.com>
691
692         * segment.c (insert): Check correct number of lookup_elts.
693
694 2015-03-31  Mark Wielaard  <mjw@redhat.com>
695
696         * core-file.c (core_file_read_eagerly): Special case small images.
697
698 2015-01-26  Mark Wielaard  <mjw@redhat.com>
699
700         * dwfl_module_getdwarf.c (find_symtab): Explicitly clear symdata,
701         syments and first_global on elferr before calling find_dynsym.
702
703 2014-12-27  Mark Wielaard  <mjw@redhat.com>
704
705         * dwfl_module_getsrc.c (dwfl_module_getsrc): Never match a line that
706         has end_sequence set.
707
708 2015-01-04  Mark Wielaard  <mjw@redhat.com>
709
710         * cu.c (intern_cu): Store result and return directly when finding
711         EOF marker.
712         (__libdwfl_nextcu): Check *nextp as returned by intern_cu isn't -1.
713
714 2014-12-19  Mark Wielaard  <mjw@redhat.com>
715
716         * dwfl_module_getdwarf.c (find_symtab): Always try find_dynsym last.
717
718 2014-12-19  Mark Wielaard  <mjw@redhat.com>
719
720         * elf-from-memory.c (handle_segment): Remove palign sanity check.
721
722 2014-12-18  Mark Wielaard  <mjw@redhat.com>
723
724         * relocate.c (resolve_symbol): Make sure symstrdata->d_buf != NULL.
725
726 2014-12-13  Mark Wielaard  <mjw@redhat.com>
727
728         * dwfl_module_getdwarf.c (find_dynsym): elf_getdata_rawchunk takes
729         a size_t, make sure it doesn't overflow.
730
731 2014-12-13  Mark Wielaard  <mjw@redhat.com>
732
733         * cu.c (cudie_offset): Make sure Dwarf_Off difference doesn't
734         wrap around before returning as int.
735
736 2014-12-11  Josh Stone  <jistone@redhat.com>
737
738         * dwfl_module_getsrc.c (dwfl_module_getsrc): Return the *last* line
739         record <= addr, rather than returning immediately on matches.
740
741 2014-12-09  Mark Wielaard  <mjw@redhat.com>
742
743         * dwfl_segment_report_module.c (handle_file_note): Check count doesn't
744         overflow.
745
746 2014-12-07  Mark Wielaard  <mjw@redhat.com>
747
748         * relocate.c (relocate_section): Sanity check section overlap against
749         actually used ehsize, shentsize and phentsize.
750
751 2014-12-07  Mark Wielaard  <mjw@redhat.com>
752
753         * offline.c (dwfl_offline_section_address): Assert shndx is not zero.
754         * relocate.c (__libdwfl_relocate_value): Don't relocate against
755         section zero.
756
757 2014-11-29  Mark Wielaard  <mjw@redhat.com>
758
759         * relocate.c (relocate_section): Check relocation section and target
760         section data don't overlap any of the ELF headers.
761         (relocate): Check for offset + size overflow.
762
763 2014-11-22  Mark Wielaard  <mjw@redhat.com>
764
765         * link_map.c (consider_executable): Use elf_getphdrnum.
766         (dwfl_link_map_report): Likewise.
767
768 2014-11-18  Mark Wielaard  <mjw@redhat.com>
769
770         * dwfl_module_getdwarf.c (find_symtab): Sanity check the data buffer,
771         number of symbols and first_global before use.
772
773 2014-11-14  Mark Wielaard  <mjw@redhat.com>
774
775         * dwfl_module_getdwarf.c (load_symtab): Don't use tables which have
776         a zero sh_entsize.
777
778 2014-11-10  Mark Wielaard  <mjw@redhat.com>
779
780         * dwfl_module_getdwarf.c (find_dynsym): New inner function
781         translate_offs that takes an adjust argument. Try finding
782         the symbol table with and without adjusting to main_bias.
783
784 2014-09-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
785
786         Support NT_FILE for locating files.
787         * core-file.c (dwfl_core_file_report): New variables note_file and
788         note_file_size, set them and pass them to dwfl_segment_report_module.
789         * dwfl_segment_report_module.c: Include common.h and fcntl.h.
790         (buf_has_data, buf_read_ulong, handle_file_note): New functions.
791         (invalid_elf): New function from code of dwfl_segment_report_module.
792         (dwfl_segment_report_module): Add parameters note_file and
793         note_file_size.  New variables elf and fd, clean them up in finish.
794         Move some code to invalid_elf.  Call handle_file_note, if it found
795         a name verify the file by invalid_elf.  Protect elf and fd against
796         cleanup by finish if we found the file for new Dwfl_Module.
797         * libdwflP.h (dwfl_segment_report_module): Add parameters note_file and
798         note_file_size.
799
800 2014-09-23  Mark Wielaard  <mjw@redhat.com>
801
802         * dwfl_segment_report_module.c (dwfl_segment_report_module):
803         Extract ei_class, ei_data and e_type early and use the result.
804
805 2014-09-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
806
807         * dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Use IS_EXECUTABLE.
808         * dwfl_segment_report_module.c (dwfl_segment_report_module): Set
809         IS_EXECUTABLE.
810         * libdwflP.h (struct Dwfl_Module): New field is_executable.
811
812 2014-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
813
814         * dwfl_module_getdwarf.c (find_offsets): Add parameter main_bias, use
815         it.
816         (find_dynsym): Pass the new parameter main_bias.
817
818 2014-08-14  Mark Wielaard  <mjw@redhat.com>
819
820         * linux-kernel-modules.c (check-suffix): Also TRY .ko.xz.
821
822 2014-07-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
823
824         Fix report_r_debug for prelinked libraries.
825         * link_map.c (report_r_debug): Comment out variable l_addr.
826         Use instead new variable base recalculated from l_ld.
827
828 2014-06-24  Kurt Roeckx  <kurt@roeckx.be>
829
830         * linux-pid-attach.c: Make it build on non linux hosts.
831
832 2014-06-17  Mark Wielaard  <mjw@redhat.com>
833
834         * frame_unwind.c (handle_cfi): Use ebl_func_addr_mask.
835         * dwfl_module_getsym.c (__libdwfl_getsym): Likewise.
836
837 2014-06-15  Mark Wielaard  <mjw@redhat.com>
838
839         * linux-core-attach.c (core_memory_read): Use libdw/memory-access.h
840         macros read_4ubyte_unaligned_noncvt and read_8ubyte_unaligned_noncvt
841         to read possibly unaligned data.
842         (core_next_thread): Likewise.
843         (core_set_initial_registers): Likewise.
844         (dwfl_core_file_attach): Likewise.
845
846 2014-06-11  Mark Wielaard  <mjw@redhat.com>
847
848         * dwfl_frame.c (__libdwfl_process_free): Reset dwfl->attacherr.
849         (dwfl_attach_state): Set dwfl->attacherr.
850         (dwfl_pid): Check and return dwfl->attacherr if set.
851         (dwfl_getthreads): Likewise.
852         (getthread): Likewise.
853         * libdwflP.h: Add DWFL_E_NO_CORE_FILE.
854         (struct Dwfl): Add attacherr field.
855         * linux-core-attach.c (dwfl_core_file_attach): Set dwfl->attacherr.
856         Don't assert if ELF file is not ET_CORE, just return error.
857         * linux-pid-attach.c (dwfl_linux_proc_attach): Set dwfl->attacherr.
858
859 2014-06-10  Mark Wielaard  <mjw@redhat.com>
860
861         * argp-std.c (parse_opt): Ignore errors from dwfl_core_file_attach
862         or dwfl_linux_proc_attach.
863
864 2014-05-15  Mark Wielaard  <mjw@redhat.com>
865
866         * linux-proc-maps.c (grovel_auxv): Close fd on error.
867
868 2014-05-02  Mark Wielaard  <mjw@redhat.com>
869
870         * dwfl_module_getdwarf: Remove ENABLE_DWZ ifdefs so find_debug_altlink
871         is always called.
872
873 2014-05-01  Mark Wielaard  <mjw@redhat.com>
874
875         * libdwflP.h (struct Dwfl_Module): Add alt, alt_fd and alt_elf fields.
876         (__libdwfl_open_mod_by_build_id): Renamed __libdwfl_open_by_build_id.
877         (__libdwfl_open_by_build_id): New declaration that takes an explicit
878         build-id.
879         * dwfl_build_id_find_debuginfo.c (dwfl_build_id_find_debuginfo): If
880         we already have the Dwarf then look for the alt dwz multi file by
881         build-id.
882         * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Add the
883         build-id we are looking for as argument.
884         (__libdwfl_open_mod_by_build_id): New function, calls
885         __libdwfl_open_by_build_id.
886         (dwfl_build_id_find_elf): Call __libdwfl_open_mod_by_build_id.
887         * dwfl_module.c (__libdwfl_module_free): Release alt, alt_elf and
888         close alt_fd if necessary.
889         * dwfl_module_getdwarf.c (__check_build_id): Removed.
890         (try_debugaltlink): Removed.
891         (open_debugaltlink): Removed.
892         (open_elf_file): First half of open_elf that just opens the elf
893         file but doesn't setup the load address.
894         (open_elf): Call open_elf_file.
895         (find_debug_altlink): New function.
896         (load_dw): Remove loading of dwz multifile.
897         (find_dw): Call find_debug_altlink.
898         * find-debuginfo.c (validate): Handle alt debug case using
899         dwelf_dwarf_gnu_debugaltlink and mod->alt_elf.
900         (find_debuginfo_in_path): Handle alt debug files possibly in .dwz
901         subdirs.
902         * linux-kernel-modules.c (try_kernel_name): Use fakemod.debug.name
903         to store name to find by dwfl_standard_find_debuginfo instead of
904         allocating an extra variable on stack.
905
906 2014-04-30  Mark Wielaard  <mjw@redhat.com>
907
908         * dwfl_module_build_id.c (__libdwfl_find_elf_build_id): Moved to
909         dwelf_elf_gnu_build_id.c.
910         (__libdwfl_find_build_id): Add assert to make sure mod is never NULL.
911         * dwfl_segment_report_module.c (dwfl_segment_report_module): Call
912         dwelf_elf_gnu_build_id directly instead of __libdwfl_find_build_id.
913         * dwfl_module_getdwarf.c (__check_build_id): Implement using
914         dwelf_elf_gnu_build_id.
915
916 2014-04-15  Florian Weimer  <fweimer@redhat.com>
917
918         * dwfl_module_getdwarf.c (__check_build_id): Moved from libdw.
919         (try_debugaltlink): Likewise.
920         (open_debugaltlink): Likewise.
921         (load_dw): Locate alternate debug information using
922         dwelf_dwarf_gnu_debugaltlink and call open_debugaltlink.
923
924 2014-04-11  Mark Wielaard  <mjw@redhat.com>
925
926         * Makefile.am (AM_CPPFLAGS): Add libdwelf.
927         * libdwflP.h: Include libdwelfP.h.
928         * dwfl_module_getdwarf.c (find_debuglink): Moved to libdwelf.
929         (find_debuginfo): Use dwelf_elf_gnu_debuglink.
930
931 2014-04-22  Mark Wielaard  <mjw@redhat.com>
932
933         * frame_unwind.c (__libdwfl_frame_reg_get): Use uint64_t when
934         checking bits.
935         (__libdwfl_frame_reg_set): Likewise.
936
937 2014-04-22  Kurt Roeckx  <kurt@roeckx.be>
938
939         * linux-pid-attach.c: Make linux only.
940
941 2014-03-14  Mark Wielaard  <mjw@redhat.com>
942
943         * Makefile.am: Remove !MUDFLAP and MUDFLAP conditions.
944         Remove libelf and libdw definitions when MUDFLAP is defined.
945         * argp-std.c (__libdwfl_argp_mudflap_options): Removed.
946
947 2014-03-03  Mark Wielaard  <mjw@redhat.com>
948
949         * elf-from-memory.c (elf_from_remote_memory): Keep track of
950         segments_end_mem. Pass memsz to first handle_segment pass. Only
951         extend contents_size and use shdrs if only file bits are in
952         segment.
953
954 2014-03-11  Josh Stone  <jistone@redhat.com>
955
956         * dwfl_module_getdwarf.c (open_elf): Only explicitly set
957         mod->e_type when processing the main ELF file.
958
959 2014-03-04  Mark Wielaard  <mjw@redhat.com>
960
961         * libdwflP.h (struct __libdwfl_pid_arg): Moved here and renamed from
962         linux-pid-attach.c (struct pid_arg).
963         (__libdwfl_get_pid_arg): New internal function declaration.
964         (__libdwfl_ptrace_attach): Likewise.
965         (__libdwfl_ptrace_detach): Likewise.
966         * dwfl_frame.c (dwfl_attach_state): Add "(deleted)" files to the
967         special exception modules that cannot be checked at this point.
968         * linux-pid-attach.c (struct pid_arg): Moved to libdwflP.h
969         (ptrace_attach): Renamed to...
970         (__libdwfl_ptrace_attach): New internal function.
971         (__libdwfl_ptrace_detach): Likewise. Extracted from ...
972         (pid_thread_detach): Call __libdwfl_ptrace_detach now.
973         (__libdwfl_get_pid_arg): New internal function.
974         * linux-proc-maps.c (dwfl_linux_proc_find_elf): Check if special
975         module name contains "(deleted)" and dwfl_pid gives an attached
976         pid. If pid is set and try to (re)use ptrace attach state of
977         process before reading memory.
978
979 2014-03-03  Mark Wielaard  <mjw@redhat.com>
980
981         * elf-from-memory.c (elf_from_remote_memory): Take pagesize as
982         argument. Free buffer when detecting bad elf. Check PT_LOAD
983         alignment requirements on first handle_segment pass. Calculate
984         loadbase, start and end of segment using pagesize, not p_align.
985         * linux-proc-maps.c (dwfl_linux_proc_find_elf): Provide pagesize
986         to elf_from_remote_memory.
987
988 2014-02-26  Mark Wielaard  <mjw@redhat.com>
989
990         * linux-proc-maps.c (proc_maps_report): Don't assert on bad input.
991
992 2014-02-26  Mark Wielaard  <mjw@redhat.com>
993
994         * elf-from-memory.c (elf_from_remote_memory): Check against p64
995         p_type in case ELFCLASS64, not against p32 p_type.
996
997 2014-01-17  Petr Machata  <pmachata@redhat.com>
998
999         * relocate.c (relocate_section): Use gelf_fsize instead of relying
1000         on shdr->sh_entsize.
1001
1002 2014-01-05  Mark Wielaard  <mjw@redhat.com>
1003
1004         * frame_unwind.c (handle_cfi): Only skip resetting return register
1005         if the regno is not the actual CIE return address register.
1006
1007 2014-01-02  Mark Wielaard  <mjw@redhat.com>
1008
1009         * linux-pid-attach.c (dwfl_linux_proc_attach): Use strtol, not atoi.
1010
1011 2013-12-30  Mark Wielaard  <mjw@redhat.com>
1012
1013         * argp-std.c (parse_opt): Call dwfl_linux_proc_attach and
1014         dwfl_core_file_attach explicitly.
1015         * core-file.c (dwfl_core_file_report): Don't call
1016         __libdwfl_attach_state_for_core implicitly.
1017         * dwfl_begin.c (dwfl_begin): Remove setting of process_attach_error.
1018         * dwfl_frame.c (dwfl_pid): Set errno to DWFL_E_NO_ATTACH_STATE, not
1019         process_attach_error.
1020         (dwfl_getthreads): Likewise.
1021         (getthread): Likewise.
1022         * libdwfl.h (dwfl_core_file_report): Update documentation.
1023         (dwfl_linux_proc_report): Likewise.
1024         (dwfl_core_file_attach): New function declaration.
1025         (dwfl_linux_proc_attach): Likewise.
1026         * libdwflP.h (struct Dwfl): Remove process_attach_error.
1027         (__libdwfl_attach_state_for_pid): Removed declaration.
1028         (__libdwfl_attach_state_for_core): Likewise.
1029         (dwfl_core_file_attach): New internal declaration.
1030         (dwfl_linux_proc_attach): Likewise.
1031         (attach_state_for_core): Renamed to...
1032         (dwfl_core_file_attach): ...this. Change return type.
1033         (__libdwfl_attach_state_for_core): Removed.
1034         * linux-pid-attach.c (struct pid_arg): Add assume_ptrace_stopped.
1035         (pid_set_initial_registers): Check assume_ptrace_stopped before
1036         calling ptrace.
1037         (pid_thread_detach): Likewise.
1038         (__libdwfl_attach_state_for_pid): Renamed to...
1039         (dwfl_linux_proc_attach): ...this. Adjust return type.
1040         * linux-proc-maps.c (dwfl_linux_proc_report): Don't call
1041         __libdwfl_attach_state_for_pid implicitly.
1042
1043 2013-12-28  Mark Wielaard  <mjw@redhat.com>
1044
1045         * linux-proc-maps.c (dwfl_linux_proc_find_elf): Don't return special
1046         character device files, only regular files.
1047
1048 2013-12-24  Mark Wielaard  <mjw@redhat.com>
1049
1050         * linux-core-attach.c (core_next_thread): Check whether thread_argp
1051         is NULL. Reset core_arg->thread_note_offset and malloc a thread_arg
1052         in that case. Free thread_arg if there are no more threads.
1053
1054 2013-12-23  Mark Wielaard  <mjw@redhat.com>
1055
1056         * dwfl_segment_report_module.c (dwfl_segment_report_module): Free
1057         build_id before returning early.
1058
1059 2013-12-23  Mark Wielaard  <mjw@redhat.com>
1060
1061         * linux-pid-attach.c (__libdwfl_attach_state_for_pid): Report actual
1062         pid (thread group leader) to dwfl_attach_state.
1063
1064 2013-12-21  Mark Wielaard  <mjw@redhat.com>
1065
1066         * frame_unwind.c (handle_cfi): Track whether the return register
1067         has been set and only allow it to be set once.
1068
1069 2013-12-20  Mark Wielaard  <mjw@redhat.com>
1070
1071         * dwfl_frame.c (one_arg): New struct.
1072         (get_one_thread_cb): New function.
1073         (dwfl_getthread): Likewise.
1074         (one_thread): New struct.
1075         (get_one_thread_frames_cb): New function.
1076         (dwfl_getthread_frames): Likewise.
1077         * libdwfl.h (Dwfl_Thread_Callbacks): Add get_thread function.
1078         (dwfl_getthread_frames): Likewise.
1079         * libdwflP.h (dwfl_getthread_frames): New internal function declaration.
1080         * linux-core-attach.c (core_thread_callbacks): Initialize get_thread
1081         to NULL.
1082         * linux-pid-attach.c (pid_getthread): New function.
1083         (pid_thread_callbacks): Initialize get_thread to pid_getthread.
1084
1085 2013-12-20  Mark Wielaard  <mjw@redhat.com>
1086
1087         * linux-kernel-modules.c (report_kernel_archive): Correct nested
1088         asprintf result check for debug.a.
1089
1090 2013-12-18  Mark Wielaard  <mjw@redhat.com>
1091
1092         * derelocate.c (__libdwfl_find_section_ndx): New internal function.
1093         * dwfl_module_addrname.c (dwfl_module_addrname): Use
1094         dwfl_module_addrinfo.
1095         * dwfl_module_addrsym.c (dwfl_module_addrsym_elf): Replace with...
1096         (__libdwfl_addrsym): ...this. Use __libdwfl_getsym, use value
1097         for comparisons, not st_value. Fill in off. Search for both value
1098         and the (adjusted) sym.st_value when different.
1099         (dwfl_module_addrsym): Implement using __libdwfl_addrsym.
1100         (dwfl_module_addrinfo): New function.
1101         * dwfl_module_getsym.c (dwfl_module_getsym_elf): Replace with...
1102         (__libdwfl_getsym): ...this. Use ebl_resolve_sym_value if requested
1103         and possible. Adjust sym->st_value only when requested. Fill in addr
1104         if available.
1105         (dwfl_module_getsym_info): New function.
1106         (dwfl_module_getsym): Use __libdwfl_getsym.
1107         * libdwfl.h (dwfl_module_getsym_elf): Removed.
1108         (dwfl_module_getsym_info): New function declaration.
1109         (dwfl_module_addrinfo): Likewise.
1110         (dwfl_module_addrsym): Add documentation describing differences
1111         with addrinfo variants.
1112         (dwfl_module_addrsym_elf): Removed.
1113         * libdwflP.h (__libdwfl_getsym): New internal function declaration.
1114         (__libdwfl_addrsym): Likewise.
1115         (__libdwfl_find_section_ndx): Likewise.
1116         (dwfl_module_addrinfo): New internal declaration.
1117         (dwfl_module_getsym_info): Likewise.
1118         (dwfl_module_addrsym_elf): Removed.
1119         (dwfl_module_getsym_elf): Likewise.
1120
1121 2013-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
1122
1123         * argp-std.c (offline_find_elf): Remove.
1124         (offline_callbacks): Use dwfl_build_id_find_elf instead.
1125         * dwfl_build_id_find_elf.c (dwfl_build_id_find_elf): Move here the code
1126         removed above.
1127
1128 2013-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
1129
1130         unwinder: s390 and s390x
1131         * dwfl_frame_pc.c (dwfl_frame_pc): Call ebl_normalize_pc.
1132         * frame_unwind.c (new_unwound): New function from ...
1133         (handle_cfi): ... here.  Call it.
1134         (setfunc, getfunc, readfunc): New functions.
1135         (__libdwfl_frame_unwind): Call ebl_unwind with those functions.
1136         * linux-core-attach.c (core_set_initial_registers): Always iterate
1137         through the Ebl_Register_Location loop.  Call
1138         dwfl_thread_state_register_pc there.
1139
1140 2013-12-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
1141
1142         * frame_unwind.c (handle_cfi): Call ebl_dwarf_to_regno for RA.
1143
1144 2013-12-17  Mark Wielaard  <mjw@redhat.com>
1145
1146         * linux-pid-attach.c (pid_next_thread): Call rewinddir on first
1147         traversal.
1148
1149 2013-12-16  Mark Wielaard  <mjw@redhat.com>
1150
1151         * libdwfl.h (dwfl_module_getsymtab_first_global): New function
1152         definition.
1153         * dwfl_module_getdwarf.c (dwfl_module_getsymtab_first_global): New
1154         function.
1155         * libdwflP.h (dwfl_module_getsymtab_first_global): New internal
1156         function definition.
1157         * dwfl_module_addrsym.c (dwfl_module_addrsym_elf): Use new function.
1158
1159 2013-12-14  Mark Wielaard  <mjw@redhat.com>
1160
1161         * dwfl_module.c (__libdwfl_module_free): Free mod->reloc_info if
1162         allocated. Call dwarf_cfi_end on mod->eh_cfi if necessary.
1163         * frame_unwind.c (handle_cfi): Free frame result from
1164         dwarf_cfi_addrframe when done.
1165
1166 2013-12-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1167
1168         unwinder: ppc and ppc64
1169         * frame_unwind.c (__libdwfl_frame_reg_get, __libdwfl_frame_reg_set):
1170         Call ebl_dwarf_to_regno.
1171         * linux-core-attach.c (core_set_initial_registers): Implement
1172         pc_register support.
1173         * linux-pid-attach.c (pid_thread_state_registers_cb): Implement
1174         FIRSTREG -1.
1175
1176 2013-11-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
1177
1178         Introduce process_attach_error.
1179         * dwfl_begin.c (dwfl_begin): Initialize process_attach_error.
1180         * dwfl_frame.c (dwfl_pid, dwfl_getthreads): Use PROCESS_ATTACH_ERROR if
1181         PROCESS is NULL.
1182         * libdwflP.h (struct Dwfl): New field process_attach_error.
1183         * linux-core-attach.c (__libdwfl_attach_state_for_core): Rename to ...
1184         (attach_state_for_core): ... here, make it static, change return type,
1185         no longer use __libdwfl_seterrno.
1186         (__libdwfl_attach_state_for_core): New wrapper for it.
1187
1188 2013-11-27  Mark Wielaard  <mjw@redhat.com>
1189
1190         * dwfl_module_addrsym.c (dwfl_module_addrsym): Rename to and call...
1191         (dwfl_module_addrsym_elf): this. Add elfp and biasp arguments,
1192         keep track of symelf, addr_symelf, closest_elf and sizeless_elf
1193         instead of tracking dwfl_files.
1194         * dwfl_module_getsym.c (__libdwfl_module_getsym): Renamed to...
1195         (dwfl_module_getsym_elf): ...this. Remove dwfl_file argument, add
1196         new elfp and biasp arguments. Track elf instead of file.
1197         (dwfl_module_getsym): Call dwfl_module_getsym_elf.
1198         dwfl_module_info.c (dwfl_module_info): Pass elf to
1199         dwfl_adjusted_st_value.
1200         * libdwfl.h (dwfl_module_getsym): Document limitations of shndx.
1201         (dwfl_module_getsym_elf): New function declaration.
1202         (dwfl_module_addrsym_elf): Likewise.
1203         * libdwflP.h (dwfl_module_addrsym_elf): INTDECL.
1204         (dwfl_module_getsym_elf): Likewise.
1205         (dwfl_adjusted_st_value): Take and check elf not dwfl_file.
1206         (dwfl_deadjust_st_value): Likewise.
1207         (__libdwfl_module_getsym): Removed.
1208         * relocate.c (resolve_symbol): Pass elf to dwfl_adjusted_st_value.
1209
1210 2013-11-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
1211
1212         Fix non-build-id core files on build-id system.
1213         * link_map.c (report_r_debug): Remove valid clearing if build-id cannot
1214         be read from memory.
1215
1216 2013-11-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
1217
1218         * dwfl_segment_report_module.c (dwfl_segment_report_module): New
1219         variable close_elf.  Call __libdwfl_find_elf_build_id and compare the
1220         content, if possible.
1221
1222 2013-11-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
1223
1224         link_map: Use proper bias, not l_addr.
1225         * core-file.c (dynamic_vaddr_get): Rename to ...
1226         (__libdwfl_dynamic_vaddr_get): ... here, make it global,
1227         internal_function.
1228         (dwfl_core_file_report): Update name in the caller.
1229         * libdwflP.h (__libdwfl_dynamic_vaddr_get): New declaration.
1230         * link_map.c (report_r_debug): New variable elf_dynamic_vaddr.  Call
1231         __libdwfl_dynamic_vaddr_get for it.  Remove L_ADDR FIXME comment.
1232         Use ELF_DYNAMIC_VADDR instead of L_ADDR.
1233
1234 2013-11-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
1235
1236         Compatibility with older kernels such as RHEL-6.
1237         * linux-pid-attach.c (struct pid_arg): New field tid_was_stopped.
1238         (ptrace_attach): New parameter tid_was_stoppedp.  Set it.
1239         (pid_set_initial_registers): Pass tid_was_stopped.
1240         (pid_thread_detach): Use tid_was_stopped.
1241
1242 2013-11-18  Josh Stone  <jistone@redhat.com>
1243
1244         * dwfl_module_getdwarf.c (find_aux_address_sync): New function.
1245         (find_aux_sym): Use it.
1246
1247 2013-11-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
1248
1249         Code cleanup: Remove const in prototype
1250         * dwfl_frame_regs.c (dwfl_thread_state_registers): Remove const from
1251         firstreg.
1252         * libdwfl.h (dwfl_thread_state_registers): Likewise.
1253         * linux-pid-attach.c (pid_thread_state_registers_cb): Likewise.
1254
1255 2013-11-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
1256
1257         Fix dwfl_attach_state machine->elf.
1258         * dwfl_frame.c (dwfl_attach_state): Change parameter machine to elf.
1259         Call ebl_openbackend instead of ebl_openbackend_machine.
1260         * libdwfl.h (dwfl_attach_state): Change parameter machine to elf.
1261         Update the function description.
1262         * linux-core-attach.c (__libdwfl_attach_state_for_core): Pass CORE to
1263         dwfl_attach_state.
1264         * linux-pid-attach.c (__libdwfl_attach_state_for_pid): Pass NULL to
1265         dwfl_attach_state.
1266
1267 2013-11-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
1268
1269         Provide __libdwfl_module_getsym to get dwfl_file *.
1270         * dwfl_module_addrsym.c (dwfl_module_addrsym) (i_to_symfile): Remove.
1271         (dwfl_module_addrsym) (search_table): New variable file.  Use
1272         __libdwfl_module_getsym.  Use file.
1273         * dwfl_module_getsym.c (dwfl_module_getsym): Rename to ...
1274         (__libdwfl_module_getsym): ... here.  Add parameter filep.  Set it.
1275         (dwfl_module_getsym): New wrapper.
1276         * libdwflP.h (__libdwfl_module_getsym): New declaration.
1277
1278 2013-11-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
1279
1280         Fix dwfl_module_addrsym for minidebuginfo.
1281         * dwfl_module_addrsym.c (dwfl_module_addrsym): New variable
1282         addr_symfile.
1283         (dwfl_module_addrsym) (same_section): Use it.
1284         (dwfl_module_addrsym) (i_to_symfile): New function.
1285         (dwfl_module_addrsym) (search_table): Use it.
1286
1287 2013-11-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1288             Mark Wielaard  <mjw@redhat.com>
1289
1290         * Makefile.am (libdwfl_a_SOURCES): Add dwfl_frame.c, frame_unwind.c,
1291         dwfl_frame_pc.c, linux-pid-attach.c, linux-core-attach.c and
1292         dwfl_frame_regs.c.
1293         * core-file.c (dwfl_core_file_report): Call
1294         __libdwfl_attach_state_for_core.
1295         * dwfl_end.c (dwfl_end): Call __libdwfl_process_free.
1296         * dwfl_frame.c: New file.
1297         * frame_unwind.c: New file.
1298         * dwfl_frame_pc.c: New file.
1299         * linux-pid-attach.c: New file.
1300         * linux-core-attach.c: New file.
1301         * dwfl_frame_regs.c: New file.
1302         * libdwfl.h (Dwfl_Thread, Dwfl_Frame): New typedefs.
1303         (dwfl_core_file_report, dwfl_linux_proc_report): Extend comments.
1304         (Dwfl_Thread_Callbacks): New definition.
1305         (struct ebl, dwfl_attach_state, dwfl_pid, dwfl_thread_dwfl)
1306         (dwfl_thread_tid, dwfl_frame_thread, dwfl_thread_state_registers)
1307         (dwfl_thread_state_register_pc, dwfl_getthreads, dwfl_thread_getframes)
1308         (dwfl_frame_pc): New declarations.
1309         * libdwflP.h (Dwfl_Process): New typedef.
1310         (LIBEBL_BAD, CORE_MISSING, INVALID_REGISTER, PROCESS_MEMORY_READ)
1311         (PROCESS_NO_ARCH, PARSE_PROC, INVALID_DWARF, UNSUPPORTED_DWARF)
1312         (NEXT_THREAD_FAIL, ATTACH_STATE_CONFLICT, NO_ATTACH_STATE, NO_UNWIND)
1313         (INVALID_ARGUMENT): New DWFL_ERROR entries.
1314         (struct Dwfl): New entry process.
1315         (struct Dwfl_Process, struct Dwfl_Thread, struct Dwfl_Frame)
1316         (__libdwfl_frame_reg_get, __libdwfl_frame_reg_set)
1317         (__libdwfl_process_free, __libdwfl_frame_unwind)
1318         (__libdwfl_attach_state_for_pid, __libdwfl_attach_state_for_core)
1319         (__libdwfl_segment_start, __libdwfl_segment_end): New declarations.
1320         (dwfl_attach_state, dwfl_pid, dwfl_thread_dwfl, dwfl_thread_tid)
1321         (dwfl_frame_thread, dwfl_thread_state_registers)
1322         (dwfl_thread_state_register_pc, dwfl_getthreads, dwfl_thread_getframes)
1323         (dwfl_frame_pc): New INTDECL entries.
1324         * linux-proc-maps.c (dwfl_linux_proc_report): Call
1325         __libdwfl_attach_state_for_pid.
1326         * segment.c (segment_start): Rename to ...
1327         (__libdwfl_segment_start): ... here and make it internal_function.
1328         (segment_end): Rename to ...
1329         (__libdwfl_segment_end): ... here and make it internal_function.
1330         (reify_segments, dwfl_report_segment): Rename them at the callers.
1331
1332 2013-11-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1333
1334         * core-file.c (dwfl_core_file_report): Remove the use of MAX.
1335
1336 2013-11-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1337
1338         * core-file.c (dwfl_core_file_report): Replaced variable sniffed by
1339         retval.  Fix one forgotten LISTED increase.
1340
1341 2013-11-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1342
1343         Fix core files for re-prelink-ed files.
1344         * core-file.c (dynamic_vaddr_get): New function.
1345         (dwfl_core_file_report): New variable file_dynamic_vaddr.  Call
1346         dynamic_vaddr_get instead of using L_ADDR.
1347         * libdwflP.h (struct r_debug_info_module): Remove field l_addr.
1348         * link_map.c (report_r_debug): Do not initialize l_addr.
1349
1350 2013-11-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
1351
1352         Code cleanup.
1353         * core-file.c (dwfl_core_file_report): Reindent block of code by
1354         continue keyword.
1355
1356 2013-10-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
1357
1358         * argp-std.c (parse_opt): Use executable parameter of
1359         dwfl_core_file_report.
1360         * core-file.c (dwfl_core_file_report): Add parameter executable.  Set
1361         it to DWFL.  Add NEW_VERSION for it.
1362         (_compat_without_executable_dwfl_core_file_report): New.  Twice.
1363         * libdwfl.h (dwfl_core_file_report): Add parameter executable, update
1364         the function comment.
1365
1366 2013-10-15  Mark Wielaard  <mjw@redhat.com>
1367
1368         * linux-proc-maps.c (proc_maps_report): Ignore non-absolute file
1369         mappings.
1370         (dwfl_linux_proc_find_elf): Don't abort, just return failure.
1371
1372 2013-09-12  Mark Wielaard  <mjw@redhat.com>
1373
1374         * cu.c (intern_cu): If dwarf_offdie fails free cu.
1375
1376 2013-09-12  Mark Wielaard  <mjw@redhat.com>
1377
1378         * linux-proc-maps.c (proc_maps_report): Don't fclose FILE in
1379         bad_report.
1380
1381 2013-09-12  Mark Wielaard  <mjw@redhat.com>
1382
1383         * dwfl_module_getdwarf.c (find_symtab): Call elf_getdata with
1384         aux_xndxscn, not xndxscn, for aux_symxndxdata.
1385
1386 2013-08-25  Mark Wielaard  <mjw@redhat.com>
1387
1388         * linux-kernel-modules.c (report_kernel): Pass add_p_vaddr as true
1389         to dwfl_report_elf.
1390
1391 2013-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
1392
1393         * dwfl_segment_report_module.c (dwfl_segment_report_module): Check for
1394         conflicts all the modules, not just the first one.  Compare L_LD if it
1395         is equal, not if it is in a module address range.
1396
1397 2013-07-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
1398
1399         * libdwflP.h (__libdwfl_elf_address_range): Add internal_function.
1400
1401 2013-07-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
1402
1403         * core-file.c (clear_r_debug_info): Close also ELF and FD.
1404         (dwfl_core_file_report): Call __libdwfl_report_elf for
1405         R_DEBUG_INFO.MODULE.
1406         * dwfl_report_elf.c (__libdwfl_elf_address_range): New function from
1407         code of ...
1408         (__libdwfl_report_elf): ... this function.  Call it.
1409         * dwfl_segment_report_module.c: Include unistd.h.
1410         (dwfl_segment_report_module): Use basename for MODULE->NAME.
1411         Clear MODULE if it has no build-id and we have segment with build-id.
1412         Ignore this segment only if MODULE still contains valid ELF.
1413         * libdwflP.h (__libdwfl_elf_address_range): New declaration.
1414         (struct r_debug_info_module): New fields fd, elf, l_addr, start, end
1415         and disk_file_has_build_id.
1416         (dwfl_link_map_report): Extend the comment.
1417         * link_map.c (report_r_debug): Extend the comment.  Always fill in new
1418         r_debug_info_module.  Initialize also the new r_debug_info_module
1419         fields.  Remove one FIXME comment.  Call __libdwfl_elf_address_range
1420         instead of __libdwfl_report_elf when R_DEBUG_INFO is not NULL.
1421
1422 2013-07-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
1423
1424         * libdwflP.h (__libdwfl_find_elf_build_id): Add internal_function.
1425
1426 2013-07-02  Mark Wielaard  <mjw@redhat.com>
1427
1428         * relocate.c (__libdwfl_relocate_value): Remove mod->e_type assert.
1429
1430 2013-06-05  Mark Wielaard  <mjw@redhat.com>
1431
1432         * link_map.c (report_r_debug): Always call release_buffer after
1433         memory_callback succeeded reading build_id.
1434
1435 2013-05-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
1436
1437         * argp-std.c (parse_opt) <ARGP_KEY_SUCCESS> <opt->core> <opt->e>: Set
1438         executable_for_core before calling dwfl_core_file_report.
1439         * core-file.c (clear_r_debug_info): New function.
1440         (dwfl_core_file_report): Move raw segments reporting lower.  New
1441         variable r_debug_info, pass it to dwfl_segment_report_module.  Call
1442         clear_r_debug_info in the end.  Return sum of LISTED and SNIFFED.
1443         * dwfl_module_build_id.c (check_notes): Move into
1444         __libdwfl_find_elf_build_id.
1445         (__libdwfl_find_build_id): Rename to ...
1446         (__libdwfl_find_elf_build_id): ... here.  Add parameters build_id_bits,
1447         build_id_elfaddr and build_id_len.  Verify MOD vs. ELF.
1448         (__libdwfl_find_elf_build_id) (check_notes): Remove parameters mod and
1449         set, rename data_vaddr to data_elfaddr.  Do not call found_build_id.
1450         (__libdwfl_find_elf_build_id): Update the check_notes caller, do not
1451         adjust its data_elfaddr parameter.
1452         (__libdwfl_find_build_id): New wrapper of __libdwfl_find_elf_build_id.
1453         * dwfl_segment_report_module.c (dwfl_segment_report_module): New
1454         parameter r_debug_info.  New variable name_is_final.  Adjust addresses
1455         according to R_DEBUG_INFO->MODULE.  Check conflicts against DWFL.
1456         Do not overwrite NAME by SONAME if NAME_IS_FINAL.
1457         * libdwflP.h (__libdwfl_find_elf_build_id): New declaration.
1458         (struct r_debug_info_module, struct r_debug_info): New definitions.
1459         (dwfl_segment_report_module, dwfl_link_map_report): Add parameter
1460         r_debug_info.
1461         * link_map.c: Include fcntl.h.
1462         (report_r_debug): Add parameter r_debug_info, describe it in the
1463         function comment.  Delete dwfl_addrmodule call and its dependent code.
1464         Verify build-id before calling dwfl_report_elf, also supply
1465         executable_for_core to it.  Store r_debug_info->module info when
1466         appropriate.
1467         (dwfl_link_map_report): Add parameter r_debug_info.  New variable
1468         in_ok.  Try to read IN from EXECUTABLE_FOR_CORE.  Update report_r_debug
1469         caller parameters.
1470
1471 2013-04-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
1472
1473         * dwfl_report_elf.c (__libdwfl_report_elf): Add parameter add_p_vaddr.
1474         Set it to true for ET_EXEC and ET_CORE.  Provide alternative
1475         setup of START and BIAS if !ADD_P_VADDR.  Set END from BIAS, not BASE.
1476         (dwfl_report_elf): Add parameter add_p_vaddr.  Pass it down.  Add
1477         NEW_VERSION.
1478         (_compat_without_add_p_vaddr_dwfl_report_elf) <SHARED>: New, with
1479         COMPAT_VERSION.
1480         * libdwfl.h (dwfl_report_elf): Add parameter add_p_vaddr.  Describe it.
1481         * libdwflP.h (__libdwfl_report_elf): Add parameter add_p_vaddr.
1482         * link_map.c (report_r_debug): Use true add_p_vaddr for dwfl_report_elf.
1483         * linux-kernel-modules.c (report_kernel): Use false add_p_vaddr for
1484         dwfl_report_elf.
1485         * offline.c (process_elf): Use true add_p_vaddr for dwfl_report_elf.
1486
1487 2013-04-27  Mark Wielaard  <mjw@redhat.com>
1488
1489         * link_map.c: #include system.h.
1490
1491 2013-04-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
1492
1493         * link_map.c (BE32, BE64, LE32, LE64): Delete the definitions, move
1494         them to lib/system.h.
1495
1496 2013-04-24  Mark Wielaard  <mjw@redhat.com>
1497
1498         * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
1499
1500 2013-03-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1501
1502         * dwfl_report_elf.c (__libdwfl_report_elf): Remove BASE aligning.
1503
1504 2013-03-12  Mark Wielaard  <mjw@redhat.com>
1505
1506         * dwfl_getsrclines.c (dwfl_getsrclines): Return 0 on success.
1507
1508 2013-02-22  Mark Wielaard  <mjw@redhat.com>
1509
1510         * open.c (__libdw_gunzip,__libdw_bunzip2,__libdw_unlzma): Define
1511         as DWFL_E_BADELF when not used.
1512
1513 2013-02-10  Mark Wielaard  <mjw@redhat.com>
1514
1515         * argp-std.c (parse_opt): Use opt->core and opt->e explicitly in
1516         failure messages When handling ARGP_KEY_SUCCESS because arg will
1517         not have been set.
1518
1519 2013-01-30  Jan Kratochvil  <jan.kratochvil@redhat.com>
1520
1521         * linux-proc-maps.c: Include system.h.
1522         (PROCEXEFMT, get_pid_class): New.
1523         (grovel_auxv): Detect 32-bit vs. 64-bit auxv, possibly call
1524         get_pid_class.
1525
1526 2013-01-23  Mark Wielaard  <mjw@redhat.com>
1527
1528         * dwfl_module_getdwarf.c (find_aux_sym): Don't substract one
1529         from aux_syments by default.
1530         (find_symtab): Also succeed when only aux_symdata is found.
1531         When no symtab is found always try to load auxiliary table.
1532         (dwfl_module_getsymtab): Substract one from result when both
1533         tables have symbols.
1534         * dwfl_module_getsym.c (dwfl_module_getsym): Only skip auxiliary
1535         zero entry when both tables have symbols.
1536         * dwfl_module_addrsym.c (dwfl_module_addrsym): Only substract
1537         one from first_global when both tables have symbols.
1538
1539 2013-01-16  Mark Wielaard  <mjw@redhat.com>
1540
1541         * libdwflP.h (struct Dwfl_Module): Add aux_sym, aux_symdata,
1542         aux_syments, aux_symstrdata, aux_symxndxdata and aux_first_global.
1543         (dwfl_adjusted_aux_sym_addr): New function.
1544         (dwfl_deadjust_aux_sym_addr): Likewise.
1545         (dwfl_adjusted_st_value): Take and check symfile argument.
1546         (dwfl_deadjust_st_value): Likewise.
1547         * dwfl_module_getdwarf.c (find_prelink_address_sync): Take and
1548         use dwfl_file as argument to set address_sync.
1549         (find_debuginfo): Call find_prelink_address_sync with debug file.
1550         (find_aux_sym): New function.
1551         (find_symtab): Use find_aux_sym if all we have is the dynsym table
1552         and fill in aux DwflModule fields.
1553         (dwfl_module_getsymtab): Return syments plus aux_syments.
1554         (load_symtab): Always set first_global.
1555         * dwfl_module_addrsym.c (dwfl_module_addrsym): Check symfile
1556         when using same_section. Calculate first_global based on both
1557         mod->first_global and mod->aux_first_global.
1558         * dwfl_module.c (__libdwfl_module_free): Free aux_sym.
1559         * dwfl_module_getsym.c (dwfl_module_getsym): Use auxsym table
1560         to retrieve symbol and name if necessary, making sure all locals
1561         from any table come before any globals.
1562         * dwfl_module_info.c (dwfl_module_info): Call dwfl_adjusted_st_value
1563         with symfile.
1564         * relocate.c (resolve_symbol): Likewise.
1565
1566 2013-01-07  Roland McGrath  <roland@hack.frob.com>
1567
1568         * link_map.c (auxv_format_probe): Handle unaligned 64-bit data, but
1569         still assume the data is at least 32-bit aligned anyway.
1570         (dwfl_link_map_report): Handle unaligned auxv data.
1571
1572 2012-12-11  Mark Wielaard  <mjw@redhat.com>
1573
1574         * linux-kernel-modules.c (report_kernel): Only free fname if
1575         find_kernel_elf succeeds and allocates it.
1576         (report_kernel_archive): Fix brackets around unlikely expression.
1577
1578 2012-11-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
1579
1580         * argp-std.c: Update Copyright year.
1581         (offline_find_elf): New function.
1582         (offline_callbacks): Use it for find_elf.
1583         (struct parse_opt): New.
1584         (parse_opt): New key ARGP_KEY_INIT.  In other make hook struct
1585         parse_opt pointer from former Dwfl pointer.  Delay 'e and OPT_COREFILE
1586         processing till ARGP_KEY_SUCCESS.  Initialize state->input already from
1587         ARGP_KEY_SUCCESS.  Modify the cleanup in ARGP_KEY_ERROR.  Make the
1588         final state->input initialization optional.
1589         * dwfl_end.c: Update Copyright year.
1590         (dwfl_end): Free executable_for_core.
1591         * libdwflP.h: Update Copyright year.
1592         (struct Dwfl): New field executable_for_core.
1593
1594 2012-11-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
1595
1596         * dwfl_report_elf.c (__libdwfl_report_elf): Simplify START and BIAS
1597         calculation.
1598
1599 2012-10-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
1600
1601         * dwfl_module_getdwarf.c (mod_verify_build_id): New function with code
1602         from ...
1603         (__libdwfl_getelf): ... here.  Call it.
1604
1605 2012-10-17  Jan Kratochvil  <jan.kratochvil@redhat.com>
1606
1607         * libdwfl.h (dwfl_module_getelf): Add __nonnull_attribute__.
1608
1609 2012-10-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1610
1611         * dwfl_segment_report_module.c (dwfl_segment_report_module):
1612         Initialize mod->MAIN_BIAS.
1613
1614 2012-10-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1615
1616         * dwfl_module_addrsym.c (dwfl_module_addrsym): New function
1617         binding_value.  Use it for both zero and non-zero size symbols
1618         comparisons.
1619
1620 2012-10-01  Mark Wielaard  <mjw@redhat.com>
1621
1622         * cu.c (cudie_offset): Don't use type_sig8, it might not be
1623         initialized and these are always real CUs, never TUs.
1624
1625 2012-10-01  Mark Wielaard  <mjw@redhat.com>
1626
1627         * derelocate.c (find_section): Check next section exists before
1628         accessing it.
1629
1630 2012-08-01  Petr Machata  <pmachata@redhat.com>
1631
1632         * offline.c (process_archive_member): Ignore entry "/SYM64/".
1633
1634 2012-03-28  Roland McGrath  <roland@hack.frob.com>
1635
1636         * dwfl_segment_report_module.c
1637         (dwfl_segment_report_module: read_portion): Don't use existing buffer
1638         when FILESZ is zero (string mode) and available portion doesn't hold
1639         a terminated string.
1640
1641 2011-12-02  Roland McGrath  <roland@hack.frob.com>
1642
1643         * elf-from-memory.c (elf_from_remote_memory): Fix ELFCLASS64 case
1644         to use elf64_xlatetom and PHDRS.p64.
1645         Reported by Serge Pavlov <serge.pavlov.at.gnu@gmail.com>.
1646
1647 2011-11-31  Mark Wielaard  <mjw@redhat.com>
1648
1649         * dwfl_module_addrsym.c (dwfl_module_addrsym): First search all
1650         global symbols. Then only when that doesn't provide a match search
1651         all local symbols too.
1652         * dwfl_module_getdwarf.c (load_symtab): Take first_global int arg
1653         and fill it in.
1654         (find_symtab): Initialize mod->first_global and pass it to load_symtab.
1655         * libdwfl/libdwflP.h (Dwfl_Module): Add first_global field.
1656
1657 2011-11-31  Mark Wielaard  <mjw@redhat.com>
1658
1659         * dwfl_module_addrsym.c (dwfl_module_addrsym): Only update
1660         sizeless_sym if needed and closer to desired addr.
1661
1662 2011-10-20  Mark Wielaard  <mjw@redhat.com>
1663
1664         * derelocate.c (cache_sections): Intern mod->reloc_info check.
1665         (dwfl_module_relocations): Don't check mod->reloc_info.
1666         (dwfl_module_relocation_info): Likewise.
1667         (find_section): Likewise.
1668
1669 2011-07-09  Roland McGrath  <roland@hack.frob.com>
1670
1671         * image-header.c (LE32): Macro removed (now in lib/system.h).
1672
1673 2011-04-11  Mark Wielaard  <mjw@redhat.com>
1674
1675         * linux-kernel-modules.c (vmlinux_suffixes): Guard definition
1676         by check for zlib, bzlib or lzma defines to check it isn't empty.
1677         (try_kernel_name): Use same guard for use of vmlinux_suffixes.
1678
1679 2011-03-08  Roland McGrath  <roland@redhat.com>
1680
1681         * dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL.
1682         Reported by Kurt Roeckx <kurt@roeckx.be>.
1683
1684 2011-02-11  Roland McGrath  <roland@redhat.com>
1685
1686         * linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz
1687         suffixes if corresponding decompression support is enabled.
1688
1689 2011-02-01  Roland McGrath  <roland@redhat.com>
1690
1691         * dwfl_module_getdwarf.c (find_prelink_address_sync): Use the
1692         section-end address as the synchronization point, rather than sh_addr.
1693
1694         * dwfl_module_getdwarf.c (find_prelink_address_sync): Discover
1695         PT_INTERP p_vaddr separately from main phdrs and undo phdrs.
1696
1697         * dwfl_module_getdwarf.c (find_prelink_address_sync): Fix pasto in
1698         last change, so we recognize PT_INTERP in ELFCLASS64 correctly.
1699
1700 2011-01-11  Roland McGrath  <roland@redhat.com>
1701
1702         * dwfl_module_getdwarf.c (open_elf): Remove section-based
1703         address_sync fixup from here.
1704         (find_prelink_address_sync): New function.
1705         (find_debuginfo): Call it.
1706         * libdwflP.h (DWFL_ERRORS): Add BAD_PRELINK error.
1707
1708 2011-01-04  Roland McGrath  <roland@redhat.com>
1709
1710         * dwfl_module_getdwarf.c (open_elf): Enhance address_sync calculation
1711         logic to consider section addresses, the better to survive all the
1712         possible prelink machinations.
1713         * libdwflP.h (struct dwfl_file): Comment change.
1714
1715 2010-11-30  Roland McGrath  <roland@redhat.com>
1716
1717         * derelocate.c (dwfl_module_relocations): Remove over-eager assert.
1718
1719 2010-11-12  Roland McGrath  <roland@redhat.com>
1720
1721         * libdwflP.h (struct Dwfl_Module): New member main_bias.
1722         (dwfl_adjusted_address, dwfl_deadjust_address): Use it.
1723         * dwfl_module_getdwarf.c (__libdwfl_getelf): Initialize it.
1724
1725         * libdwflP.h (dwfl_deadjust_address): New function.
1726         (dwfl_deadjust_dwarf_addr, dwfl_deadjust_st_value): New functions.
1727         * cu.c (addrarange): Use dwfl_deadjust_dwarf_addr.
1728         * dwfl_module_addrsym.c: Use dwfl_deadjust_st_value.
1729
1730 2010-11-11  Roland McGrath  <roland@redhat.com>
1731
1732         * libdwflP.h (struct dwfl_file): Remove bias member.
1733         Add vaddr and address_sync members instead.
1734         (dwfl_adjusted_address): Calculate using vaddr.
1735         (dwfl_adjusted_dwarf_addr): Calculate using address_sync and call that.
1736         (dwfl_adjusted_st_value): Use one of those calls.
1737         * dwfl_module_getdwarf.c (open_elf): Initialize vaddr and address_sync.
1738         * dwfl_segment_report_module.c (dwfl_segment_report_module): Likewise.
1739         * derelocate.c (dwfl_module_relocations): Update ET_EXEC assertions.
1740         * link_map.c (consider_executable): Adjust only MOD->low_addr for
1741         detected PIE bias change.
1742
1743         * libdwflP.h (dwfl_adjusted_dwarf_addr): New function.
1744         * dwfl_module_info.c: Use it.
1745         * cu.c (addrarange): Likewise.
1746         * dwfl_dwarf_line.c: Likewise.
1747         * dwfl_module_dwarf_cfi.c: Likewise.
1748         * dwfl_lineinfo.c: Likewise.
1749         * dwfl_nextcu.c: Likewise.
1750         * dwfl_module_getdwarf.c (dwfl_module_getdwarf): Likewise.
1751
1752         * libdwflP.h (dwfl_adjusted_st_value): New function.
1753         * relocate.c (resolve_symbol): Use it.
1754         * dwfl_module_getsym.c: Likewise.
1755         * dwfl_module_addrsym.c: Likewise.
1756         * dwfl_module_info.c: Likewise.
1757
1758         * libdwflP.h (dwfl_adjusted_address): New function.
1759         * dwfl_module_build_id.c (__libdwfl_find_build_id): Use it.
1760         * relocate.c (__libdwfl_relocate_value): Likewise.
1761         * derelocate.c (cache_sections): Likewise.
1762         (dwfl_module_address_section): Likewise.
1763         * dwfl_module_getelf.c: Likewise.
1764         * dwfl_module_eh_cfi.c: Likewise.
1765         * link_map.c (consider_executable): Likewise.
1766
1767 2010-08-24  Roland McGrath  <roland@redhat.com>
1768
1769         * dwfl_dwarf_line.c: New file.
1770         * Makefile.am (libdwfl_a_SOURCES): Add it.
1771
1772 2010-08-18  Roland McGrath  <roland@redhat.com>
1773
1774         * link_map.c (report_r_debug): Use found name if we have no name,
1775         even if we already have an Elf handle.
1776
1777 2010-06-30  Roland McGrath  <roland@redhat.com>
1778
1779         * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't be
1780         confused by -1 return from dwfl_build_id_find_elf after it opened
1781         the Elf handle.
1782         * find-debuginfo.c (dwfl_standard_find_debuginfo): Likewise for
1783         dwfl_build_id_find_debuginfo.
1784
1785 2010-06-16  Roland McGrath  <roland@redhat.com>
1786
1787         * cu.c (cudie_offset): Use DIE_OFFSET_FROM_CU_OFFSET macro.
1788
1789 2010-06-14  Roland McGrath  <roland@redhat.com>
1790
1791         * find-debuginfo.c (try_open): Take new arg MAIN_STAT.  Compare
1792         candidate file to that st_dev/st_ino and pretend it didn't exist
1793         if they match.
1794         (find_debuginfo_in_path): Update caller, pass main file's info.
1795
1796 2010-05-20  Roland McGrath  <roland@redhat.com>
1797
1798         * linux-proc-maps.c (find_sysinfo_ehdr): Renamed to ...
1799         (grovel_auxv): ... this.  Take DWFL argument.
1800         (dwfl_linux_proc_report): Update caller.
1801
1802         * dwfl_module_getdwarf.c (open_elf): Calculate alignment for bias
1803         based on dwfl->segment_align or manifest alignment of MOD->low_addr.
1804
1805 2010-05-19  Roland McGrath  <roland@redhat.com>
1806
1807         * linux-kernel-modules.c (intuit_kernel_bounds): Rewritten.
1808
1809 2010-05-06  Roland McGrath  <roland@redhat.com>
1810
1811         * segment.c (insert): Clear inserted elements of DWFL->lookup_module.
1812
1813         * libdwflP.h (DWFL_ERRORS): Add WRONG_ID_ELF.
1814         * dwfl_build_id_find_elf.c: Set MOD->main.valid when there is a build
1815         ID but we didn't find a file.
1816         * dwfl_module_getdwarf.c (__libdwfl_getelf): When that's set, check
1817         and refuse any fallback file-by-name if it lacks the matching ID.
1818
1819         * dwfl_error.c (dwfl_errno): Add INTDEF.
1820         * libdwflP.h: Add INTDECL.
1821
1822         * dwfl_module_getdwarf.c (open_elf): Do elf_end and clear FILE->elf in
1823         failure cases.
1824
1825 2010-05-04  Roland McGrath  <roland@redhat.com>
1826
1827         * dwfl_segment_report_module.c: Use "[pie]" rather than "[dso]" for an
1828         ET_DYN that has a DT_DEBUG.
1829
1830         * dwfl_segment_report_module.c: Fix jump-start of NDX-finding loop.
1831
1832         * segment.c (insert): Fix moving of values following insertion.
1833         (reify_segments): Fix up MOD->segment backpointer indices after
1834         later insertions in the main loop invalidate them.
1835
1836         * link_map.c (dwfl_link_map_report): Detect bias of embedded phdrs and
1837         apply it to PT_DYNAMIC p_vaddr so we handle a PIE correctly.
1838
1839         * core-file.c (dwfl_core_file_report): Return any nonzero count of
1840         modules reported, even if link_map grovelling failed and only sniffing
1841         found anything.
1842
1843 2010-04-26  Roland McGrath  <roland@redhat.com>
1844
1845         * relocate.c (relocate_section): Treat R_*_NONE reloc as no reloc.
1846         Works around probably-wrong ld -r behavior for case of a DWARF address
1847         constant that refers to a discarded SHF_ALLOC section.
1848
1849 2010-04-14  Roland McGrath  <roland@redhat.com>
1850
1851         * link_map.c (report_r_debug): Limit iterations on the l_next chain to
1852         an upper bound on sane possible number of elements.
1853
1854 2010-03-11  Roland McGrath  <roland@redhat.com>
1855
1856         * link_map.c (auxv_format_probe): Fix scanning loop, so we really scan
1857         the second half for 32-bit matches.
1858
1859 2010-03-10  Roland McGrath  <roland@redhat.com>
1860
1861         * core-file.c (dwfl_core_file_report): Punt EHDR argument.
1862         * argp-std.c (parse_opt): Update caller.
1863         * libdwfl.h: Declare dwfl_core_file_report.
1864         * libdwflP.h: Don't.
1865
1866 2010-02-17  Roland McGrath  <roland@redhat.com>
1867
1868         * dwfl_segment_report_module.c (addr_segndx): Take new flag argument.
1869         If set, find the first index not below ADDR.
1870         (dwfl_segment_report_module): Update callers.
1871         Pass true when calculating return value.
1872
1873 2010-02-15  Roland McGrath  <roland@redhat.com>
1874
1875         * Makefile.am: Use config/eu.am for common stuff.
1876
1877         * find-debuginfo.c (find_debuginfo_in_path): Fix uninitialized
1878         variable in failure path.
1879
1880 2010-02-02  Mark Wielaard  <mjw@redhat.com>
1881
1882         * dwfl_module_dwarf_cfi.c (dwfl_module_dwarf_cfi): Always set bias.
1883         * dwfl_module_eh_cfi.c (dwfl_module_eh_cfi): Likewise
1884
1885 2010-01-07  Roland McGrath  <roland@redhat.com>
1886
1887         * core-file.c (dwfl_core_file_report): Use elf_getphdrnum.
1888         * dwfl_module_build_id.c (__libdwfl_find_build_id): Likewise.
1889         * dwfl_module_getdwarf.c (open_elf, find_dynsym): Likewise.
1890         * dwfl_report_elf.c (__libdwfl_report_elf): Likewise.
1891
1892 2010-01-06  Roland McGrath  <roland@redhat.com>
1893
1894         * relocate.c (relocate_getsym): For SHN_COMMON, zero st_value.
1895         (relocate_section): Let unresolved SHN_COMMON symbol stay 0.
1896
1897 2009-11-16  Roland McGrath  <roland@redhat.com>
1898
1899         * relocate.c (relocate_section): Skip SHT_NOBITS or empty target scn.
1900
1901 2009-11-12  Petr Machata  <pmachata@redhat.com>
1902
1903         * core-file.c (dwfl_elf_phdr_memory_callback): Only load ahead if
1904         the chunk is both offset-contiguous and vaddr-contiguous.
1905
1906 2009-11-05  Roland McGrath  <roland@redhat.com>
1907
1908         * link_map.c (report_r_debug): Skip entries with l_ld==0.
1909         Use dwfl_addrmodule for l_ld lookup, don't bail on lookup failure.
1910
1911 2009-09-04  Roland McGrath  <roland@redhat.com>
1912
1913         * image-header.c (__libdw_image_header): Fix tranposed comparison.
1914
1915 2009-08-27  Roland McGrath  <roland@redhat.com>
1916
1917         * image-header.c: New file.
1918         * Makefile.am (libdwfl_a_SOURCES): Add it.
1919         * libdwflP.h: Declare __libdw_image_header.
1920         * open.c (decompress): Don't consume ELF on failure.
1921         (what_kind): New function, broken out of ...
1922         (__libdw_open_file): ... here.  Call it.
1923         If it fails, try __libdw_image_header and then try what_kind again.
1924
1925         * gzip.c (unzip): Reuse *WHOLE as first INPUT_BUFFER,
1926         leave it behind for next decompressor.
1927         * open.c (decompress): Free BUFFER on failure.
1928
1929 2009-08-26  Roland McGrath  <roland@redhat.com>
1930
1931         * gzip.c (find_zImage_payload): New function, broken out of ...
1932         (mapped_zImage): ... here.  Call it.
1933         (find_zImage_payload) [LZMA]: Match LZMA-compressed kernels with
1934         stupid method of just trying the decoder.
1935
1936         * open.c [USE_LZMA]: Try __libdw_unlzma.
1937         * libdwflP.h: Declare it.
1938         (DWFL_ERRORS): Add DWFL_E_LZMA.
1939         * gzip.c [LZMA]: Implement liblzma version for XZ file format.
1940         * lzma.c: New file.
1941         * Makefile.am [LZMA] (libdwfl_a_SOURCES): Add it.
1942
1943         * gzip.c (mapped_zImage): Limit scan to 32kb.
1944         Make this unconditional, support bzip2 kernel images too.
1945         (unzip): Use direct inflate method for non-mmap case too.
1946         Only zlib uses the stream method.
1947
1948 2009-08-09  Roland McGrath  <roland@redhat.com>
1949
1950         * dwfl_module_build_id.c: Use new macros for versioned definitions.
1951
1952 2009-07-08  Roland McGrath  <roland@redhat.com>
1953
1954         * dwfl_module_dwarf_cfi.c: New file.
1955         * dwfl_module_eh_cfi.c: New file.
1956         * Makefile.am (libdwfl_a_SOURCES): Add them.
1957         * libdwflP.h (struct Dwfl_Module): New members `dwarf_cfi', `eh_cfi.
1958         Add INTDECL for dwfl_module_eh_cfi, dwfl_module_dwarf_cfi.
1959
1960 2009-07-08  Roland McGrath  <roland@redhat.com>
1961
1962         * libdwflP.h (struct Dwfl_Module): Reorder members to pack better.
1963
1964 2009-06-18  Mark Wielaard  <mjw@redhat.com>
1965
1966         * dwfl_report_elf.c (__libdwfl_report_elf): Return NULL on overlap.
1967
1968 2009-06-13  Ulrich Drepper  <drepper@redhat.com>
1969
1970         * derelocate.c: Don't use deprecated libelf functions.
1971         * dwfl_module_getdwarf.c: Likewise.
1972         * relocate.c: Likewise.
1973
1974 2009-04-23  Ulrich Drepper  <drepper@redhat.com>
1975
1976         * dwfl_module_build_id.c: Define versioned symbols only if SHARED is
1977         defined.  Otherwise just define the latest version.
1978
1979 2009-04-22  Roland McGrath  <roland@redhat.com>
1980
1981         * relocate.c (resolve_symbol): Apply correct bias to st_value found in
1982         a non-ET_REL module.
1983
1984         * dwfl_module_build_id.c (__libdwfl_find_build_id): Fix last change to
1985         adjust properly for non-ET_REL.
1986
1987 2009-04-21  Roland McGrath  <roland@redhat.com>
1988
1989         * dwfl_module_getsym.c: Apply non-ET_REL bias only if SHF_ALLOC.
1990
1991         * relocate.c (__libdwfl_relocate_value): Assert that MOD is ET_REL.
1992         * derelocate.c (cache_sections): Call __libdwfl_relocate_value only
1993         for ET_REL.
1994         * dwfl_module_build_id.c (__libdwfl_find_build_id): Likewise.
1995
1996 2009-04-20  Roland McGrath  <roland@redhat.com>
1997
1998         * dwfl_module_getdwarf.c (__libdwfl_getelf): Add internal_function.
1999
2000 2009-04-19  Roland McGrath  <roland@redhat.com>
2001
2002         * dwfl_module_getdwarf.c (find_file): Renamed to ...
2003         (__libdwfl_getelf): ... this.  Make it global.
2004         (find_symtab, find_dw): Update callers.
2005         (dwfl_module_getelf): Functions moved ...
2006         * dwfl_module_getelf.c: ... here, new file.
2007         * Makefile.am (libdwfl_a_SOURCES): Add it.
2008         * libdwflP.h: Declare __libdwfl_getelf.
2009
2010 2009-04-14  Roland McGrath  <roland@redhat.com>
2011
2012         * dwfl_segment_report_module.c: Handle DT_STRTAB value being either
2013         absolute (already adjusted in place) or needing load bias adjustment.
2014
2015         * core-file.c (dwfl_elf_phdr_memory_callback): Fix return value for
2016         gelf_getphdr failure.  Fix file size limit checks.
2017
2018         * dwfl_segment_report_module.c: Fix underflow in DYNSTRSZ check.
2019
2020 2009-04-08  Roland McGrath  <roland@redhat.com>
2021
2022         * dwfl_module_getsym.c: Don't adjust for bias again after
2023         __libdwfl_relocate_value.
2024
2025         * relocate.c (__libdwfl_relocate_value): Don't adjust a value from
2026         a non-SHF_ALLOC section.
2027         (relocate_getsym): Test st_shndx for SHN_* values, not *SHNDX.
2028         * dwfl_module_getsym.c (dwfl_module_getsym): Likewise.
2029
2030 2009-03-09  Roland McGrath  <roland@redhat.com>
2031
2032         * dwfl_module_build_id.c (__libdwfl_find_build_id): Move SHSTRNDX
2033         variable to outer scope, so we cache it for the loop.
2034
2035         * relocate.c (__libdwfl_relocate_value): Add MOD->main.bias to sh_addr.
2036
2037 2009-02-12  Roland McGrath  <roland@redhat.com>
2038
2039         * dwfl_module_build_id.c (__libdwfl_find_build_id): Use
2040         __libdwfl_relocate_value to find correct sh_addr value.
2041
2042 2009-02-10  Roland McGrath  <roland@redhat.com>
2043
2044         * dwfl_report_elf.c (__libdwfl_report_elf): Take new arg SANITY.
2045         If false, don't fail for NO_PHDR.
2046         (dwfl_report_elf): Update caller.
2047         * libdwflP.h: Update decl.
2048         * offline.c (process_elf): Call it with false, so we don't refuse
2049         dubiously-formed objects here.
2050
2051         * link_map.c (consider_executable): Don't assert dwfl_addrsegment
2052         finds our module.  We shouldn't crash when we confuse some guesses.
2053
2054 2009-02-10  Ulrich Drepper  <drepper@redhat.com>
2055
2056         * open.c (decompress): Avoid crash with empty input file.
2057
2058 2009-01-27  Roland McGrath  <roland@redhat.com>
2059
2060         * dwfl_report_elf.c (__libdwfl_report_elf): Ignore trailing PT_LOAD
2061         with zero vaddr and memsz.
2062
2063 2009-01-22  Roland McGrath  <roland@redhat.com>
2064
2065         * open.c (decompress): Move BUFFER, SIZE decls outside #if.
2066
2067         * dwfl_segment_report_module.c (addr_segndx): Remove bogus adjustments
2068         after address-matching loop.
2069
2070         * segment.c (lookup): Fix fencepost in checking for HINT match.
2071
2072 2009-01-14  Roland McGrath  <roland@redhat.com>
2073
2074         * gzip.c [!BZLIB] (mapped_zImage): New function.
2075         (unzip) [!BZLIB]: Grok Linux kernel zImage format.
2076
2077 2009-01-10  Ulrich Drepper  <drepper@redhat.com>
2078
2079         * dwfl_error.c: Always use __thread.  Remove all !USE_TLS code.
2080
2081 2009-01-08  Roland McGrath  <roland@redhat.com>
2082
2083         * linux-kernel-modules.c (dwfl_linux_kernel_report_offline):
2084         Skip subdirectory named "source".
2085         (dwfl_linux_kernel_find_elf): Likewise.
2086
2087 2009-01-06  Roland McGrath  <roland@redhat.com>
2088
2089         * linux-kernel-modules.c (check_suffix): New function.
2090         Match ".ko", ".ko.gz", and ".ko.bz2" suffixes.
2091         (dwfl_linux_kernel_report_offline): Use it.
2092         (dwfl_linux_kernel_find_elf): Likewise.
2093
2094 2009-01-05  Roland McGrath  <roland@redhat.com>
2095
2096         * argp-std.c (parse_opt): Use __libdw_open_file for core file.
2097         * dwfl_build_id_find_debuginfo.c: Use it to open the file.
2098         * dwfl_build_id_find_elf.c: Likewise.
2099         * dwfl_module_getdwarf.c (open_elf): Likewise.
2100         * dwfl_report_elf.c: Likewise.
2101         * find-debuginfo.c (validate): Likewise.
2102         * offline.c (__libdwfl_report_offline): Likewise.
2103
2104         * libdwflP.h: Declare __libdw_open_file.
2105         * open.c: New file.
2106         * Makefile.am (libdwfl_a_SOURCES): Add it.
2107
2108         * gzip.c: New file.
2109         * Makefile.am [ZLIB] (libdwfl_a_SOURCES): Add it.
2110         * bzip2.c: New file.
2111         * Makefile.am [BZLIB] (libdwfl_a_SOURCES): Add it.
2112         * libdwflP.h: Declare __libdw_gunzip, __libdw_bunzip2.
2113
2114 2008-12-16  Roland McGrath  <roland@redhat.com>
2115
2116         * dwfl_module_build_id.c (dwfl_module_build_id): Define with alias and
2117         symver magic to bind to ELFUTILS_0.138.
2118         (_BUG_COMPAT_dwfl_module_build_id): New function, bug compatible
2119         wrapper for ELFUTILS_0.130 version set.
2120
2121 2008-12-18  Roland McGrath  <roland@redhat.com>
2122
2123         * derelocate.c (dwfl_module_relocate_address): Fix last fix: ET_DYN
2124         addresses are taken as relative to MOD->low_addr.
2125
2126 2008-12-15  Roland McGrath  <roland@redhat.com>
2127
2128         * derelocate.c (dwfl_module_relocate_address): Apply main.bias, not
2129         debug.bias.
2130
2131 2008-12-11  Roland McGrath  <roland@redhat.com>
2132
2133         * offline.c (process_archive): Don't call elf_end and close if
2134         returning NULL.  Check first elf_begin call and set error code
2135         specially for empty archive.
2136         Fixes RHBZ#465878.
2137
2138 2008-12-02  Roland McGrath  <roland@redhat.com>
2139
2140         * dwfl_getmodules.c (dwfl_getmodules): Typo fix in last change.
2141
2142 2008-11-26  Roland McGrath  <roland@redhat.com>
2143
2144         * dwfl_getmodules.c (dwfl_getmodules): Encode iteration style in
2145         return value, and interpret encoded OFFSET argument.
2146
2147 2008-10-07  Roland McGrath  <roland@redhat.com>
2148
2149         * dwfl_module_build_id.c (check_notes): Fix typo in vaddr calculation.
2150
2151 2008-09-29  Roland McGrath  <roland@redhat.com>
2152
2153         * segment.c (insert): Must realloc DWFL->lookup_module here too.
2154         (dwfl_report_segment): Clear DWFL->lookup_module before insert calls.
2155
2156 2008-08-28  Roland McGrath  <roland@redhat.com>
2157
2158         * segment.c (reify_segments): Fix last change.
2159
2160 2008-08-27  Roland McGrath  <roland@redhat.com>
2161
2162         * linux-proc-maps.c (read_proc_memory): Return 0 for EINVAL or EPERM
2163         failure from pread64.
2164
2165 2008-08-26  Roland McGrath  <roland@redhat.com>
2166
2167         * segment.c (reify_segments): Insert a trailing segment for a module
2168         end that is above the highest current segment.
2169
2170 2008-08-25  Roland McGrath  <roland@redhat.com>
2171
2172         * dwfl_module_getdwarf.c (open_elf): Extract elf_errno () for
2173         coded return value, not plain DWFL_E_LIBELF.  Return DWFL_E_BADELF
2174         if FILE->elf is not ELF_K_ELF.
2175
2176         * dwfl_segment_report_module.c: Add a cast.
2177
2178 2008-08-21  Denys Vlasenko  <dvlasenk@redhat.com>
2179
2180         * dwfl_module_addrsym.c (dwfl_module_addrsym): Improve logic
2181         which decides which symbol is "closest" to a given address.
2182
2183 2008-08-15  Roland McGrath  <roland@redhat.com>
2184
2185         * argp-std.c (offline_callbacks): Use dwfl_build_id_find_elf.
2186         (options, parse_opt): Handle --core.
2187
2188         * core-file.c: New file.
2189         * Makefile.am (libdwfl_a_SOURCES): Add it.
2190         * libdwflP.h (dwfl_core_file_report): Declare it.
2191
2192         * link_map.c: New file.
2193         * Makefile.am (libdwfl_a_SOURCES): Add it.
2194         * libdwflP.h (dwfl_link_map_report): Declare it.
2195
2196         * libdwflP.h (MIN, MAX): New macros.
2197         (Dwfl_Memory_Callback): New typedef.
2198         (Dwfl_Module_Callback): New typedef.
2199         (dwfl_segment_report_module): Declare it.
2200         * dwfl_segment_report_module.c: New file.
2201         * Makefile.am (libdwfl_a_SOURCES): Add it.
2202
2203         * derelocate.c (dwfl_module_address_section): Add INTDEF.
2204         * libdwflP.h: Add INTDECL.
2205
2206         * segment.c: New file.
2207         * Makefile.am (libdwfl_a_SOURCES): Add it.
2208         * libdwfl.h: Declare dwfl_addrsegment, dwfl_report_segment.
2209         * libdwflP.h (struct Dwfl): New members lookup_elts, lookup_alloc,
2210         lookup_addr, lookup_module, lookup_segndx, replace removed members
2211         modules, nmodules.
2212         (struct Dwfl_Module): New member segment.
2213         * dwfl_end.c (dwfl_end): Free the new ones.  Iterate via modulelist
2214         to each free module.
2215         * dwfl_module.c (dwfl_report_begin_add): Do nothing.
2216         (dwfl_report_begin): Don't call it.  Truncate the segment table instead.
2217         (dwfl_report_module): Don't touch DWFL->nmodules.
2218         (dwfl_report_end): Don't touch DWFL->modules and DWFL->nmodules.
2219         (compare_modules): Function removed.
2220         * dwfl_getmodules.c: Rewritten.
2221         Add INTDEF.
2222         * libdwflP.h: Add INTDECLs.
2223         * dwfl_getdwarf.c: Rewritten to call dwfl_getmodules.
2224         * dwfl_addrmodule.c: Rewritten to just call dwfl_addrsegment.
2225
2226 2008-08-03  Roland McGrath  <roland@redhat.com>
2227
2228         * linux-kernel-modules.c: Include <fts.h> before <config.h>.
2229
2230 2008-07-17  Roland McGrath  <roland@redhat.com>
2231
2232         * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Set errno to
2233         zero if the failure was only ENOENT.
2234
2235 2008-06-03  Roland McGrath  <roland@redhat.com>
2236
2237         * dwfl_module_addrsym.c (dwfl_module_addrsym): Exclude undefined
2238         symbols.
2239
2240 2008-05-22  Petr Machata  <pmachata@redhat.com>
2241
2242         * dwfl_module_getdwarf.c (open_elf): Bias of ET_EXEC files is always 0.
2243
2244 2008-05-06  Roland McGrath  <roland@frob.com>
2245
2246         * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Use
2247         FTS_LOGICAL here too.
2248         (dwfl_linux_kernel_find_elf): Likewise.
2249
2250 2008-04-29  Roland McGrath  <roland@redhat.com>
2251
2252         * find-debuginfo.c (dwfl_standard_find_debuginfo): Try path search
2253         based on canonicalize_file_name if it differs from the supplied name.
2254
2255         * linux-kernel-modules.c (check_module_notes): Use FTS_LOGICAL so
2256         we accept symlinks.
2257
2258 2008-04-27  Roland McGrath  <roland@redhat.com>
2259
2260         * linux-kernel-modules.c (report_kernel): Fix crash when
2261         dwfl_report_elf fails.
2262
2263 2008-04-05  Roland McGrath  <roland@redhat.com>
2264
2265         * linux-proc-maps.c (proc_maps_report): Don't leak LAST_FILE.
2266
2267         * dwfl_module_getdwarf.c (find_file): Always free build_id_bits.
2268         Clear it after freeing.
2269         * dwfl_module_report_build_id.c (dwfl_module_report_build_id): Likewise.
2270
2271 2008-03-26  Roland McGrath  <roland@redhat.com>
2272
2273         * dwfl_module_getdwarf.c (load_symtab): Don't return success for
2274         SHT_DYNSYM, just set *SYMSCN like the comment says.
2275
2276         * dwfl_end.c (dwfl_end): Iterate on modulelist chain, not modules array.
2277
2278         * argp-std.c (parse_opt): On failure, call dwfl_end before argp_failure.
2279
2280 2008-03-19  Roland McGrath  <roland@redhat.com>
2281
2282         * dwfl_module_getsrc.c: Adjust address for module bias before search.
2283
2284 2008-03-01  Roland McGrath  <roland@redhat.com>
2285
2286         * libdwflP.h (__libdwfl_seterrno): Remove parameter name from
2287         prototype to avoid older compiler's complaint about reuse of the name.
2288         (__libdwfl_canon_error): Likewise.
2289
2290 2008-02-19  Roland McGrath  <roland@redhat.com>
2291
2292         * relocate.c (relocate_section): Check for an unhandled relocation
2293         type before resolving a reloc's symbol.  Lift DWFL_E_BADRELTYPE ->
2294         DWFL_E_UNKNOWN_MACHINE check out of loops.
2295
2296         * dwfl_module_getdwarf.c (load_dw): Skip relocation if
2297         DEBUGFILE->relocated is already set.
2298
2299 2008-01-26  Roland McGrath  <roland@redhat.com>
2300
2301         * dwfl_module_getdwarf.c (open_elf): Open FILE->name if it's non-null.
2302
2303         * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Don't clear
2304         incoming *FILE_NAME at the start.
2305
2306 2008-01-08  Roland McGrath  <roland@redhat.com>
2307
2308         * Makefile.am (euinclude): Variable removed.
2309         (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
2310
2311 2007-10-23  Roland McGrath  <roland@redhat.com>
2312
2313         * linux-kernel-modules.c (report_kernel_archive): Reorder the kernel
2314         module to appear first.
2315
2316 2007-10-20  Roland McGrath  <roland@redhat.com>
2317
2318         * offline.c (process_archive_member): Take FD argument, pass it down
2319         to process_file.  Return Elf_Cmd, not bool.
2320         Call elf_next here, always before elf_end.
2321         (process_archive): Update caller.  Don't close FD here unless there
2322         are no member refs.
2323
2324         * dwfl_module.c (free_file): Close fd only when elf_end returns zero.
2325
2326         * libdwflP.h (struct dwfl_file): New bool member `relocated'.
2327         * dwfl_module_getdwarf.c (dwfl_module_getelf): For ET_REL, apply
2328         partial relocation to one or both files.
2329         (dwfl_module_getdwarf): For ET_REL, make sure extra sections'
2330         relocations have been applied to the debug file if dwfl_module_getelf
2331         has been used before.
2332
2333         * relocate.c (resolve_symbol): New function.
2334         (relocate_section): Call it.
2335
2336         * relocate.c (relocate_getsym): Handle null MOD->symfile.
2337         (relocate_section): Take new bool arg, PARTIAL.  If true,
2338         no error for BADRELTYPE/RELUNDEF, instead just skip them
2339         and leave only those skipped relocs behind the reloc section.
2340         (__libdwfl_relocate_section): Take new arg, pass it down.
2341         (__libdwfl_relocate): Take new bool arg, DEBUG.  If false,
2342         do partial relocation on all sections.
2343         * dwfl_module_getdwarf.c (load_dw): Update caller.
2344         * libdwflP.h: Update decls.
2345         * derelocate.c (dwfl_module_address_section): Pass new argument
2346         to __libdwfl_relocate_section, true.
2347
2348         * derelocate.c (cache_sections): Don't cache reloc sections when
2349         section_address callback is null.
2350
2351 2007-10-19  Roland McGrath  <roland@redhat.com>
2352
2353         * relocate.c (relocate_section): Fix fencepost error in r_offset check.
2354
2355         * derelocate.c (struct dwfl_relocation): Add member `relocs'.
2356         (struct secref): Likewise.
2357         (cache_sections): Cache the relocation section referring to each
2358         section we cache, if any.
2359         (dwfl_module_address_section): Use __libdwfl_relocate_section as
2360         necessary.
2361
2362         * relocate.c (struct reloc_symtab_cache): New type.
2363         (relocate_getsym): Use it instead of four arguments.
2364         (__libdwfl_relocate): Update caller.
2365         (relocate_section): New function, broken out of ...
2366         (__libdwfl_relocate): ... here.
2367         (__libdwfl_relocate_section): New function.
2368         * libdwflP.h: Declare it.
2369
2370 2007-10-17  Roland McGrath  <roland@redhat.com>
2371
2372         * dwfl_module_getsym.c (dwfl_module_getsym): Apply MOD->symfile->bias
2373         to relocated st_value.
2374
2375         * dwfl_report_elf.c (__libdwfl_report_elf): Align initial BASE for
2376         ET_REL to 0x100.
2377
2378 2007-10-16  Roland McGrath  <roland@redhat.com>
2379
2380         * dwfl_report_elf.c (__libdwfl_report_elf): Readjust BASE when a later
2381         section has larger alignment requirements not met by the original BASE,
2382         rather than padding more between sections.
2383
2384         * dwfl_report_elf.c (__libdwfl_report_elf): Fix bias calculation.
2385
2386         * dwfl_module_build_id.c (__libdwfl_find_build_id): Apply module bias
2387         to sh_addr value.
2388
2389         * dwfl_report_elf.c (__libdwfl_report_elf): Don't be confused by BASE
2390         at zero in ET_REL case.  Adjust BASE to necessary alignment.
2391
2392         * dwfl_module_build_id.c (check_notes): Take -1, not 0, as stub value
2393         for DATA_VADDR.
2394         (__libdwfl_find_build_id): Update caller.
2395
2396         * relocate.c (__libdwfl_relocate_value): Don't use sh_offset.
2397         * dwfl_report_elf.c (__libdwfl_report_elf): Likewise.
2398         * offline.c (dwfl_offline_section_address): Bail early if there is
2399         separate debug file.
2400
2401         * relocate.c (__libdwfl_relocate): Don't return DWFL_E_NO_DWARF.
2402
2403 2007-10-09  Roland McGrath  <roland@redhat.com>
2404
2405         * dwfl_report_elf.c (__libdwfl_report_elf): Clear SHDR->sh_offset when
2406         caching SHDR->sh_addr = 0.
2407         * offline.c (dwfl_offline_section_address): Never called for sh_addr
2408         really at 0, don't check for it.  Use MOD->debug directly, not symfile.
2409
2410         * dwfl_module_getdwarf.c (load_symtab): Return success properly when
2411         we've found SHT_SYMTAB.
2412
2413         * relocate.c (relocate_getsym): New function.
2414         (__libdwfl_relocate): Use it.
2415         (__libdwfl_relocate_value): Take new Elf * argument.  Make SYMSHSTRNDX
2416         be a pointer instead of value; cache getshstrndx result there.
2417         * libdwflP.h: Update decl.
2418         * derelocate.c (cache_sections): Update caller.
2419         Always work on the main file, not the symfile.
2420         (dwfl_module_address_section): Likewise.
2421         * dwfl_module_getsym.c (dwfl_module_getsym): Update caller.
2422
2423 2007-10-07  Roland McGrath  <roland@redhat.com>
2424
2425         * offline.c (process_archive): Initialize MOD.
2426
2427         * linux-kernel-modules.c (get_release): New function, broken out of ...
2428         (report_kernel): ... here.  Call it.
2429         (try_kernel_name): Take new arg TRY_DEBUG, only try ".debug" if set.
2430         (find_kernel_elf): Update caller.
2431         (report_kernel_archive): New function.
2432         (dwfl_linux_kernel_report_offline): Call it.
2433
2434         * offline.c (process_file): Take new arg PREDICATE, pass it down.
2435         (process_archive): Likewise.
2436         (process_archive_member): Likewise.  When nonnull, let the predicate
2437         decide whether to use this member.
2438         (__libdwfl_report_offline): New function, broken out of ...
2439         (dwfl_report_offline): ... here.  Call it.
2440         * libdwflP.h: Declare it.
2441
2442         * offline.c (process_archive, process_archive_member): New functions.
2443         (process_elf, process_file): New functions, broken out of ...
2444         (dwfl_report_offline): ... here.  Call process_file, which recurses on
2445         ELF_K_AR files.
2446
2447         * dwfl_report_elf.c (__libdwfl_report_elf): New, broken out of ...
2448         (dwfl_report_elf): ... here.  Call it.
2449         * libdwflP.h: Declare it.
2450
2451 2007-10-06  Roland McGrath  <roland@redhat.com>
2452
2453         * derelocate.c (dwfl_module_relocations): Don't call
2454         dwfl_module_getdwarf.
2455
2456         * derelocate.c (find_section): Use __libdwfl_seterrno, not
2457         __libdw_seterrno.
2458
2459         * relocate.c (__libdwfl_relocate_value): Abuse sh_offset, not
2460         SHF_ALLOC, to cache sh_addr resolved to 0.
2461
2462         * dwfl_report_elf.c (dwfl_report_elf): When an ET_REL file has sh_addr
2463         values nonzero already, just use its existing layout.
2464
2465         * relocate.c (__libdwfl_relocate): Clear size of reloc section in its
2466         in-core shdr after applying it.
2467
2468 2007-10-04  Ulrich Drepper  <drepper@redhat.com>
2469
2470         * linux-kernel-modules.c (dwfl_linux_kernel_report_kernel): Fake
2471         initialization of notes variable.
2472
2473 2007-10-04  Roland McGrath  <roland@redhat.com>
2474
2475         * linux-kernel-modules.c (intuit_kernel_bounds): Take new arg NOTES,
2476         fill in with vaddr of "__start_notes" symbol if found.
2477         (check_notes): New function.
2478         (check_kernel_notes): New function.
2479         (dwfl_linux_kernel_report_kernel): Call it.
2480         (check_module_notes): New function.
2481         (dwfl_linux_kernel_report_modules): Call it.
2482
2483         * linux-kernel-modules.c (dwfl_linux_kernel_find_elf):
2484         Try dwfl_build_id_find_elf first.
2485
2486         * linux-kernel-modules.c (report_kernel): Don't leak FD if !REPORT.
2487         Set kernel module e_type to ET_DYN.
2488
2489 2007-10-03  Roland McGrath  <roland@redhat.com>
2490
2491         * find-debuginfo.c (validate): New function, broken out of ...
2492         (find_debuginfo_in_path): ... here.  New function, broken out of ...
2493         (dwfl_standard_find_debuginfo): ... here.  Call it, after trying
2494         dwfl_build_id_find_debuginfo first.
2495
2496         * dwfl_build_id_find_elf.c: New file.
2497         * dwfl_build_id_find_debuginfo.c: New file.
2498         * Makefile.am (libdwfl_a_SOURCES): Add them.
2499         * libdwfl.h: Declare them.
2500         * libdwflP.h: Add INTDECLs.
2501
2502         * dwfl_module_build_id.c: New file.
2503         * dwfl_module_report_build_id.c: New file.
2504         * Makefile.am (libdwfl_a_SOURCES): Add them.
2505         * libdwfl.h: Declare them.
2506         * libdwflP.h (struct Dwfl_Module): New members build_id_bits,
2507         build_id_len, build_id_vaddr.  Declare __libdwfl_find_build_id.
2508         * dwfl_module.c (__libdwfl_module_free): Free MOD->build_id_bits.
2509
2510         * dwfl_module_getdwarf.c (find_offsets): New function.
2511         (find_dynsym): New function, calls that.
2512         (find_symtab): Call it.
2513
2514 2007-09-11  Roland McGrath  <roland@redhat.com>
2515
2516         * dwfl_module_addrsym.c: Prefer a later global symbol at the same
2517         address if its st_size is smaller.
2518
2519 2007-08-13  Roland McGrath  <roland@redhat.com>
2520
2521         * dwfl_module_addrsym.c: Add dead initializer for stupid compiler.
2522
2523 2007-08-12  Roland McGrath  <roland@redhat.com>
2524
2525         * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Don't use
2526         FTS_LOGICAL.
2527
2528         * elf-from-memory.c (elf_from_remote_memory): Don't reset LOADBASE on
2529         a second phdr if it happens to match EHDR_VMA exactly.
2530
2531 2007-08-08  Roland McGrath  <roland@redhat.com>
2532
2533         * dwfl_module_addrsym.c: Don't use STT_SECTION, STT_FILE symbols and
2534         those with no names.  Rewrite best symbol algorithm not to assume a
2535         sorted table and to be smarter handling sizeless symbols.
2536
2537 2007-07-16  Roland McGrath  <roland@redhat.com>
2538
2539         * dwfl_module.c (dwfl_report_module): Increment DWFL->nmodules when
2540         reviving an existing module.
2541
2542 2007-06-08  Roland McGrath  <roland@redhat.com>
2543
2544         * libdwflP.h: Fix #ifndef for config.h to use PACKAGE_NAME.
2545
2546 2007-05-17  Roland McGrath  <roland@redhat.com>
2547
2548         * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Look at
2549         whole /lib/modules/VERSION tree, not just /lib/modules/VERSION/kernel.
2550         (dwfl_linux_kernel_find_elf): Likewise.
2551
2552         * linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use
2553         getline and sscanf instead of fscanf.
2554
2555 2007-05-08  Roland McGrath  <roland@redhat.com>
2556
2557         * offline.c (dwfl_offline_section_address): Don't assume section
2558         numbers match between stripped and debuginfo files.  Instead, assume
2559         only that the ordering among SHF_ALLOC sections matches.
2560
2561         * linux-kernel-modules.c (report_kernel): Change RELEASE argument to
2562         pointer to string.
2563         (dwfl_linux_kernel_report_offline): Update caller.
2564         (dwfl_linux_kernel_report_kernel): Likewise.
2565
2566 2007-04-23  Roland McGrath  <roland@redhat.com>
2567
2568         * argp-std.c (options): Fix group title string.
2569
2570         * argp-std.c (parse_opt): Handle ARGP_KEY_ERROR, free the Dwfl.
2571         Update via STATE->input every time we set STATE->hook, not only at
2572         ARGP_KEY_SUCCESS.
2573
2574         * dwfl_module.c (free_file): Free FILE->name.
2575
2576 2007-04-16  Roland McGrath  <roland@redhat.com>
2577
2578         * derelocate.c (cache_sections): Apply bias to sh_addr.
2579         (compare_secrefs): Fix address comparison to avoid signed overflow.
2580         (find_section): New function, broken out of ...
2581         (dwfl_module_relocate_address): ... here, call it.
2582         (check_module): New function, broken out of ...
2583         (dwfl_module_relocate_address): ... here, call it.
2584         (dwfl_module_address_section): New function.
2585         * libdwfl.h: Declare it.
2586
2587 2007-03-26  Roland McGrath  <roland@redhat.com>
2588
2589         * dwfl_module.c (__libdwfl_module_free): Free MOD itself.
2590
2591 2007-03-18  Roland McGrath  <roland@redhat.com>
2592
2593         * dwfl_module_getdwarf.c (find_debuglink): New function, broken out of
2594         (find_debuginfo): ... here.  Call it.
2595         Don't return error for libelf errors finding .gnu_debuglink section.
2596
2597 2007-03-12  Roland McGrath  <roland@redhat.com>
2598
2599         * dwfl_module.c (dwfl_report_begin_add): New function broken out of ...
2600         (dwfl_report_begin): ... here.  Call it.
2601         * libdwfl.h: Declare it.
2602         * libdwflP.h: Add INTDECL.
2603
2604         * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo.
2605
2606         * offline.c: Comment typo fix.
2607
2608 2007-03-04  Roland McGrath  <roland@redhat.com>
2609
2610         * linux-kernel-modules.c (KERNEL_MODNAME): New macro for "kernel".
2611         (find_kernel_elf): New function, broken out of ...
2612         (report_kernel): ... here.  Call it.
2613         (dwfl_linux_kernel_find_elf): Use it for module named KERNEL_MODNAME.
2614         (intuit_kernel_bounds): New function, grovel /proc/kallsyms to guess
2615         virtual address bounds of kernel from symbols rounded to page size.
2616         (dwfl_linux_kernel_report_kernel): Use that if it works, before
2617         resorting to report_kernel.
2618
2619         * dwfl_module_getdwarf.c (open_elf): Set MOD->e_type to ET_DYN for an
2620         ET_EXEC file with nonzero bias.
2621
2622         * dwfl_module_addrname.c (dwfl_module_addrname): Just call
2623         dwfl_module_addrsym.  Guts moved to ...
2624         * dwfl_module_addrsym.c: ... here; new file.
2625         * Makefile.am (libdwfl_a_SOURCES): Add it.
2626         * libdwfl.h: Declare dwfl_module_addrsym.
2627         * libdwflP.h: Add INTDECL.
2628
2629 2007-03-03  Roland McGrath  <roland@redhat.com>
2630
2631         * dwfl_module.c (free_file): New function, broken out of ...
2632         (__libdwfl_module_free): ... here.  In it, close fd after elf_end.
2633
2634         * dwfl_module_getdwarf.c (open_elf): Close fd and reset to -1
2635         on libelf failure.
2636
2637 2007-03-02  Roland McGrath  <roland@redhat.com>
2638
2639         * linux-kernel-modules.c: Fix bogus error test for asprintf call.
2640
2641 2007-02-02  Roland McGrath  <roland@redhat.com>
2642
2643         * dwfl_addrmodule.c (dwfl_addrmodule): Match a module's high boundary
2644         address exactly if it's no other module's low boundary.
2645
2646         * dwfl_module_addrname.c (dwfl_module_addrname): If no symbol's value
2647         and size cover the address, select the closest symbol with st_size==0
2648         that lies in the same section.
2649
2650 2007-01-29  Roland McGrath  <roland@redhat.com>
2651
2652         * dwfl_version.c (dwfl_version): Return PACKAGE_VERSION,
2653         not PACKAGE_STRING.
2654
2655 2007-01-20  Roland McGrath  <roland@redhat.com>
2656
2657         * relocate.c (__libdwfl_relocate_value): Treat section_address of -1
2658         as omitted, not 0.
2659         * libdwfl.h (Dwfl_Callbacks): Update comment.
2660         * derelocate.c (cache_sections): Don't ignore sh_addr == 0 sections.
2661         * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
2662         For ignored missing section, use -1 instead of 0.
2663         * offline.c (dwfl_offline_section_address): Expect a call for 0.
2664
2665 2007-01-19  Roland McGrath  <roland@redhat.com>
2666
2667         * argp-std.c (parse_opt): For -e, reset DWFL->offline_next_address to
2668         zero so a lone -e foo.so is shown without address bias.
2669
2670 2007-01-10  Roland McGrath  <roland@redhat.com>
2671
2672         * linux-kernel-modules.c (report_kernel): Check asprintf return value
2673         directly instead of via side effect, to silence warn_unused_result.
2674         (dwfl_linux_kernel_report_offline): Likewise.
2675         (dwfl_linux_kernel_find_elf): Likewise.
2676         (dwfl_linux_kernel_module_section_address): Likewise.
2677         * find-debuginfo.c (try_open): Likewise.
2678         * linux-proc-maps.c (find_sysinfo_ehdr): Likewise.
2679         (dwfl_linux_proc_report): Likewise.
2680
2681         * libdwfl.h (dwfl_begin): Require nonnull argument.
2682
2683 2006-12-27  Roland McGrath  <roland@redhat.com>
2684
2685         * dwfl_module.c (compare_modules): Fix address comparison to avoid
2686         signed overflow.  Patch by Frank Ch. Eigler <fche@redhat.com>.
2687
2688 2006-10-30  Roland McGrath  <roland@redhat.com>
2689
2690         * dwfl_module.c (dwfl_report_module): Comment typo fix.
2691
2692 2006-09-05  Roland McGrath  <roland@redhat.com>
2693
2694         * derelocate.c (cache_sections): Use alloca instead of variable-sized
2695         auto array, in function already using alloca.
2696
2697 2006-08-14  Roland McGrath  <roland@redhat.com>
2698
2699         * linux-kernel-modules.c (try_kernel_name): If the call to
2700         dwfl_standard_find_debuginfo produces no results, try it again
2701         with NULL as DEBUGLINK_FILE to try *FNAME with .debug suffix.
2702
2703         * find-debuginfo.c (DEFAULT_DEBUGINFO_PATH): Macro moved ...
2704         * libdwflP.h: ... to here.
2705         * linux-kernel-modules.c (try_kernel_name): Skip manual open if it
2706         repeats the first thing dwfl_standard_find_debuginfo will try.
2707
2708         * linux-kernel-modules.c (MODULE_SECT_NAME_LEN): New macro.
2709         (dwfl_linux_kernel_module_section_address): If a /sys file is missing
2710         and the section name is >= MODULE_SECT_NAME_LEN, try truncating the
2711         section name.
2712
2713 2006-07-12  Ulrich Drepper  <drepper@redhat.com>
2714
2715         * cu.c: Adjust for internal_function_def removal.
2716         * dwfl_error.c: Likewise.
2717         * dwfl_module.c: Likewise.
2718         * dwfl_module_getdwarf.c: Likewise.
2719         * lines.c: Likewise.
2720         * relocate.c: Likewise.
2721
2722 2006-07-11  Ulrich Drepper  <drepper@redhat.com>
2723
2724         * dwfl_module.c (compare_modules): Don't return GElf_Sxword value,
2725         it can overflow the return value type.
2726         Patch by Tim Moore <timoore@redhat.com>.
2727
2728 2006-06-28  Roland McGrath  <roland@redhat.com>
2729
2730         * libdwfl.h: Cosmetic changes.
2731
2732         * dwfl_line_comp_dir.c: New file.
2733         * Makefile.am (libdwfl_a_SOURCES): Add it.
2734         * libdwfl.h: Declare dwfl_line_comp_dir.
2735
2736         * dwfl_lineinfo.c (dwfl_lineinfo): Remove stray extern in defn.
2737
2738         * dwfl_linecu.c: New file.
2739         * Makefile.am (libdwfl_a_SOURCES): Add it.
2740         * libdwfl.h: Declare dwfl_linecu.
2741
2742         * libdwflP.h (dwfl_linecu_inline): Function renamed from dwfl_linecu.
2743         (dwfl_linecu): Define as macro.
2744
2745         * relocate.c (__libdwfl_relocate): Use dwfl_module_getsym.
2746
2747         * dwfl_module_getdwarf.c (dwfl_module_getsymtab): New function.
2748         (dwfl_module_addrname): Function moved ...
2749         * dwfl_module_addrname.c: ... here, new file.
2750         * dwfl_module_getsym.c: New file.
2751         * Makefile.am (libdwfl_a_SOURCES): Add them.
2752         * libdwfl.h: Declare dwfl_module_getsymtab, dwfl_module_getsym.
2753         * libdwflP.h: Add INTDECLs.
2754
2755 2006-06-27  Roland McGrath  <roland@redhat.com>
2756
2757         * dwfl_module.c (dwfl_report_end): Whitespace fix.
2758
2759 2006-06-13  Roland McGrath  <roland@redhat.com>
2760
2761         * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo.
2762         Use __libdwfl_seterrno for elf_memory failure.
2763
2764 2006-05-22  Roland McGrath  <roland@redhat.com>
2765
2766         * dwfl_module_return_value_location.c
2767         (dwfl_module_return_value_location): Use __libdwfl_module_getebl.
2768
2769 2006-05-27  Ulrich Drepper  <drepper@redhat.com>
2770
2771         * libdwfl.h: Add extern "C".
2772
2773 2006-05-22  Ulrich Drepper  <drepper@redhat.com>
2774
2775         * cu.c (addrarange): Handle files without aranges information.
2776
2777 2006-05-16  Ulrich Drepper  <drepper@redhat.com>
2778
2779         * dwfl_addrmodule.c (dwfl_addrmodule): Also return NULL of
2780         ->modules is NULL.
2781
2782 2006-02-26  Roland McGrath  <roland@redhat.com>
2783
2784         * dwfl_version.c: New file.
2785         * Makefile.am (libdwfl_a_SOURCES): Add it.
2786         * libdwfl.h: Declare dwfl_version.
2787
2788         * offline.c (dwfl_report_offline): Account for dwfl_report_elf having
2789         aligned up from DWFL->offline_next_address when checking for overlap.
2790
2791 2005-12-22  Roland McGrath  <roland@redhat.com>
2792
2793         * argp-std.c (parse_opt): Call dwfl_end in failure cases.
2794
2795         * linux-proc-maps.c (proc_maps_report): New function, broken out of ...
2796         (dwfl_linux_proc_report): ... here.  Call it.
2797         (dwfl_linux_proc_maps_report): New function.
2798         * libdwfl.h: Declare it.
2799         * libdwflP.h: Add INTDECL.
2800         * argp-std.c (options, parse_opt): Grok -M/--linux-process-map.
2801
2802         * dwfl_nextcu.c (dwfl_nextcu): Don't fail when dwfl_module_getdwarf
2803         failed with DWFL_E_NO_DWARF.
2804
2805 2005-11-26  Roland McGrath  <roland@redhat.com>
2806
2807         * dwfl_end.c (dwfl_end): Free the DWFL itself.
2808
2809 2005-11-25  Roland McGrath  <roland@redhat.com>
2810
2811         * dwfl_module_getdwarf.c (__libdwfl_module_getebl): New function.
2812         (load_dw): Use it.
2813         * dwfl_module_register_names.c (dwfl_module_register_names): Likewise.
2814         * libdwflP.h: Declare it.
2815
2816         * dwfl_module_register_names.c: New file.
2817         * Makefile.am (libdwfl_a_SOURCES): Add it.
2818         * libdwfl.h: Declare dwfl_module_register_names.
2819
2820 2005-11-21  Roland McGrath  <roland@redhat.com>
2821
2822         * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
2823         Don't leak malloc'd file name.
2824         If a /sys/.../sections file is missing and starts with ".init",
2825         try the variant with "_init" too; catches PPC64 kernel braindamage.
2826
2827 2005-11-15  Roland McGrath  <roland@redhat.com>
2828
2829         * libdwfl.h: Comment fixes.
2830
2831         * dwfl_module_return_value_location.c: Add unlikely for error case.
2832
2833 2005-11-13  Roland McGrath  <roland@redhat.com>
2834
2835         * dwfl_return_value_location.c: New file.
2836         * Makefile.am (libdwfl_a_SOURCES): Add it.
2837         * libdwfl.h: Declare dwfl_module_return_value_location.
2838         * libdwflP.h (DWFL_ERRORS): Add DWFL_E_WEIRD_TYPE.
2839
2840 2005-10-20  Roland McGrath  <roland@redhat.com>
2841
2842         * libdwflP.h (DWFL_ERRORS): New error UNKNOWN_MACHINE.
2843         * relocate.c (__libdwfl_relocate): Return DWFL_E_UNKNOWN_MACHINE
2844         instead of DWFL_E_BADRELTYPE if ebl_get_elfmachine yields EM_NONE.
2845
2846 2005-10-01  Roland McGrath  <roland@redhat.com>
2847
2848         * linux-kernel-modules.c (report_kernel): Return ENOENT if we fail
2849         with errno 0.
2850
2851 2005-09-19  Roland McGrath  <roland@redhat.com>
2852
2853         * linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use
2854         PRIx64 instead of PRIi64, lest addresses with high bits set overflow
2855         the signed integer reading; they will just have to be in hexadecimal.
2856         (dwfl_linux_kernel_module_section_address): Likewise.
2857
2858 2005-08-28  Ulrich Drepper  <drepper@redhat.com>
2859
2860         * Makefile.am (%.os): Use COMPILE.os.
2861         (COMPILE.os): Filter out gconv options.
2862
2863 2005-08-25  Roland McGrath  <roland@redhat.com>
2864
2865         * cu.c (__libdwfl_nextcu): Return success when dwarf_nextcu hits end.
2866         * dwfl_nextcu.c (dwfl_nextcu): Skip modules with no dwarf info.
2867
2868 2005-08-24  Roland McGrath  <roland@redhat.com>
2869
2870         * dwfl_lineinfo.c (dwfl_lineinfo): Add bias, don't subtract it.
2871
2872         * argp-std.c [_MUDFLAP] (__libdwfl_argp_mudflap_options): New function,
2873         magic initializer to set -heur-stack-bound option.
2874
2875 2005-08-22  Roland McGrath  <roland@redhat.com>
2876
2877         * dwfl_validate_address.c: New file.
2878         * Makefile.am (libdwfl_a_SOURCES): Add it.
2879         * libdwfl.h: Declare dwfl_validate_address.
2880
2881         * derelocate.c (dwfl_module_relocate_address): Add INTDEF.
2882         * libdwflP.h: Add INTDECL.
2883
2884         * dwfl_module_getdwarf.c (find_symtab): Use elf_getdata instead of
2885         elf_rawdata for symbol-related sections.
2886
2887         * offline.c (dwfl_report_offline): Move offline_next_address outside
2888         module's range, in case it's an ET_EXEC using fixed segment locations.
2889         * libdwfl.h: Update comment.
2890
2891         * dwfl_report_elf.c (dwfl_report_elf): Align BASE to first segment's
2892         required alignment.
2893
2894 2005-08-20  Roland McGrath  <roland@redhat.com>
2895
2896         * linux-kernel-modules.c (report_kernel): Take new argument PREDICATE,
2897         function to choose whether to report.
2898         (dwfl_linux_kernel_report_offline): Likewise.
2899         * libdwfl.h: Update decl.
2900         * argp-std.c (parse_opt): Update caller.
2901
2902         * dwfl_getsrclines.c: New file.
2903         * dwfl_onesrcline.c: New file.
2904         * Makefile.am (libdwfl_a_SOURCES): Add them.
2905         * libdwfl.h: Declare dwfl_getsrclines, dwfl_onesrcline.
2906
2907         * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't leak
2908         MODULESDIR[0].  Call fts_close on failure.
2909
2910         * dwfl_module_getdwarf.c (load_dw): Take dwfl_file * instead of Elf *.
2911         Close ET_REL file descriptors after relocation.
2912         (find_dw): Update caller.
2913         * offline.c (dwfl_report_offline): Get the file into memory and close
2914         the file descriptor.
2915
2916         * dwfl_module_getdwarf.c (find_debuginfo): Do nothing when
2917         MOD->debug.elf is already set.
2918
2919         * find-debuginfo.c (try_open): Use TEMP_FAILURE_RETRY.
2920         (dwfl_standard_find_debuginfo): Fail on errors not ENOENT or ENOTDIR.
2921
2922         * argp-std.c (options, parse_opt): Grok -K/--offline-kernel, use
2923         dwfl_linux_kernel_report_offline with offline_callbacks.
2924
2925         * linux-kernel-modules.c (report_kernel): New function, broken out of
2926         ...
2927         (dwfl_linux_kernel_report_kernel): ... here.  Use it.
2928         (dwfl_linux_kernel_report_offline): New function.
2929         * libdwfl.h: Declare it.
2930         * libdwflP.h: Add INTDECL.
2931
2932 2005-08-19  Roland McGrath  <roland@redhat.com>
2933
2934         Use standard debuginfo search path to look for vmlinux.
2935         * find-debuginfo.c (dwfl_standard_find_debuginfo): Don't check CRC if
2936         passed zero.
2937         * linux-kernel-modules.c (try_kernel_name): New function, broken out
2938         of ...
2939         (dwfl_linux_kernel_report_kernel): ... here.  Use it.
2940
2941         * argp-std.c (offline_callbacks): New variable.
2942         (parse_opt): Use it for -e.  Allow multiple -e options.
2943
2944         * offline.c: New file.
2945         * Makefile.am (libdwfl_a_SOURCES): Add it.
2946         * libdwfl.h: Declare dwfl_offline_section_address, dwfl_report_offline.
2947         * libdwflP.h: Add INTDECLs.
2948         (OFFLINE_REDZONE): New macro.
2949         (struct Dwfl): New member `offline_next_address'.
2950         * dwfl_begin.c (dwfl_begin): Initialize it.
2951         * dwfl_module.c (dwfl_report_begin): Likewise.
2952
2953         * dwfl_report_elf.c (dwfl_report_elf): Accept all types.  When ET_REL,
2954         do a nominal absolute section layout starting at BASE.
2955         * libdwfl.h: Update comment.
2956
2957 2005-08-18  Roland McGrath  <roland@redhat.com>
2958
2959         * dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Do
2960         dwfl_module_getdwarf if necessary.
2961
2962         * dwfl_report_elf.c (dwfl_report_elf): Permit ET_REL with BASE==0.
2963         * libdwfl.h: Update comment.
2964
2965         * derelocate.c: New file.
2966         * Makefile.am (libdwfl_a_SOURCES): Add it.
2967
2968         * libdwflP.h (struct Dwfl_Module): isrel -> e_type.
2969         * dwfl_report_elf.c (dwfl_report_elf): Initialize it.
2970         * dwfl_module_getdwarf.c (open_elf): Update initialization.
2971         (load_dw, dwfl_module_addrname): Update uses.
2972         * relocate.c (__libdwfl_relocate): Likewise.
2973
2974 2005-08-04  Roland McGrath  <roland@redhat.com>
2975
2976         * libdwfl.h (Dwfl_Callbacks.section_address): Take additional
2977         arguments SHNDX, SHDR.
2978         (dwfl_linux_kernel_module_section_address): Update prototype.
2979         * relocate.c (__libdwfl_relocate_value): Update caller.
2980         * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
2981         Take the new arguments.
2982
2983 2005-08-10  Roland McGrath  <roland@redhat.com>
2984
2985         * relocate.c (__libdwfl_relocate): Take argument DEBUGFILE,
2986         use it instead of MOD->debug.file.
2987         * libdwflP.h: Update decl.
2988         * dwfl_module_getdwarf.c (load_dw): Update caller.
2989         Fixes bug #165598.
2990
2991 2005-08-09  Roland McGrath  <roland@redhat.com>
2992
2993         * libdwflP.h: Include ../libdw/libdwP.h for its INTDECLs.
2994         * cu.c: Use INTUSE on dwarf_* calls.
2995         * dwfl_error.c: Likewise.
2996         * dwfl_module.c: Likewise.
2997         * dwfl_module_getdwarf.c: Likewise.
2998         * dwfl_module_getsrc_file.c: Likewise.
2999         * lines.c: Likewise.
3000
3001 2005-08-07  Roland McGrath  <roland@redhat.com>
3002
3003         * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): When module
3004         names contain '_' or '-', look for files named either "foo-bar.ko"
3005         or "foo_bar.ko".
3006
3007 2005-07-29  Roland McGrath  <roland@redhat.com>
3008
3009         * loc2c.c: File removed.
3010         * loc2c.h: File removed.
3011         * loc2c-runtime.h: File removed.
3012         * test2.c: File removed.
3013         * Makefile.am (EXTRA_DIST): Variable removed.
3014         (noinst_HEADERS): Remove loc2c.h from here.
3015
3016 2005-07-28  Ulrich Drepper  <drepper@redhat.com>
3017
3018         * libdwfl.h: Add a few missing extern for function prototypes.
3019
3020         * libdwfl_crc32.c: New file.
3021         * libdwfl_crc32_file.c: New file.
3022         * libdwflP.h: Declare the new functions.
3023         * Makefile.am (libdwfl_a_SOURCES): Add libdwfl_crc32.c and
3024         libdwfl_crc32_file.c.
3025         * libdwfl/find-debuginfo.c (check_crc): Use __libdwfl_crc32_file
3026         instead of crc32_file.
3027
3028 2005-07-28  Roland McGrath  <roland@redhat.com>
3029
3030         * ptest.c: Moved to ../tests/dwflmodtest.c.
3031
3032         * Makefile.am (noinst_PROGRAMS): Variable removed.
3033         (libdwfl_so_SOURCES, libdwfl_LIBS, libdwfl_so_LDADD): Likewise.
3034         (EXTRA_DIST, ptest_LDADD, test2_LDADD): Likewise.
3035         (libdwfl): Don't use libdwfl.so any more.
3036         (libdwfl.so, install, uninstall): Targets removed.
3037         (test2_SOURCES): Define EXTRA_DIST instead of this.
3038         * libdwfl.map: File removed.
3039
3040         * libdwfl.h: Use "" for libdw.h #include.
3041
3042 2005-07-27  Roland McGrath  <roland@redhat.com>
3043
3044         * libdwfl.map: Add dwfl_getmodules.
3045
3046 2005-07-23  Ulrich Drepper  <drepper@redhat.com>
3047
3048         * Makefile.am: Fix rules to allow building with mudflap.
3049
3050 2005-07-21  Roland McGrath  <roland@redhat.com>
3051
3052         * Makefile.am (noinst_HEADERS): Add loc2c.c.
3053
3054         * test2.c (main): Check sscanf result to quiet warning.
3055
3056 2005-07-20  Roland McGrath  <roland@redhat.com>
3057
3058         * libdwfl-branch merged, creating this direcotry.