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