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