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