blob: c0fbc831dcb2f9f8f36709ef2786f29c4c80e7ea [file] [log] [blame]
Jan Kratochvil463e9832013-11-21 15:28:02 +010012013-11-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2
3 link_map: Use proper bias, not l_addr.
4 * core-file.c (dynamic_vaddr_get): Rename to ...
5 (__libdwfl_dynamic_vaddr_get): ... here, make it global,
6 internal_function.
7 (dwfl_core_file_report): Update name in the caller.
8 * libdwflP.h (__libdwfl_dynamic_vaddr_get): New declaration.
9 * link_map.c (report_r_debug): New variable elf_dynamic_vaddr. Call
10 __libdwfl_dynamic_vaddr_get for it. Remove L_ADDR FIXME comment.
11 Use ELF_DYNAMIC_VADDR instead of L_ADDR.
12
Jan Kratochvil10d7a392013-11-19 15:00:15 +0100132013-11-19 Jan Kratochvil <jan.kratochvil@redhat.com>
14
15 Compatibility with older kernels such as RHEL-6.
16 * linux-pid-attach.c (struct pid_arg): New field tid_was_stopped.
17 (ptrace_attach): New parameter tid_was_stoppedp. Set it.
18 (pid_set_initial_registers): Pass tid_was_stopped.
19 (pid_thread_detach): Use tid_was_stopped.
20
Josh Stonedb35c872013-11-18 14:29:35 -0800212013-11-18 Josh Stone <jistone@redhat.com>
22
23 * dwfl_module_getdwarf.c (find_aux_address_sync): New function.
24 (find_aux_sym): Use it.
25
Jan Kratochviled782372013-11-14 20:53:20 +0100262013-11-14 Jan Kratochvil <jan.kratochvil@redhat.com>
27
Jan Kratochvil1c1a53b2013-11-14 20:55:41 +010028 Code cleanup: Remove const in prototype
29 * dwfl_frame_regs.c (dwfl_thread_state_registers): Remove const from
30 firstreg.
31 * libdwfl.h (dwfl_thread_state_registers): Likewise.
32 * linux-pid-attach.c (pid_thread_state_registers_cb): Likewise.
33
342013-11-14 Jan Kratochvil <jan.kratochvil@redhat.com>
35
Jan Kratochviled782372013-11-14 20:53:20 +010036 Fix dwfl_attach_state machine->elf.
37 * dwfl_frame.c (dwfl_attach_state): Change parameter machine to elf.
38 Call ebl_openbackend instead of ebl_openbackend_machine.
39 * libdwfl.h (dwfl_attach_state): Change parameter machine to elf.
40 Update the function description.
41 * linux-core-attach.c (__libdwfl_attach_state_for_core): Pass CORE to
42 dwfl_attach_state.
43 * linux-pid-attach.c (__libdwfl_attach_state_for_pid): Pass NULL to
44 dwfl_attach_state.
45
Jan Kratochvil954a7b02013-11-13 20:00:56 +0100462013-11-06 Jan Kratochvil <jan.kratochvil@redhat.com>
47
48 Provide __libdwfl_module_getsym to get dwfl_file *.
49 * dwfl_module_addrsym.c (dwfl_module_addrsym) (i_to_symfile): Remove.
50 (dwfl_module_addrsym) (search_table): New variable file. Use
51 __libdwfl_module_getsym. Use file.
52 * dwfl_module_getsym.c (dwfl_module_getsym): Rename to ...
53 (__libdwfl_module_getsym): ... here. Add parameter filep. Set it.
54 (dwfl_module_getsym): New wrapper.
55 * libdwflP.h (__libdwfl_module_getsym): New declaration.
56
Jan Kratochvil5dca2b62013-11-13 19:58:06 +0100572013-11-13 Jan Kratochvil <jan.kratochvil@redhat.com>
58
59 Fix dwfl_module_addrsym for minidebuginfo.
60 * dwfl_module_addrsym.c (dwfl_module_addrsym): New variable
61 addr_symfile.
62 (dwfl_module_addrsym) (same_section): Use it.
63 (dwfl_module_addrsym) (i_to_symfile): New function.
64 (dwfl_module_addrsym) (search_table): Use it.
65
Jan Kratochvil21783b52013-11-07 16:34:58 +0100662013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
Jan Kratochvil0b867462013-05-30 14:37:38 +020067 Mark Wielaard <mjw@redhat.com>
68
69 * Makefile.am (libdwfl_a_SOURCES): Add dwfl_frame.c, frame_unwind.c,
70 dwfl_frame_pc.c, linux-pid-attach.c, linux-core-attach.c and
71 dwfl_frame_regs.c.
72 * core-file.c (dwfl_core_file_report): Call
73 __libdwfl_attach_state_for_core.
74 * dwfl_end.c (dwfl_end): Call __libdwfl_process_free.
75 * dwfl_frame.c: New file.
76 * frame_unwind.c: New file.
77 * dwfl_frame_pc.c: New file.
78 * linux-pid-attach.c: New file.
79 * linux-core-attach.c: New file.
80 * dwfl_frame_regs.c: New file.
81 * libdwfl.h (Dwfl_Thread, Dwfl_Frame): New typedefs.
82 (dwfl_core_file_report, dwfl_linux_proc_report): Extend comments.
83 (Dwfl_Thread_Callbacks): New definition.
84 (struct ebl, dwfl_attach_state, dwfl_pid, dwfl_thread_dwfl)
85 (dwfl_thread_tid, dwfl_frame_thread, dwfl_thread_state_registers)
86 (dwfl_thread_state_register_pc, dwfl_getthreads, dwfl_thread_getframes)
87 (dwfl_frame_pc): New declarations.
88 * libdwflP.h (Dwfl_Process): New typedef.
89 (LIBEBL_BAD, CORE_MISSING, INVALID_REGISTER, PROCESS_MEMORY_READ)
90 (PROCESS_NO_ARCH, PARSE_PROC, INVALID_DWARF, UNSUPPORTED_DWARF)
91 (NEXT_THREAD_FAIL, ATTACH_STATE_CONFLICT, NO_ATTACH_STATE, NO_UNWIND)
92 (INVALID_ARGUMENT): New DWFL_ERROR entries.
93 (struct Dwfl): New entry process.
94 (struct Dwfl_Process, struct Dwfl_Thread, struct Dwfl_Frame)
95 (__libdwfl_frame_reg_get, __libdwfl_frame_reg_set)
96 (__libdwfl_process_free, __libdwfl_frame_unwind)
97 (__libdwfl_attach_state_for_pid, __libdwfl_attach_state_for_core)
98 (__libdwfl_segment_start, __libdwfl_segment_end): New declarations.
99 (dwfl_attach_state, dwfl_pid, dwfl_thread_dwfl, dwfl_thread_tid)
100 (dwfl_frame_thread, dwfl_thread_state_registers)
101 (dwfl_thread_state_register_pc, dwfl_getthreads, dwfl_thread_getframes)
102 (dwfl_frame_pc): New INTDECL entries.
103 * linux-proc-maps.c (dwfl_linux_proc_report): Call
104 __libdwfl_attach_state_for_pid.
105 * segment.c (segment_start): Rename to ...
106 (__libdwfl_segment_start): ... here and make it internal_function.
107 (segment_end): Rename to ...
108 (__libdwfl_segment_end): ... here and make it internal_function.
109 (reify_segments, dwfl_report_segment): Rename them at the callers.
110
1112013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
Jan Kratochvil21783b52013-11-07 16:34:58 +0100112
Jan Kratochvil22f867a2013-11-07 21:30:17 +0100113 * core-file.c (dwfl_core_file_report): Remove the use of MAX.
114
1152013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
116
Jan Kratochvilb947ee12013-11-07 21:27:54 +0100117 * core-file.c (dwfl_core_file_report): Replaced variable sniffed by
118 retval. Fix one forgotten LISTED increase.
119
1202013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
121
Jan Kratochvil35d95f32013-11-07 16:47:19 +0100122 Fix core files for re-prelink-ed files.
123 * core-file.c (dynamic_vaddr_get): New function.
124 (dwfl_core_file_report): New variable file_dynamic_vaddr. Call
125 dynamic_vaddr_get instead of using L_ADDR.
126 * libdwflP.h (struct r_debug_info_module): Remove field l_addr.
127 * link_map.c (report_r_debug): Do not initialize l_addr.
128
1292013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
130
Jan Kratochvil21783b52013-11-07 16:34:58 +0100131 Code cleanup.
132 * core-file.c (dwfl_core_file_report): Reindent block of code by
133 continue keyword.
134
Jan Kratochvil3cf491e2013-10-30 10:48:20 +01001352013-10-30 Jan Kratochvil <jan.kratochvil@redhat.com>
136
137 * argp-std.c (parse_opt): Use executable parameter of
138 dwfl_core_file_report.
139 * core-file.c (dwfl_core_file_report): Add parameter executable. Set
140 it to DWFL. Add NEW_VERSION for it.
141 (_compat_without_executable_dwfl_core_file_report): New. Twice.
142 * libdwfl.h (dwfl_core_file_report): Add parameter executable, update
143 the function comment.
144
Mark Wielaardd1829742013-10-15 23:53:32 +02001452013-10-15 Mark Wielaard <mjw@redhat.com>
146
147 * linux-proc-maps.c (proc_maps_report): Ignore non-absolute file
148 mappings.
149 (dwfl_linux_proc_find_elf): Don't abort, just return failure.
150
Mark Wielaard2e73a8a2013-09-12 11:27:56 +02001512013-09-12 Mark Wielaard <mjw@redhat.com>
152
Mark Wielaardead7d192013-09-12 16:49:25 +0200153 * cu.c (intern_cu): If dwarf_offdie fails free cu.
154
1552013-09-12 Mark Wielaard <mjw@redhat.com>
156
Mark Wielaardcc392482013-09-12 15:16:13 +0200157 * linux-proc-maps.c (proc_maps_report): Don't fclose FILE in
158 bad_report.
159
1602013-09-12 Mark Wielaard <mjw@redhat.com>
161
Mark Wielaard2e73a8a2013-09-12 11:27:56 +0200162 * dwfl_module_getdwarf.c (find_symtab): Call elf_getdata with
163 aux_xndxscn, not xndxscn, for aux_symxndxdata.
164
Mark Wielaard16fa4142013-08-22 13:45:16 +02001652013-08-25 Mark Wielaard <mjw@redhat.com>
166
167 * linux-kernel-modules.c (report_kernel): Pass add_p_vaddr as true
168 to dwfl_report_elf.
169
Jan Kratochvil10edf472013-07-25 11:05:35 +02001702013-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
171
172 * dwfl_segment_report_module.c (dwfl_segment_report_module): Check for
173 conflicts all the modules, not just the first one. Compare L_LD if it
174 is equal, not if it is in a module address range.
175
Jan Kratochvil596d4302013-07-23 16:30:01 +02001762013-07-23 Jan Kratochvil <jan.kratochvil@redhat.com>
177
Jan Kratochvil744fc6f2013-07-23 17:52:01 +0200178 * libdwflP.h (__libdwfl_elf_address_range): Add internal_function.
179
1802013-07-23 Jan Kratochvil <jan.kratochvil@redhat.com>
181
Jan Kratochvil596d4302013-07-23 16:30:01 +0200182 * core-file.c (clear_r_debug_info): Close also ELF and FD.
183 (dwfl_core_file_report): Call __libdwfl_report_elf for
184 R_DEBUG_INFO.MODULE.
185 * dwfl_report_elf.c (__libdwfl_elf_address_range): New function from
186 code of ...
187 (__libdwfl_report_elf): ... this function. Call it.
188 * dwfl_segment_report_module.c: Include unistd.h.
189 (dwfl_segment_report_module): Use basename for MODULE->NAME.
190 Clear MODULE if it has no build-id and we have segment with build-id.
191 Ignore this segment only if MODULE still contains valid ELF.
192 * libdwflP.h (__libdwfl_elf_address_range): New declaration.
193 (struct r_debug_info_module): New fields fd, elf, l_addr, start, end
194 and disk_file_has_build_id.
195 (dwfl_link_map_report): Extend the comment.
196 * link_map.c (report_r_debug): Extend the comment. Always fill in new
197 r_debug_info_module. Initialize also the new r_debug_info_module
198 fields. Remove one FIXME comment. Call __libdwfl_elf_address_range
199 instead of __libdwfl_report_elf when R_DEBUG_INFO is not NULL.
200
Jan Kratochvil8af254a2013-07-19 21:41:31 +02002012013-07-19 Jan Kratochvil <jan.kratochvil@redhat.com>
202
203 * libdwflP.h (__libdwfl_find_elf_build_id): Add internal_function.
204
Mark Wielaard8e5393c2013-07-02 13:35:29 +02002052013-07-02 Mark Wielaard <mjw@redhat.com>
206
207 * relocate.c (__libdwfl_relocate_value): Remove mod->e_type assert.
208
Mark Wielaard24b26ec2013-06-05 17:03:25 +02002092013-06-05 Mark Wielaard <mjw@redhat.com>
210
211 * link_map.c (report_r_debug): Always call release_buffer after
212 memory_callback succeeded reading build_id.
213
Jan Kratochvil8ff86292013-05-30 13:21:20 +02002142013-05-30 Jan Kratochvil <jan.kratochvil@redhat.com>
215
216 * argp-std.c (parse_opt) <ARGP_KEY_SUCCESS> <opt->core> <opt->e>: Set
217 executable_for_core before calling dwfl_core_file_report.
218 * core-file.c (clear_r_debug_info): New function.
219 (dwfl_core_file_report): Move raw segments reporting lower. New
220 variable r_debug_info, pass it to dwfl_segment_report_module. Call
221 clear_r_debug_info in the end. Return sum of LISTED and SNIFFED.
222 * dwfl_module_build_id.c (check_notes): Move into
223 __libdwfl_find_elf_build_id.
224 (__libdwfl_find_build_id): Rename to ...
225 (__libdwfl_find_elf_build_id): ... here. Add parameters build_id_bits,
226 build_id_elfaddr and build_id_len. Verify MOD vs. ELF.
227 (__libdwfl_find_elf_build_id) (check_notes): Remove parameters mod and
228 set, rename data_vaddr to data_elfaddr. Do not call found_build_id.
229 (__libdwfl_find_elf_build_id): Update the check_notes caller, do not
230 adjust its data_elfaddr parameter.
231 (__libdwfl_find_build_id): New wrapper of __libdwfl_find_elf_build_id.
232 * dwfl_segment_report_module.c (dwfl_segment_report_module): New
233 parameter r_debug_info. New variable name_is_final. Adjust addresses
234 according to R_DEBUG_INFO->MODULE. Check conflicts against DWFL.
235 Do not overwrite NAME by SONAME if NAME_IS_FINAL.
236 * libdwflP.h (__libdwfl_find_elf_build_id): New declaration.
237 (struct r_debug_info_module, struct r_debug_info): New definitions.
238 (dwfl_segment_report_module, dwfl_link_map_report): Add parameter
239 r_debug_info.
240 * link_map.c: Include fcntl.h.
241 (report_r_debug): Add parameter r_debug_info, describe it in the
242 function comment. Delete dwfl_addrmodule call and its dependent code.
243 Verify build-id before calling dwfl_report_elf, also supply
244 executable_for_core to it. Store r_debug_info->module info when
245 appropriate.
246 (dwfl_link_map_report): Add parameter r_debug_info. New variable
247 in_ok. Try to read IN from EXECUTABLE_FOR_CORE. Update report_r_debug
248 caller parameters.
249
Jan Kratochvil904aec22013-04-30 14:27:16 +02002502013-04-30 Jan Kratochvil <jan.kratochvil@redhat.com>
251
252 * dwfl_report_elf.c (__libdwfl_report_elf): Add parameter add_p_vaddr.
253 Set it to true for ET_EXEC and ET_CORE. Provide alternative
254 setup of START and BIAS if !ADD_P_VADDR. Set END from BIAS, not BASE.
255 (dwfl_report_elf): Add parameter add_p_vaddr. Pass it down. Add
256 NEW_VERSION.
257 (_compat_without_add_p_vaddr_dwfl_report_elf) <SHARED>: New, with
258 COMPAT_VERSION.
259 * libdwfl.h (dwfl_report_elf): Add parameter add_p_vaddr. Describe it.
260 * libdwflP.h (__libdwfl_report_elf): Add parameter add_p_vaddr.
261 * link_map.c (report_r_debug): Use true add_p_vaddr for dwfl_report_elf.
262 * linux-kernel-modules.c (report_kernel): Use false add_p_vaddr for
263 dwfl_report_elf.
264 * offline.c (process_elf): Use true add_p_vaddr for dwfl_report_elf.
265
Mark Wielaard9efa9e62013-04-27 20:50:32 +02002662013-04-27 Mark Wielaard <mjw@redhat.com>
267
268 * link_map.c: #include system.h.
269
Jan Kratochvil1704baf2013-04-26 17:00:50 +02002702013-04-26 Jan Kratochvil <jan.kratochvil@redhat.com>
271
272 * link_map.c (BE32, BE64, LE32, LE64): Delete the definitions, move
273 them to lib/system.h.
274
Mark Wielaardcdaaf212013-04-25 16:50:11 -04002752013-04-24 Mark Wielaard <mjw@redhat.com>
276
277 * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES.
278
Jan Kratochvila1d44822013-03-19 13:40:13 +01002792013-03-20 Jan Kratochvil <jan.kratochvil@redhat.com>
280
281 * dwfl_report_elf.c (__libdwfl_report_elf): Remove BASE aligning.
282
Mark Wielaardf1b06b52013-03-12 12:02:51 +01002832013-03-12 Mark Wielaard <mjw@redhat.com>
284
285 * dwfl_getsrclines.c (dwfl_getsrclines): Return 0 on success.
286
Mark Wielaardf6185a72013-02-22 23:42:59 +01002872013-02-22 Mark Wielaard <mjw@redhat.com>
288
289 * open.c (__libdw_gunzip,__libdw_bunzip2,__libdw_unlzma): Define
290 as DWFL_E_BADELF when not used.
291
Mark Wielaard40025812013-02-10 15:07:33 +01002922013-02-10 Mark Wielaard <mjw@redhat.com>
293
294 * argp-std.c (parse_opt): Use opt->core and opt->e explicitly in
295 failure messages When handling ARGP_KEY_SUCCESS because arg will
296 not have been set.
297
Jan Kratochvil84476372012-10-10 20:42:30 +02002982013-01-30 Jan Kratochvil <jan.kratochvil@redhat.com>
299
300 * linux-proc-maps.c: Include system.h.
301 (PROCEXEFMT, get_pid_class): New.
302 (grovel_auxv): Detect 32-bit vs. 64-bit auxv, possibly call
303 get_pid_class.
304
Mark Wielaard697bdca2013-01-23 17:39:19 +01003052013-01-23 Mark Wielaard <mjw@redhat.com>
306
307 * dwfl_module_getdwarf.c (find_aux_sym): Don't substract one
308 from aux_syments by default.
309 (find_symtab): Also succeed when only aux_symdata is found.
310 When no symtab is found always try to load auxiliary table.
311 (dwfl_module_getsymtab): Substract one from result when both
312 tables have symbols.
313 * dwfl_module_getsym.c (dwfl_module_getsym): Only skip auxiliary
314 zero entry when both tables have symbols.
315 * dwfl_module_addrsym.c (dwfl_module_addrsym): Only substract
316 one from first_global when both tables have symbols.
317
Mark Wielaard5083a702013-01-16 15:19:32 +01003182013-01-16 Mark Wielaard <mjw@redhat.com>
319
320 * libdwflP.h (struct Dwfl_Module): Add aux_sym, aux_symdata,
321 aux_syments, aux_symstrdata, aux_symxndxdata and aux_first_global.
322 (dwfl_adjusted_aux_sym_addr): New function.
323 (dwfl_deadjust_aux_sym_addr): Likewise.
324 (dwfl_adjusted_st_value): Take and check symfile argument.
325 (dwfl_deadjust_st_value): Likewise.
326 * dwfl_module_getdwarf.c (find_prelink_address_sync): Take and
327 use dwfl_file as argument to set address_sync.
328 (find_debuginfo): Call find_prelink_address_sync with debug file.
329 (find_aux_sym): New function.
330 (find_symtab): Use find_aux_sym if all we have is the dynsym table
331 and fill in aux DwflModule fields.
332 (dwfl_module_getsymtab): Return syments plus aux_syments.
333 (load_symtab): Always set first_global.
334 * dwfl_module_addrsym.c (dwfl_module_addrsym): Check symfile
335 when using same_section. Calculate first_global based on both
336 mod->first_global and mod->aux_first_global.
337 * dwfl_module.c (__libdwfl_module_free): Free aux_sym.
338 * dwfl_module_getsym.c (dwfl_module_getsym): Use auxsym table
339 to retrieve symbol and name if necessary, making sure all locals
340 from any table come before any globals.
341 * dwfl_module_info.c (dwfl_module_info): Call dwfl_adjusted_st_value
342 with symfile.
343 * relocate.c (resolve_symbol): Likewise.
344
Roland McGrath3999ce12013-01-07 14:53:37 -08003452013-01-07 Roland McGrath <roland@hack.frob.com>
346
347 * link_map.c (auxv_format_probe): Handle unaligned 64-bit data, but
348 still assume the data is at least 32-bit aligned anyway.
349 (dwfl_link_map_report): Handle unaligned auxv data.
350
Mark Wielaard76c54592012-12-11 14:21:01 +01003512012-12-11 Mark Wielaard <mjw@redhat.com>
352
353 * linux-kernel-modules.c (report_kernel): Only free fname if
354 find_kernel_elf succeeds and allocates it.
355 (report_kernel_archive): Fix brackets around unlikely expression.
356
Jan Kratochvild5784af2012-10-18 00:11:30 +02003572012-11-29 Jan Kratochvil <jan.kratochvil@redhat.com>
358
359 * argp-std.c: Update Copyright year.
360 (offline_find_elf): New function.
361 (offline_callbacks): Use it for find_elf.
362 (struct parse_opt): New.
363 (parse_opt): New key ARGP_KEY_INIT. In other make hook struct
364 parse_opt pointer from former Dwfl pointer. Delay 'e and OPT_COREFILE
365 processing till ARGP_KEY_SUCCESS. Initialize state->input already from
366 ARGP_KEY_SUCCESS. Modify the cleanup in ARGP_KEY_ERROR. Make the
367 final state->input initialization optional.
368 * dwfl_end.c: Update Copyright year.
369 (dwfl_end): Free executable_for_core.
370 * libdwflP.h: Update Copyright year.
371 (struct Dwfl): New field executable_for_core.
372
Jan Kratochvilae81c702012-10-27 20:45:27 +02003732012-11-20 Jan Kratochvil <jan.kratochvil@redhat.com>
374
375 * dwfl_report_elf.c (__libdwfl_report_elf): Simplify START and BIAS
376 calculation.
377
Jan Kratochvil50f413e2012-10-17 22:04:24 +02003782012-10-17 Jan Kratochvil <jan.kratochvil@redhat.com>
379
Jan Kratochvil3fdcdcb2012-10-17 21:49:10 +0200380 * dwfl_module_getdwarf.c (mod_verify_build_id): New function with code
381 from ...
382 (__libdwfl_getelf): ... here. Call it.
383
3842012-10-17 Jan Kratochvil <jan.kratochvil@redhat.com>
385
Jan Kratochvil50f413e2012-10-17 22:04:24 +0200386 * libdwfl.h (dwfl_module_getelf): Add __nonnull_attribute__.
387
Jan Kratochvil78dec222012-10-10 08:04:01 +02003882012-10-10 Jan Kratochvil <jan.kratochvil@redhat.com>
389
Jan Kratochvil387654d2012-10-10 08:08:44 +0200390 * dwfl_segment_report_module.c (dwfl_segment_report_module):
391 Initialize mod->MAIN_BIAS.
392
3932012-10-10 Jan Kratochvil <jan.kratochvil@redhat.com>
394
Jan Kratochvil78dec222012-10-10 08:04:01 +0200395 * dwfl_module_addrsym.c (dwfl_module_addrsym): New function
396 binding_value. Use it for both zero and non-zero size symbols
397 comparisons.
398
Mark Wielaard5b257822012-10-01 16:10:46 +02003992012-10-01 Mark Wielaard <mjw@redhat.com>
400
Mark Wielaardea45ac82012-10-01 16:12:10 +0200401 * cu.c (cudie_offset): Don't use type_sig8, it might not be
402 initialized and these are always real CUs, never TUs.
403
4042012-10-01 Mark Wielaard <mjw@redhat.com>
405
Mark Wielaard5b257822012-10-01 16:10:46 +0200406 * derelocate.c (find_section): Check next section exists before
407 accessing it.
408
Petr Machatae1873142012-08-01 21:37:52 +02004092012-08-01 Petr Machata <pmachata@redhat.com>
410
411 * offline.c (process_archive_member): Ignore entry "/SYM64/".
412
Roland McGrath210c2f02012-03-28 10:22:35 -07004132012-03-28 Roland McGrath <roland@hack.frob.com>
414
415 * dwfl_segment_report_module.c
416 (dwfl_segment_report_module: read_portion): Don't use existing buffer
417 when FILESZ is zero (string mode) and available portion doesn't hold
418 a terminated string.
419
Roland McGrath01fef9d2011-12-02 09:45:53 -08004202011-12-02 Roland McGrath <roland@hack.frob.com>
421
422 * elf-from-memory.c (elf_from_remote_memory): Fix ELFCLASS64 case
423 to use elf64_xlatetom and PHDRS.p64.
424 Reported by Serge Pavlov <serge.pavlov.at.gnu@gmail.com>.
425
Mark Wielaard75ee33f2011-10-31 15:33:49 +01004262011-11-31 Mark Wielaard <mjw@redhat.com>
427
Mark Wielaardef431cd2011-10-31 23:17:06 +0100428 * dwfl_module_addrsym.c (dwfl_module_addrsym): First search all
429 global symbols. Then only when that doesn't provide a match search
430 all local symbols too.
431 * dwfl_module_getdwarf.c (load_symtab): Take first_global int arg
432 and fill it in.
433 (find_symtab): Initialize mod->first_global and pass it to load_symtab.
434 * libdwfl/libdwflP.h (Dwfl_Module): Add first_global field.
435
4362011-11-31 Mark Wielaard <mjw@redhat.com>
437
Mark Wielaard75ee33f2011-10-31 15:33:49 +0100438 * dwfl_module_addrsym.c (dwfl_module_addrsym): Only update
439 sizeless_sym if needed and closer to desired addr.
440
Mark Wielaardf43feb52011-10-20 16:53:54 +02004412011-10-20 Mark Wielaard <mjw@redhat.com>
442
443 * derelocate.c (cache_sections): Intern mod->reloc_info check.
444 (dwfl_module_relocations): Don't check mod->reloc_info.
445 (dwfl_module_relocation_info): Likewise.
446 (find_section): Likewise.
447
Roland McGrath32899ac2011-07-09 03:17:24 -07004482011-07-09 Roland McGrath <roland@hack.frob.com>
449
450 * image-header.c (LE32): Macro removed (now in lib/system.h).
451
Mark Wielaarddbb490f2011-04-11 17:24:16 +02004522011-04-11 Mark Wielaard <mjw@redhat.com>
453
454 * linux-kernel-modules.c (vmlinux_suffixes): Guard definition
455 by check for zlib, bzlib or lzma defines to check it isn't empty.
456 (try_kernel_name): Use same guard for use of vmlinux_suffixes.
457
Roland McGrathe07da4f2011-03-08 16:26:02 -08004582011-03-08 Roland McGrath <roland@redhat.com>
459
460 * dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL.
461 Reported by Kurt Roeckx <kurt@roeckx.be>.
462
Roland McGrath6ecdead2011-02-11 12:29:45 -08004632011-02-11 Roland McGrath <roland@redhat.com>
464
465 * linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz
466 suffixes if corresponding decompression support is enabled.
467
Roland McGrath9fdd4612011-02-01 16:09:43 -08004682011-02-01 Roland McGrath <roland@redhat.com>
469
Roland McGrath3a44c9a2011-02-01 19:06:21 -0800470 * dwfl_module_getdwarf.c (find_prelink_address_sync): Use the
471 section-end address as the synchronization point, rather than sh_addr.
472
Roland McGrath0ef40202011-02-01 16:58:32 -0800473 * dwfl_module_getdwarf.c (find_prelink_address_sync): Discover
474 PT_INTERP p_vaddr separately from main phdrs and undo phdrs.
475
Roland McGrath9fdd4612011-02-01 16:09:43 -0800476 * dwfl_module_getdwarf.c (find_prelink_address_sync): Fix pasto in
477 last change, so we recognize PT_INTERP in ELFCLASS64 correctly.
478
Roland McGrath5ad466d2011-01-11 10:17:01 -08004792011-01-11 Roland McGrath <roland@redhat.com>
480
481 * dwfl_module_getdwarf.c (open_elf): Remove section-based
482 address_sync fixup from here.
483 (find_prelink_address_sync): New function.
484 (find_debuginfo): Call it.
485 * libdwflP.h (DWFL_ERRORS): Add BAD_PRELINK error.
486
Roland McGrath2c7d0dd2011-01-04 19:29:53 -08004872011-01-04 Roland McGrath <roland@redhat.com>
488
489 * dwfl_module_getdwarf.c (open_elf): Enhance address_sync calculation
490 logic to consider section addresses, the better to survive all the
491 possible prelink machinations.
492 * libdwflP.h (struct dwfl_file): Comment change.
493
Roland McGrath33d305f2010-11-30 17:39:55 -08004942010-11-30 Roland McGrath <roland@redhat.com>
495
496 * derelocate.c (dwfl_module_relocations): Remove over-eager assert.
497
Roland McGrath1743d7f2010-11-12 16:46:47 -08004982010-11-12 Roland McGrath <roland@redhat.com>
499
500 * libdwflP.h (struct Dwfl_Module): New member main_bias.
501 (dwfl_adjusted_address, dwfl_deadjust_address): Use it.
502 * dwfl_module_getdwarf.c (__libdwfl_getelf): Initialize it.
503
504 * libdwflP.h (dwfl_deadjust_address): New function.
505 (dwfl_deadjust_dwarf_addr, dwfl_deadjust_st_value): New functions.
506 * cu.c (addrarange): Use dwfl_deadjust_dwarf_addr.
507 * dwfl_module_addrsym.c: Use dwfl_deadjust_st_value.
508
5092010-11-11 Roland McGrath <roland@redhat.com>
510
511 * libdwflP.h (struct dwfl_file): Remove bias member.
512 Add vaddr and address_sync members instead.
513 (dwfl_adjusted_address): Calculate using vaddr.
514 (dwfl_adjusted_dwarf_addr): Calculate using address_sync and call that.
515 (dwfl_adjusted_st_value): Use one of those calls.
516 * dwfl_module_getdwarf.c (open_elf): Initialize vaddr and address_sync.
517 * dwfl_segment_report_module.c (dwfl_segment_report_module): Likewise.
518 * derelocate.c (dwfl_module_relocations): Update ET_EXEC assertions.
519 * link_map.c (consider_executable): Adjust only MOD->low_addr for
520 detected PIE bias change.
521
522 * libdwflP.h (dwfl_adjusted_dwarf_addr): New function.
523 * dwfl_module_info.c: Use it.
524 * cu.c (addrarange): Likewise.
525 * dwfl_dwarf_line.c: Likewise.
526 * dwfl_module_dwarf_cfi.c: Likewise.
527 * dwfl_lineinfo.c: Likewise.
528 * dwfl_nextcu.c: Likewise.
529 * dwfl_module_getdwarf.c (dwfl_module_getdwarf): Likewise.
530
531 * libdwflP.h (dwfl_adjusted_st_value): New function.
532 * relocate.c (resolve_symbol): Use it.
533 * dwfl_module_getsym.c: Likewise.
534 * dwfl_module_addrsym.c: Likewise.
535 * dwfl_module_info.c: Likewise.
536
537 * libdwflP.h (dwfl_adjusted_address): New function.
538 * dwfl_module_build_id.c (__libdwfl_find_build_id): Use it.
539 * relocate.c (__libdwfl_relocate_value): Likewise.
540 * derelocate.c (cache_sections): Likewise.
541 (dwfl_module_address_section): Likewise.
542 * dwfl_module_getelf.c: Likewise.
543 * dwfl_module_eh_cfi.c: Likewise.
544 * link_map.c (consider_executable): Likewise.
545
Roland McGrathde44f132010-08-24 15:38:42 -07005462010-08-24 Roland McGrath <roland@redhat.com>
547
548 * dwfl_dwarf_line.c: New file.
549 * Makefile.am (libdwfl_a_SOURCES): Add it.
550
Roland McGrath7503c892010-08-18 02:54:29 -07005512010-08-18 Roland McGrath <roland@redhat.com>
552
553 * link_map.c (report_r_debug): Use found name if we have no name,
554 even if we already have an Elf handle.
555
Roland McGrath81cfcca2010-06-30 00:45:58 -07005562010-06-30 Roland McGrath <roland@redhat.com>
557
558 * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't be
559 confused by -1 return from dwfl_build_id_find_elf after it opened
560 the Elf handle.
Roland McGrath82a63362010-06-30 01:18:43 -0700561 * find-debuginfo.c (dwfl_standard_find_debuginfo): Likewise for
562 dwfl_build_id_find_debuginfo.
Roland McGrath81cfcca2010-06-30 00:45:58 -0700563
Roland McGrath3e0f7d12010-06-15 23:10:35 -07005642010-06-16 Roland McGrath <roland@redhat.com>
565
566 * cu.c (cudie_offset): Use DIE_OFFSET_FROM_CU_OFFSET macro.
567
Roland McGrathb9e85182010-06-14 12:45:25 -07005682010-06-14 Roland McGrath <roland@redhat.com>
569
570 * find-debuginfo.c (try_open): Take new arg MAIN_STAT. Compare
571 candidate file to that st_dev/st_ino and pretend it didn't exist
572 if they match.
573 (find_debuginfo_in_path): Update caller, pass main file's info.
574
Roland McGratha0635db2010-05-20 00:04:59 -07005752010-05-20 Roland McGrath <roland@redhat.com>
576
577 * linux-proc-maps.c (find_sysinfo_ehdr): Renamed to ...
578 (grovel_auxv): ... this. Take DWFL argument.
579 (dwfl_linux_proc_report): Update caller.
580
581 * dwfl_module_getdwarf.c (open_elf): Calculate alignment for bias
582 based on dwfl->segment_align or manifest alignment of MOD->low_addr.
583
Roland McGrathbe9c4d72010-05-19 21:24:27 -07005842010-05-19 Roland McGrath <roland@redhat.com>
585
586 * linux-kernel-modules.c (intuit_kernel_bounds): Rewritten.
587
Roland McGrathed431dd2010-05-06 00:52:51 -07005882010-05-06 Roland McGrath <roland@redhat.com>
589
Roland McGrathaba26e02010-05-06 01:12:15 -0700590 * segment.c (insert): Clear inserted elements of DWFL->lookup_module.
591
Roland McGrathed431dd2010-05-06 00:52:51 -0700592 * libdwflP.h (DWFL_ERRORS): Add WRONG_ID_ELF.
593 * dwfl_build_id_find_elf.c: Set MOD->main.valid when there is a build
594 ID but we didn't find a file.
595 * dwfl_module_getdwarf.c (__libdwfl_getelf): When that's set, check
596 and refuse any fallback file-by-name if it lacks the matching ID.
597
598 * dwfl_error.c (dwfl_errno): Add INTDEF.
599 * libdwflP.h: Add INTDECL.
600
601 * dwfl_module_getdwarf.c (open_elf): Do elf_end and clear FILE->elf in
602 failure cases.
603
Roland McGrath77cda9d2010-05-04 16:31:43 -07006042010-05-04 Roland McGrath <roland@redhat.com>
605
Roland McGrathb4bb3012010-05-04 20:09:30 -0700606 * dwfl_segment_report_module.c: Use "[pie]" rather than "[dso]" for an
607 ET_DYN that has a DT_DEBUG.
608
609 * dwfl_segment_report_module.c: Fix jump-start of NDX-finding loop.
Roland McGrath89bb5d32010-05-04 18:03:42 -0700610
Roland McGrath4820a052010-05-04 19:46:56 -0700611 * segment.c (insert): Fix moving of values following insertion.
612 (reify_segments): Fix up MOD->segment backpointer indices after
613 later insertions in the main loop invalidate them.
614
Roland McGrathd05c5962010-05-04 18:05:22 -0700615 * link_map.c (dwfl_link_map_report): Detect bias of embedded phdrs and
616 apply it to PT_DYNAMIC p_vaddr so we handle a PIE correctly.
617
Roland McGrath77cda9d2010-05-04 16:31:43 -0700618 * core-file.c (dwfl_core_file_report): Return any nonzero count of
619 modules reported, even if link_map grovelling failed and only sniffing
620 found anything.
621
Roland McGrathd17f9de2010-04-26 13:09:33 -07006222010-04-26 Roland McGrath <roland@redhat.com>
623
624 * relocate.c (relocate_section): Treat R_*_NONE reloc as no reloc.
625 Works around probably-wrong ld -r behavior for case of a DWARF address
626 constant that refers to a discarded SHF_ALLOC section.
627
Roland McGrathbe139302010-04-14 12:54:45 -07006282010-04-14 Roland McGrath <roland@redhat.com>
629
630 * link_map.c (report_r_debug): Limit iterations on the l_next chain to
631 an upper bound on sane possible number of elements.
632
Roland McGrath5ea349b2010-04-06 00:04:49 -07006332010-03-11 Roland McGrath <roland@redhat.com>
634
635 * link_map.c (auxv_format_probe): Fix scanning loop, so we really scan
636 the second half for 32-bit matches.
637
Roland McGrath8068e062010-03-10 23:49:13 -08006382010-03-10 Roland McGrath <roland@redhat.com>
639
640 * core-file.c (dwfl_core_file_report): Punt EHDR argument.
641 * argp-std.c (parse_opt): Update caller.
642 * libdwfl.h: Declare dwfl_core_file_report.
643 * libdwflP.h: Don't.
644
Roland McGrathca84a552010-02-17 01:44:42 -08006452010-02-17 Roland McGrath <roland@redhat.com>
646
647 * dwfl_segment_report_module.c (addr_segndx): Take new flag argument.
648 If set, find the first index not below ADDR.
649 (dwfl_segment_report_module): Update callers.
650 Pass true when calculating return value.
651
Roland McGrathbf963472010-02-15 15:16:44 -08006522010-02-15 Roland McGrath <roland@redhat.com>
653
Roland McGrath22359e22010-02-15 15:57:03 -0800654 * Makefile.am: Use config/eu.am for common stuff.
655
Roland McGrathbf963472010-02-15 15:16:44 -0800656 * find-debuginfo.c (find_debuginfo_in_path): Fix uninitialized
657 variable in failure path.
658
Mark Wielaardeacdcf32010-02-02 15:45:24 +01006592010-02-02 Mark Wielaard <mjw@redhat.com>
660
661 * dwfl_module_dwarf_cfi.c (dwfl_module_dwarf_cfi): Always set bias.
662 * dwfl_module_eh_cfi.c (dwfl_module_eh_cfi): Likewise
663
Roland McGrathf95760a2010-01-07 20:24:34 -08006642010-01-07 Roland McGrath <roland@redhat.com>
665
666 * core-file.c (dwfl_core_file_report): Use elf_getphdrnum.
667 * dwfl_module_build_id.c (__libdwfl_find_build_id): Likewise.
668 * dwfl_module_getdwarf.c (open_elf, find_dynsym): Likewise.
669 * dwfl_report_elf.c (__libdwfl_report_elf): Likewise.
670
Roland McGrath1d7cbd12010-01-06 04:22:40 -08006712010-01-06 Roland McGrath <roland@redhat.com>
672
673 * relocate.c (relocate_getsym): For SHN_COMMON, zero st_value.
674 (relocate_section): Let unresolved SHN_COMMON symbol stay 0.
675
Roland McGrath15426bd2009-11-16 20:38:17 -08006762009-11-16 Roland McGrath <roland@redhat.com>
677
678 * relocate.c (relocate_section): Skip SHT_NOBITS or empty target scn.
679
Petr Machata003dd322009-11-13 00:38:27 +01006802009-11-12 Petr Machata <pmachata@redhat.com>
681
682 * core-file.c (dwfl_elf_phdr_memory_callback): Only load ahead if
683 the chunk is both offset-contiguous and vaddr-contiguous.
684
Roland McGrathcdb48e02009-11-05 11:34:08 -08006852009-11-05 Roland McGrath <roland@redhat.com>
686
687 * link_map.c (report_r_debug): Skip entries with l_ld==0.
Roland McGrath6229eb52009-11-05 11:43:38 -0800688 Use dwfl_addrmodule for l_ld lookup, don't bail on lookup failure.
Roland McGrathcdb48e02009-11-05 11:34:08 -0800689
Roland McGrathde6730c2009-09-04 03:05:31 -07006902009-09-04 Roland McGrath <roland@redhat.com>
691
692 * image-header.c (__libdw_image_header): Fix tranposed comparison.
693
Roland McGrath6bb90712009-08-27 12:36:47 -07006942009-08-27 Roland McGrath <roland@redhat.com>
695
696 * image-header.c: New file.
697 * Makefile.am (libdwfl_a_SOURCES): Add it.
698 * libdwflP.h: Declare __libdw_image_header.
699 * open.c (decompress): Don't consume ELF on failure.
700 (what_kind): New function, broken out of ...
701 (__libdw_open_file): ... here. Call it.
702 If it fails, try __libdw_image_header and then try what_kind again.
703
704 * gzip.c (unzip): Reuse *WHOLE as first INPUT_BUFFER,
705 leave it behind for next decompressor.
706 * open.c (decompress): Free BUFFER on failure.
707
Roland McGrathd6ccdc12009-08-26 00:23:01 -07007082009-08-26 Roland McGrath <roland@redhat.com>
709
Roland McGrathe5a1a812009-08-26 03:05:50 -0700710 * gzip.c (find_zImage_payload): New function, broken out of ...
711 (mapped_zImage): ... here. Call it.
712 (find_zImage_payload) [LZMA]: Match LZMA-compressed kernels with
713 stupid method of just trying the decoder.
714
Roland McGrath24169642009-08-26 02:26:34 -0700715 * open.c [USE_LZMA]: Try __libdw_unlzma.
716 * libdwflP.h: Declare it.
717 (DWFL_ERRORS): Add DWFL_E_LZMA.
718 * gzip.c [LZMA]: Implement liblzma version for XZ file format.
719 * lzma.c: New file.
720 * Makefile.am [LZMA] (libdwfl_a_SOURCES): Add it.
721
Roland McGrathd6ccdc12009-08-26 00:23:01 -0700722 * gzip.c (mapped_zImage): Limit scan to 32kb.
723 Make this unconditional, support bzip2 kernel images too.
Roland McGrathae1d7dc2009-08-26 01:27:59 -0700724 (unzip): Use direct inflate method for non-mmap case too.
725 Only zlib uses the stream method.
Roland McGrathd6ccdc12009-08-26 00:23:01 -0700726
Roland McGrathebfb6482009-08-09 15:40:52 -07007272009-08-09 Roland McGrath <roland@redhat.com>
728
729 * dwfl_module_build_id.c: Use new macros for versioned definitions.
730
Roland McGrathfe8b42e2009-07-08 14:54:16 -07007312009-07-08 Roland McGrath <roland@redhat.com>
732
Roland McGrath3c84db32009-06-24 17:41:40 -0700733 * dwfl_module_dwarf_cfi.c: New file.
734 * dwfl_module_eh_cfi.c: New file.
735 * Makefile.am (libdwfl_a_SOURCES): Add them.
736 * libdwflP.h (struct Dwfl_Module): New members `dwarf_cfi', `eh_cfi.
737 Add INTDECL for dwfl_module_eh_cfi, dwfl_module_dwarf_cfi.
738
7392009-07-08 Roland McGrath <roland@redhat.com>
740
Roland McGrathfe8b42e2009-07-08 14:54:16 -0700741 * libdwflP.h (struct Dwfl_Module): Reorder members to pack better.
742
Mark Wielaard2256e362009-06-18 13:31:56 +02007432009-06-18 Mark Wielaard <mjw@redhat.com>
744
745 * dwfl_report_elf.c (__libdwfl_report_elf): Return NULL on overlap.
746
Ulrich Drepperf1894932009-06-13 15:55:42 -07007472009-06-13 Ulrich Drepper <drepper@redhat.com>
748
749 * derelocate.c: Don't use deprecated libelf functions.
750 * dwfl_module_getdwarf.c: Likewise.
751 * relocate.c: Likewise.
752
Ulrich Drepper4f515712009-04-23 07:54:53 -07007532009-04-23 Ulrich Drepper <drepper@redhat.com>
754
755 * dwfl_module_build_id.c: Define versioned symbols only if SHARED is
756 defined. Otherwise just define the latest version.
757
Roland McGrathcc480472009-04-22 11:32:20 -07007582009-04-22 Roland McGrath <roland@redhat.com>
759
Roland McGrathc65558b2009-04-22 12:29:32 -0700760 * relocate.c (resolve_symbol): Apply correct bias to st_value found in
761 a non-ET_REL module.
762
Roland McGrathcc480472009-04-22 11:32:20 -0700763 * dwfl_module_build_id.c (__libdwfl_find_build_id): Fix last change to
764 adjust properly for non-ET_REL.
765
Roland McGrath19a8e4d2009-04-21 15:44:07 -07007662009-04-21 Roland McGrath <roland@redhat.com>
767
768 * dwfl_module_getsym.c: Apply non-ET_REL bias only if SHF_ALLOC.
769
770 * relocate.c (__libdwfl_relocate_value): Assert that MOD is ET_REL.
771 * derelocate.c (cache_sections): Call __libdwfl_relocate_value only
772 for ET_REL.
773 * dwfl_module_build_id.c (__libdwfl_find_build_id): Likewise.
774
Roland McGrath10361572009-04-20 11:50:50 -07007752009-04-20 Roland McGrath <roland@redhat.com>
776
777 * dwfl_module_getdwarf.c (__libdwfl_getelf): Add internal_function.
778
Roland McGratha605a3c2009-04-19 18:27:01 -07007792009-04-19 Roland McGrath <roland@redhat.com>
780
781 * dwfl_module_getdwarf.c (find_file): Renamed to ...
782 (__libdwfl_getelf): ... this. Make it global.
783 (find_symtab, find_dw): Update callers.
784 (dwfl_module_getelf): Functions moved ...
785 * dwfl_module_getelf.c: ... here, new file.
786 * Makefile.am (libdwfl_a_SOURCES): Add it.
787 * libdwflP.h: Declare __libdwfl_getelf.
788
Roland McGrathfa253262009-04-14 02:38:19 -07007892009-04-14 Roland McGrath <roland@redhat.com>
790
791 * dwfl_segment_report_module.c: Handle DT_STRTAB value being either
792 absolute (already adjusted in place) or needing load bias adjustment.
793
794 * core-file.c (dwfl_elf_phdr_memory_callback): Fix return value for
795 gelf_getphdr failure. Fix file size limit checks.
796
797 * dwfl_segment_report_module.c: Fix underflow in DYNSTRSZ check.
798
Roland McGrath243fa262009-04-08 17:05:43 -07007992009-04-08 Roland McGrath <roland@redhat.com>
800
Roland McGrath785dbb12009-04-08 17:15:01 -0700801 * dwfl_module_getsym.c: Don't adjust for bias again after
802 __libdwfl_relocate_value.
803
Roland McGrath243fa262009-04-08 17:05:43 -0700804 * relocate.c (__libdwfl_relocate_value): Don't adjust a value from
805 a non-SHF_ALLOC section.
806 (relocate_getsym): Test st_shndx for SHN_* values, not *SHNDX.
807 * dwfl_module_getsym.c (dwfl_module_getsym): Likewise.
808
Roland McGrath8651c5e2009-03-09 20:42:56 -07008092009-03-09 Roland McGrath <roland@redhat.com>
810
Roland McGrath329ed9f2009-03-09 20:49:53 -0700811 * dwfl_module_build_id.c (__libdwfl_find_build_id): Move SHSTRNDX
812 variable to outer scope, so we cache it for the loop.
813
Roland McGrath8651c5e2009-03-09 20:42:56 -0700814 * relocate.c (__libdwfl_relocate_value): Add MOD->main.bias to sh_addr.
815
Roland McGrath31fd6542009-02-12 17:26:39 -08008162009-02-12 Roland McGrath <roland@redhat.com>
817
818 * dwfl_module_build_id.c (__libdwfl_find_build_id): Use
819 __libdwfl_relocate_value to find correct sh_addr value.
820
Roland McGrath45c01cd2009-02-10 17:03:19 -08008212009-02-10 Roland McGrath <roland@redhat.com>
822
Roland McGrath5453abf2009-02-10 17:33:49 -0800823 * dwfl_report_elf.c (__libdwfl_report_elf): Take new arg SANITY.
824 If false, don't fail for NO_PHDR.
825 (dwfl_report_elf): Update caller.
826 * libdwflP.h: Update decl.
827 * offline.c (process_elf): Call it with false, so we don't refuse
828 dubiously-formed objects here.
829
Roland McGrath45c01cd2009-02-10 17:03:19 -0800830 * link_map.c (consider_executable): Don't assert dwfl_addrsegment
831 finds our module. We shouldn't crash when we confuse some guesses.
832
Ulrich Dreppera9d51bf2009-02-10 12:55:07 -08008332009-02-10 Ulrich Drepper <drepper@redhat.com>
834
835 * open.c (decompress): Avoid crash with empty input file.
836
Roland McGrathe738ad22009-01-27 16:41:54 -08008372009-01-27 Roland McGrath <roland@redhat.com>
838
839 * dwfl_report_elf.c (__libdwfl_report_elf): Ignore trailing PT_LOAD
840 with zero vaddr and memsz.
841
Roland McGrath74afbee2009-01-22 04:52:56 -08008422009-01-22 Roland McGrath <roland@redhat.com>
843
Roland McGrathe34a3f82009-01-22 12:59:23 -0800844 * open.c (decompress): Move BUFFER, SIZE decls outside #if.
845
Roland McGrath74afbee2009-01-22 04:52:56 -0800846 * dwfl_segment_report_module.c (addr_segndx): Remove bogus adjustments
847 after address-matching loop.
848
849 * segment.c (lookup): Fix fencepost in checking for HINT match.
850
Roland McGrath8dc9f932009-01-14 12:56:53 -08008512009-01-14 Roland McGrath <roland@redhat.com>
852
853 * gzip.c [!BZLIB] (mapped_zImage): New function.
854 (unzip) [!BZLIB]: Grok Linux kernel zImage format.
855
Ulrich Drepper7e678fa2009-01-10 18:02:05 -08008562009-01-10 Ulrich Drepper <drepper@redhat.com>
857
858 * dwfl_error.c: Always use __thread. Remove all !USE_TLS code.
859
Roland McGratha4b1a952009-01-08 20:53:26 -08008602009-01-08 Roland McGrath <roland@redhat.com>
861
862 * linux-kernel-modules.c (dwfl_linux_kernel_report_offline):
863 Skip subdirectory named "source".
864 (dwfl_linux_kernel_find_elf): Likewise.
865
Roland McGrath60205c92009-01-06 00:10:23 -08008662009-01-06 Roland McGrath <roland@redhat.com>
867
Roland McGrath705364b2009-01-06 02:04:51 -0800868 * linux-kernel-modules.c (check_suffix): New function.
Roland McGrath60205c92009-01-06 00:10:23 -0800869 Match ".ko", ".ko.gz", and ".ko.bz2" suffixes.
870 (dwfl_linux_kernel_report_offline): Use it.
871 (dwfl_linux_kernel_find_elf): Likewise.
872
Roland McGrathbca43152009-01-05 23:59:32 -08008732009-01-05 Roland McGrath <roland@redhat.com>
874
875 * argp-std.c (parse_opt): Use __libdw_open_file for core file.
876 * dwfl_build_id_find_debuginfo.c: Use it to open the file.
877 * dwfl_build_id_find_elf.c: Likewise.
878 * dwfl_module_getdwarf.c (open_elf): Likewise.
879 * dwfl_report_elf.c: Likewise.
880 * find-debuginfo.c (validate): Likewise.
881 * offline.c (__libdwfl_report_offline): Likewise.
882
883 * libdwflP.h: Declare __libdw_open_file.
884 * open.c: New file.
885 * Makefile.am (libdwfl_a_SOURCES): Add it.
886
887 * gzip.c: New file.
888 * Makefile.am [ZLIB] (libdwfl_a_SOURCES): Add it.
889 * bzip2.c: New file.
890 * Makefile.am [BZLIB] (libdwfl_a_SOURCES): Add it.
891 * libdwflP.h: Declare __libdw_gunzip, __libdw_bunzip2.
892
Roland McGrath45d7b292008-12-16 16:21:40 -08008932008-12-16 Roland McGrath <roland@redhat.com>
894
895 * dwfl_module_build_id.c (dwfl_module_build_id): Define with alias and
896 symver magic to bind to ELFUTILS_0.138.
897 (_BUG_COMPAT_dwfl_module_build_id): New function, bug compatible
898 wrapper for ELFUTILS_0.130 version set.
899
Roland McGrath7d9b8212008-12-18 15:08:09 -08009002008-12-18 Roland McGrath <roland@redhat.com>
901
902 * derelocate.c (dwfl_module_relocate_address): Fix last fix: ET_DYN
903 addresses are taken as relative to MOD->low_addr.
904
Roland McGrath74825c42008-12-15 19:33:33 -08009052008-12-15 Roland McGrath <roland@redhat.com>
906
907 * derelocate.c (dwfl_module_relocate_address): Apply main.bias, not
908 debug.bias.
909
Roland McGrathb28a8942008-12-11 02:09:28 -08009102008-12-11 Roland McGrath <roland@redhat.com>
911
912 * offline.c (process_archive): Don't call elf_end and close if
913 returning NULL. Check first elf_begin call and set error code
914 specially for empty archive.
915 Fixes RHBZ#465878.
916
Roland McGratha845f682008-12-03 03:41:58 +00009172008-12-02 Roland McGrath <roland@redhat.com>
918
919 * dwfl_getmodules.c (dwfl_getmodules): Typo fix in last change.
920
9212008-11-26 Roland McGrath <roland@redhat.com>
922
923 * dwfl_getmodules.c (dwfl_getmodules): Encode iteration style in
924 return value, and interpret encoded OFFSET argument.
925
9262008-10-07 Roland McGrath <roland@redhat.com>
927
928 * dwfl_module_build_id.c (check_notes): Fix typo in vaddr calculation.
929
Roland McGrath9cf28e42008-09-30 06:35:35 +00009302008-09-29 Roland McGrath <roland@redhat.com>
931
932 * segment.c (insert): Must realloc DWFL->lookup_module here too.
933 (dwfl_report_segment): Clear DWFL->lookup_module before insert calls.
934
9352008-08-28 Roland McGrath <roland@redhat.com>
936
937 * segment.c (reify_segments): Fix last change.
938
9392008-08-27 Roland McGrath <roland@redhat.com>
940
941 * linux-proc-maps.c (read_proc_memory): Return 0 for EINVAL or EPERM
942 failure from pread64.
943
Roland McGrath122f3882008-08-26 07:20:29 +00009442008-08-26 Roland McGrath <roland@redhat.com>
945
946 * segment.c (reify_segments): Insert a trailing segment for a module
947 end that is above the highest current segment.
948
9492008-08-25 Roland McGrath <roland@redhat.com>
950
951 * dwfl_module_getdwarf.c (open_elf): Extract elf_errno () for
952 coded return value, not plain DWFL_E_LIBELF. Return DWFL_E_BADELF
953 if FILE->elf is not ELF_K_ELF.
954
955 * dwfl_segment_report_module.c: Add a cast.
956
Roland McGrathb4d6f0f2008-08-25 22:55:17 +00009572008-08-21 Denys Vlasenko <dvlasenk@redhat.com>
Ulrich Drepperd56e2322008-08-16 03:09:13 +0000958
Roland McGrathb4d6f0f2008-08-25 22:55:17 +0000959 * dwfl_module_addrsym.c (dwfl_module_addrsym): Improve logic
960 which decides which symbol is "closest" to a given address.
961
9622008-08-15 Roland McGrath <roland@redhat.com>
963
964 * argp-std.c (offline_callbacks): Use dwfl_build_id_find_elf.
965 (options, parse_opt): Handle --core.
966
967 * core-file.c: New file.
968 * Makefile.am (libdwfl_a_SOURCES): Add it.
969 * libdwflP.h (dwfl_core_file_report): Declare it.
970
971 * link_map.c: New file.
972 * Makefile.am (libdwfl_a_SOURCES): Add it.
973 * libdwflP.h (dwfl_link_map_report): Declare it.
974
975 * libdwflP.h (MIN, MAX): New macros.
976 (Dwfl_Memory_Callback): New typedef.
977 (Dwfl_Module_Callback): New typedef.
978 (dwfl_segment_report_module): Declare it.
979 * dwfl_segment_report_module.c: New file.
980 * Makefile.am (libdwfl_a_SOURCES): Add it.
981
982 * derelocate.c (dwfl_module_address_section): Add INTDEF.
983 * libdwflP.h: Add INTDECL.
984
985 * segment.c: New file.
986 * Makefile.am (libdwfl_a_SOURCES): Add it.
987 * libdwfl.h: Declare dwfl_addrsegment, dwfl_report_segment.
988 * libdwflP.h (struct Dwfl): New members lookup_elts, lookup_alloc,
989 lookup_addr, lookup_module, lookup_segndx, replace removed members
990 modules, nmodules.
991 (struct Dwfl_Module): New member segment.
992 * dwfl_end.c (dwfl_end): Free the new ones. Iterate via modulelist
993 to each free module.
994 * dwfl_module.c (dwfl_report_begin_add): Do nothing.
995 (dwfl_report_begin): Don't call it. Truncate the segment table instead.
996 (dwfl_report_module): Don't touch DWFL->nmodules.
997 (dwfl_report_end): Don't touch DWFL->modules and DWFL->nmodules.
998 (compare_modules): Function removed.
999 * dwfl_getmodules.c: Rewritten.
1000 Add INTDEF.
1001 * libdwflP.h: Add INTDECLs.
1002 * dwfl_getdwarf.c: Rewritten to call dwfl_getmodules.
1003 * dwfl_addrmodule.c: Rewritten to just call dwfl_addrsegment.
Ulrich Drepperd56e2322008-08-16 03:09:13 +00001004
Roland McGrath1d8bb252008-08-07 08:39:41 +000010052008-08-03 Roland McGrath <roland@redhat.com>
1006
1007 * linux-kernel-modules.c: Include <fts.h> before <config.h>.
1008
10092008-07-17 Roland McGrath <roland@redhat.com>
1010
1011 * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Set errno to
1012 zero if the failure was only ENOENT.
1013
10142008-06-03 Roland McGrath <roland@redhat.com>
1015
1016 * dwfl_module_addrsym.c (dwfl_module_addrsym): Exclude undefined
1017 symbols.
1018
Roland McGrath9d2f3ee2008-05-22 20:28:05 +000010192008-05-22 Petr Machata <pmachata@redhat.com>
1020
1021 * dwfl_module_getdwarf.c (open_elf): Bias of ET_EXEC files is always 0.
1022
Roland McGrath0fa20e82008-05-07 18:37:14 +000010232008-05-06 Roland McGrath <roland@frob.com>
1024
1025 * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Use
1026 FTS_LOGICAL here too.
1027 (dwfl_linux_kernel_find_elf): Likewise.
1028
10292008-04-29 Roland McGrath <roland@redhat.com>
1030
1031 * find-debuginfo.c (dwfl_standard_find_debuginfo): Try path search
1032 based on canonicalize_file_name if it differs from the supplied name.
1033
1034 * linux-kernel-modules.c (check_module_notes): Use FTS_LOGICAL so
1035 we accept symlinks.
1036
Roland McGrath9897d662008-04-29 01:49:50 +000010372008-04-27 Roland McGrath <roland@redhat.com>
1038
1039 * linux-kernel-modules.c (report_kernel): Fix crash when
1040 dwfl_report_elf fails.
1041
Roland McGrathbfc01702008-04-06 01:57:32 +000010422008-04-05 Roland McGrath <roland@redhat.com>
1043
1044 * linux-proc-maps.c (proc_maps_report): Don't leak LAST_FILE.
1045
1046 * dwfl_module_getdwarf.c (find_file): Always free build_id_bits.
1047 Clear it after freeing.
1048 * dwfl_module_report_build_id.c (dwfl_module_report_build_id): Likewise.
1049
Roland McGrathd11f9cb2008-03-26 20:51:59 +000010502008-03-26 Roland McGrath <roland@redhat.com>
1051
1052 * dwfl_module_getdwarf.c (load_symtab): Don't return success for
1053 SHT_DYNSYM, just set *SYMSCN like the comment says.
1054
1055 * dwfl_end.c (dwfl_end): Iterate on modulelist chain, not modules array.
1056
1057 * argp-std.c (parse_opt): On failure, call dwfl_end before argp_failure.
1058
10592008-03-19 Roland McGrath <roland@redhat.com>
1060
1061 * dwfl_module_getsrc.c: Adjust address for module bias before search.
1062
10632008-03-01 Roland McGrath <roland@redhat.com>
1064
1065 * libdwflP.h (__libdwfl_seterrno): Remove parameter name from
1066 prototype to avoid older compiler's complaint about reuse of the name.
1067 (__libdwfl_canon_error): Likewise.
1068
Roland McGrath059c83e2008-02-21 06:19:39 +000010692008-02-19 Roland McGrath <roland@redhat.com>
1070
1071 * relocate.c (relocate_section): Check for an unhandled relocation
1072 type before resolving a reloc's symbol. Lift DWFL_E_BADRELTYPE ->
1073 DWFL_E_UNKNOWN_MACHINE check out of loops.
1074
1075 * dwfl_module_getdwarf.c (load_dw): Skip relocation if
1076 DEBUGFILE->relocated is already set.
1077
10782008-01-26 Roland McGrath <roland@redhat.com>
1079
1080 * dwfl_module_getdwarf.c (open_elf): Open FILE->name if it's non-null.
1081
1082 * dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Don't clear
1083 incoming *FILE_NAME at the start.
1084
Ulrich Dreppere219f1c2008-01-09 05:49:49 +000010852008-01-08 Roland McGrath <roland@redhat.com>
1086
1087 * Makefile.am (euinclude): Variable removed.
1088 (pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
1089
Roland McGrathe4c22ea2007-10-23 13:07:39 +000010902007-10-23 Roland McGrath <roland@redhat.com>
1091
1092 * linux-kernel-modules.c (report_kernel_archive): Reorder the kernel
1093 module to appear first.
1094
10952007-10-20 Roland McGrath <roland@redhat.com>
1096
1097 * offline.c (process_archive_member): Take FD argument, pass it down
1098 to process_file. Return Elf_Cmd, not bool.
1099 Call elf_next here, always before elf_end.
1100 (process_archive): Update caller. Don't close FD here unless there
1101 are no member refs.
1102
1103 * dwfl_module.c (free_file): Close fd only when elf_end returns zero.
1104
1105 * libdwflP.h (struct dwfl_file): New bool member `relocated'.
1106 * dwfl_module_getdwarf.c (dwfl_module_getelf): For ET_REL, apply
1107 partial relocation to one or both files.
1108 (dwfl_module_getdwarf): For ET_REL, make sure extra sections'
1109 relocations have been applied to the debug file if dwfl_module_getelf
1110 has been used before.
1111
1112 * relocate.c (resolve_symbol): New function.
1113 (relocate_section): Call it.
1114
1115 * relocate.c (relocate_getsym): Handle null MOD->symfile.
1116 (relocate_section): Take new bool arg, PARTIAL. If true,
1117 no error for BADRELTYPE/RELUNDEF, instead just skip them
1118 and leave only those skipped relocs behind the reloc section.
1119 (__libdwfl_relocate_section): Take new arg, pass it down.
1120 (__libdwfl_relocate): Take new bool arg, DEBUG. If false,
1121 do partial relocation on all sections.
1122 * dwfl_module_getdwarf.c (load_dw): Update caller.
1123 * libdwflP.h: Update decls.
1124 * derelocate.c (dwfl_module_address_section): Pass new argument
1125 to __libdwfl_relocate_section, true.
1126
1127 * derelocate.c (cache_sections): Don't cache reloc sections when
1128 section_address callback is null.
1129
11302007-10-19 Roland McGrath <roland@redhat.com>
1131
1132 * relocate.c (relocate_section): Fix fencepost error in r_offset check.
1133
1134 * derelocate.c (struct dwfl_relocation): Add member `relocs'.
1135 (struct secref): Likewise.
1136 (cache_sections): Cache the relocation section referring to each
1137 section we cache, if any.
1138 (dwfl_module_address_section): Use __libdwfl_relocate_section as
1139 necessary.
1140
1141 * relocate.c (struct reloc_symtab_cache): New type.
1142 (relocate_getsym): Use it instead of four arguments.
1143 (__libdwfl_relocate): Update caller.
1144 (relocate_section): New function, broken out of ...
1145 (__libdwfl_relocate): ... here.
1146 (__libdwfl_relocate_section): New function.
1147 * libdwflP.h: Declare it.
1148
11492007-10-17 Roland McGrath <roland@redhat.com>
1150
1151 * dwfl_module_getsym.c (dwfl_module_getsym): Apply MOD->symfile->bias
1152 to relocated st_value.
1153
1154 * dwfl_report_elf.c (__libdwfl_report_elf): Align initial BASE for
1155 ET_REL to 0x100.
1156
11572007-10-16 Roland McGrath <roland@redhat.com>
1158
1159 * dwfl_report_elf.c (__libdwfl_report_elf): Readjust BASE when a later
1160 section has larger alignment requirements not met by the original BASE,
1161 rather than padding more between sections.
1162
1163 * dwfl_report_elf.c (__libdwfl_report_elf): Fix bias calculation.
1164
1165 * dwfl_module_build_id.c (__libdwfl_find_build_id): Apply module bias
1166 to sh_addr value.
1167
1168 * dwfl_report_elf.c (__libdwfl_report_elf): Don't be confused by BASE
1169 at zero in ET_REL case. Adjust BASE to necessary alignment.
1170
1171 * dwfl_module_build_id.c (check_notes): Take -1, not 0, as stub value
1172 for DATA_VADDR.
1173 (__libdwfl_find_build_id): Update caller.
1174
1175 * relocate.c (__libdwfl_relocate_value): Don't use sh_offset.
1176 * dwfl_report_elf.c (__libdwfl_report_elf): Likewise.
1177 * offline.c (dwfl_offline_section_address): Bail early if there is
1178 separate debug file.
1179
1180 * relocate.c (__libdwfl_relocate): Don't return DWFL_E_NO_DWARF.
1181
Ulrich Drepperb597dfa2007-10-16 05:21:27 +000011822007-10-09 Roland McGrath <roland@redhat.com>
1183
1184 * dwfl_report_elf.c (__libdwfl_report_elf): Clear SHDR->sh_offset when
1185 caching SHDR->sh_addr = 0.
1186 * offline.c (dwfl_offline_section_address): Never called for sh_addr
1187 really at 0, don't check for it. Use MOD->debug directly, not symfile.
1188
1189 * dwfl_module_getdwarf.c (load_symtab): Return success properly when
1190 we've found SHT_SYMTAB.
1191
1192 * relocate.c (relocate_getsym): New function.
1193 (__libdwfl_relocate): Use it.
1194 (__libdwfl_relocate_value): Take new Elf * argument. Make SYMSHSTRNDX
1195 be a pointer instead of value; cache getshstrndx result there.
1196 * libdwflP.h: Update decl.
1197 * derelocate.c (cache_sections): Update caller.
1198 Always work on the main file, not the symfile.
1199 (dwfl_module_address_section): Likewise.
1200 * dwfl_module_getsym.c (dwfl_module_getsym): Update caller.
1201
12022007-10-07 Roland McGrath <roland@redhat.com>
1203
1204 * offline.c (process_archive): Initialize MOD.
1205
1206 * linux-kernel-modules.c (get_release): New function, broken out of ...
1207 (report_kernel): ... here. Call it.
1208 (try_kernel_name): Take new arg TRY_DEBUG, only try ".debug" if set.
1209 (find_kernel_elf): Update caller.
1210 (report_kernel_archive): New function.
1211 (dwfl_linux_kernel_report_offline): Call it.
1212
1213 * offline.c (process_file): Take new arg PREDICATE, pass it down.
1214 (process_archive): Likewise.
1215 (process_archive_member): Likewise. When nonnull, let the predicate
1216 decide whether to use this member.
1217 (__libdwfl_report_offline): New function, broken out of ...
1218 (dwfl_report_offline): ... here. Call it.
1219 * libdwflP.h: Declare it.
1220
1221 * offline.c (process_archive, process_archive_member): New functions.
1222 (process_elf, process_file): New functions, broken out of ...
1223 (dwfl_report_offline): ... here. Call process_file, which recurses on
1224 ELF_K_AR files.
1225
1226 * dwfl_report_elf.c (__libdwfl_report_elf): New, broken out of ...
1227 (dwfl_report_elf): ... here. Call it.
1228 * libdwflP.h: Declare it.
1229
12302007-10-06 Roland McGrath <roland@redhat.com>
1231
1232 * derelocate.c (dwfl_module_relocations): Don't call
1233 dwfl_module_getdwarf.
1234
1235 * derelocate.c (find_section): Use __libdwfl_seterrno, not
1236 __libdw_seterrno.
1237
1238 * relocate.c (__libdwfl_relocate_value): Abuse sh_offset, not
1239 SHF_ALLOC, to cache sh_addr resolved to 0.
1240
1241 * dwfl_report_elf.c (dwfl_report_elf): When an ET_REL file has sh_addr
1242 values nonzero already, just use its existing layout.
1243
1244 * relocate.c (__libdwfl_relocate): Clear size of reloc section in its
1245 in-core shdr after applying it.
1246
Ulrich Drepper3fc3d7b2007-10-04 18:40:28 +000012472007-10-04 Ulrich Drepper <drepper@redhat.com>
1248
1249 * linux-kernel-modules.c (dwfl_linux_kernel_report_kernel): Fake
1250 initialization of notes variable.
1251
Roland McGrath59ea7f32007-10-04 08:50:09 +000012522007-10-04 Roland McGrath <roland@redhat.com>
1253
1254 * linux-kernel-modules.c (intuit_kernel_bounds): Take new arg NOTES,
1255 fill in with vaddr of "__start_notes" symbol if found.
1256 (check_notes): New function.
1257 (check_kernel_notes): New function.
1258 (dwfl_linux_kernel_report_kernel): Call it.
1259 (check_module_notes): New function.
1260 (dwfl_linux_kernel_report_modules): Call it.
1261
1262 * linux-kernel-modules.c (dwfl_linux_kernel_find_elf):
1263 Try dwfl_build_id_find_elf first.
1264
1265 * linux-kernel-modules.c (report_kernel): Don't leak FD if !REPORT.
1266 Set kernel module e_type to ET_DYN.
1267
12682007-10-03 Roland McGrath <roland@redhat.com>
1269
1270 * find-debuginfo.c (validate): New function, broken out of ...
1271 (find_debuginfo_in_path): ... here. New function, broken out of ...
1272 (dwfl_standard_find_debuginfo): ... here. Call it, after trying
1273 dwfl_build_id_find_debuginfo first.
1274
1275 * dwfl_build_id_find_elf.c: New file.
1276 * dwfl_build_id_find_debuginfo.c: New file.
1277 * Makefile.am (libdwfl_a_SOURCES): Add them.
1278 * libdwfl.h: Declare them.
1279 * libdwflP.h: Add INTDECLs.
1280
1281 * dwfl_module_build_id.c: New file.
1282 * dwfl_module_report_build_id.c: New file.
1283 * Makefile.am (libdwfl_a_SOURCES): Add them.
1284 * libdwfl.h: Declare them.
1285 * libdwflP.h (struct Dwfl_Module): New members build_id_bits,
1286 build_id_len, build_id_vaddr. Declare __libdwfl_find_build_id.
1287 * dwfl_module.c (__libdwfl_module_free): Free MOD->build_id_bits.
1288
1289 * dwfl_module_getdwarf.c (find_offsets): New function.
1290 (find_dynsym): New function, calls that.
1291 (find_symtab): Call it.
1292
Roland McGrathc76f0b02007-09-27 07:31:33 +000012932007-09-11 Roland McGrath <roland@redhat.com>
1294
1295 * dwfl_module_addrsym.c: Prefer a later global symbol at the same
1296 address if its st_size is smaller.
1297
Roland McGrath099dd522007-08-13 22:58:36 +000012982007-08-13 Roland McGrath <roland@redhat.com>
1299
1300 * dwfl_module_addrsym.c: Add dead initializer for stupid compiler.
1301
13022007-08-12 Roland McGrath <roland@redhat.com>
1303
1304 * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Don't use
1305 FTS_LOGICAL.
1306
1307 * elf-from-memory.c (elf_from_remote_memory): Don't reset LOADBASE on
1308 a second phdr if it happens to match EHDR_VMA exactly.
1309
Roland McGrath42f68682007-08-09 07:54:22 +000013102007-08-08 Roland McGrath <roland@redhat.com>
1311
1312 * dwfl_module_addrsym.c: Don't use STT_SECTION, STT_FILE symbols and
1313 those with no names. Rewrite best symbol algorithm not to assume a
1314 sorted table and to be smarter handling sizeless symbols.
1315
Roland McGrath87d47802007-07-16 22:23:37 +000013162007-07-16 Roland McGrath <roland@redhat.com>
1317
1318 * dwfl_module.c (dwfl_report_module): Increment DWFL->nmodules when
1319 reviving an existing module.
1320
13212007-06-08 Roland McGrath <roland@redhat.com>
Roland McGrath55d34a52007-06-08 22:22:01 +00001322
1323 * libdwflP.h: Fix #ifndef for config.h to use PACKAGE_NAME.
1324
Roland McGrath9aa8ef72007-05-18 08:59:43 +000013252007-05-17 Roland McGrath <roland@redhat.com>
1326
1327 * linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Look at
1328 whole /lib/modules/VERSION tree, not just /lib/modules/VERSION/kernel.
1329 (dwfl_linux_kernel_find_elf): Likewise.
1330
1331 * linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use
1332 getline and sscanf instead of fscanf.
1333
13342007-05-08 Roland McGrath <roland@redhat.com>
1335
1336 * offline.c (dwfl_offline_section_address): Don't assume section
1337 numbers match between stripped and debuginfo files. Instead, assume
1338 only that the ordering among SHF_ALLOC sections matches.
1339
1340 * linux-kernel-modules.c (report_kernel): Change RELEASE argument to
1341 pointer to string.
1342 (dwfl_linux_kernel_report_offline): Update caller.
1343 (dwfl_linux_kernel_report_kernel): Likewise.
1344
Roland McGrath4be15242007-04-25 03:09:33 +000013452007-04-23 Roland McGrath <roland@redhat.com>
1346
1347 * argp-std.c (options): Fix group title string.
1348
1349 * argp-std.c (parse_opt): Handle ARGP_KEY_ERROR, free the Dwfl.
1350 Update via STATE->input every time we set STATE->hook, not only at
1351 ARGP_KEY_SUCCESS.
1352
1353 * dwfl_module.c (free_file): Free FILE->name.
1354
Roland McGrath43da9892007-04-16 23:13:37 +000013552007-04-16 Roland McGrath <roland@redhat.com>
1356
1357 * derelocate.c (cache_sections): Apply bias to sh_addr.
1358 (compare_secrefs): Fix address comparison to avoid signed overflow.
1359 (find_section): New function, broken out of ...
1360 (dwfl_module_relocate_address): ... here, call it.
1361 (check_module): New function, broken out of ...
1362 (dwfl_module_relocate_address): ... here, call it.
1363 (dwfl_module_address_section): New function.
1364 * libdwfl.h: Declare it.
1365
Ulrich Drepperc07fbb32007-03-30 19:14:59 +000013662007-03-26 Roland McGrath <roland@redhat.com>
1367
1368 * dwfl_module.c (__libdwfl_module_free): Free MOD itself.
1369
13702007-03-18 Roland McGrath <roland@redhat.com>
1371
1372 * dwfl_module_getdwarf.c (find_debuglink): New function, broken out of
1373 (find_debuginfo): ... here. Call it.
1374 Don't return error for libelf errors finding .gnu_debuglink section.
1375
Ulrich Drepper6258e742007-03-13 06:22:40 +000013762007-03-12 Roland McGrath <roland@redhat.com>
1377
1378 * dwfl_module.c (dwfl_report_begin_add): New function broken out of ...
1379 (dwfl_report_begin): ... here. Call it.
1380 * libdwfl.h: Declare it.
1381 * libdwflP.h: Add INTDECL.
1382
1383 * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo.
1384
1385 * offline.c: Comment typo fix.
1386
13872007-03-04 Roland McGrath <roland@redhat.com>
1388
1389 * linux-kernel-modules.c (KERNEL_MODNAME): New macro for "kernel".
1390 (find_kernel_elf): New function, broken out of ...
1391 (report_kernel): ... here. Call it.
1392 (dwfl_linux_kernel_find_elf): Use it for module named KERNEL_MODNAME.
1393 (intuit_kernel_bounds): New function, grovel /proc/kallsyms to guess
1394 virtual address bounds of kernel from symbols rounded to page size.
1395 (dwfl_linux_kernel_report_kernel): Use that if it works, before
1396 resorting to report_kernel.
1397
1398 * dwfl_module_getdwarf.c (open_elf): Set MOD->e_type to ET_DYN for an
1399 ET_EXEC file with nonzero bias.
1400
1401 * dwfl_module_addrname.c (dwfl_module_addrname): Just call
1402 dwfl_module_addrsym. Guts moved to ...
1403 * dwfl_module_addrsym.c: ... here; new file.
1404 * Makefile.am (libdwfl_a_SOURCES): Add it.
1405 * libdwfl.h: Declare dwfl_module_addrsym.
1406 * libdwflP.h: Add INTDECL.
1407
14082007-03-03 Roland McGrath <roland@redhat.com>
1409
1410 * dwfl_module.c (free_file): New function, broken out of ...
1411 (__libdwfl_module_free): ... here. In it, close fd after elf_end.
1412
1413 * dwfl_module_getdwarf.c (open_elf): Close fd and reset to -1
1414 on libelf failure.
1415
14162007-03-02 Roland McGrath <roland@redhat.com>
1417
1418 * linux-kernel-modules.c: Fix bogus error test for asprintf call.
1419
Ulrich Drepperaa915fd2007-02-05 07:25:33 +000014202007-02-02 Roland McGrath <roland@redhat.com>
1421
1422 * dwfl_addrmodule.c (dwfl_addrmodule): Match a module's high boundary
1423 address exactly if it's no other module's low boundary.
1424
1425 * dwfl_module_addrname.c (dwfl_module_addrname): If no symbol's value
1426 and size cover the address, select the closest symbol with st_size==0
1427 that lies in the same section.
1428
14292007-01-29 Roland McGrath <roland@redhat.com>
1430
1431 * dwfl_version.c (dwfl_version): Return PACKAGE_VERSION,
1432 not PACKAGE_STRING.
1433
14342007-01-20 Roland McGrath <roland@redhat.com>
1435
1436 * relocate.c (__libdwfl_relocate_value): Treat section_address of -1
1437 as omitted, not 0.
1438 * libdwfl.h (Dwfl_Callbacks): Update comment.
1439 * derelocate.c (cache_sections): Don't ignore sh_addr == 0 sections.
1440 * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
1441 For ignored missing section, use -1 instead of 0.
1442 * offline.c (dwfl_offline_section_address): Expect a call for 0.
1443
14442007-01-19 Roland McGrath <roland@redhat.com>
1445
1446 * argp-std.c (parse_opt): For -e, reset DWFL->offline_next_address to
1447 zero so a lone -e foo.so is shown without address bias.
1448
Roland McGrathba949b32007-01-10 20:44:29 +000014492007-01-10 Roland McGrath <roland@redhat.com>
1450
Roland McGrath44865b92007-01-11 05:06:16 +00001451 * linux-kernel-modules.c (report_kernel): Check asprintf return value
1452 directly instead of via side effect, to silence warn_unused_result.
1453 (dwfl_linux_kernel_report_offline): Likewise.
1454 (dwfl_linux_kernel_find_elf): Likewise.
1455 (dwfl_linux_kernel_module_section_address): Likewise.
1456 * find-debuginfo.c (try_open): Likewise.
Roland McGrathd39384c2007-01-11 05:15:56 +00001457 * linux-proc-maps.c (find_sysinfo_ehdr): Likewise.
1458 (dwfl_linux_proc_report): Likewise.
Roland McGrath44865b92007-01-11 05:06:16 +00001459
Roland McGrathba949b32007-01-10 20:44:29 +00001460 * libdwfl.h (dwfl_begin): Require nonnull argument.
1461
Roland McGrath70008802006-12-29 20:44:16 +000014622006-12-27 Roland McGrath <roland@redhat.com>
Ulrich Dreppera33c3012006-12-29 20:36:38 +00001463
Roland McGrath70008802006-12-29 20:44:16 +00001464 * dwfl_module.c (compare_modules): Fix address comparison to avoid
1465 signed overflow. Patch by Frank Ch. Eigler <fche@redhat.com>.
Ulrich Dreppera33c3012006-12-29 20:36:38 +00001466
Roland McGrath8190db62006-12-17 23:56:51 +000014672006-10-30 Roland McGrath <roland@redhat.com>
1468
1469 * dwfl_module.c (dwfl_report_module): Comment typo fix.
1470
Roland McGrathc373d852006-10-10 00:25:21 +000014712006-09-05 Roland McGrath <roland@redhat.com>
1472
1473 * derelocate.c (cache_sections): Use alloca instead of variable-sized
Roland McGrath3c84db32009-06-24 17:41:40 -07001474 auto array, in function already using alloca.
Roland McGrathc373d852006-10-10 00:25:21 +00001475
Roland McGratha1cee072006-08-15 01:37:23 +000014762006-08-14 Roland McGrath <roland@redhat.com>
1477
1478 * linux-kernel-modules.c (try_kernel_name): If the call to
1479 dwfl_standard_find_debuginfo produces no results, try it again
1480 with NULL as DEBUGLINK_FILE to try *FNAME with .debug suffix.
1481
1482 * find-debuginfo.c (DEFAULT_DEBUGINFO_PATH): Macro moved ...
1483 * libdwflP.h: ... to here.
1484 * linux-kernel-modules.c (try_kernel_name): Skip manual open if it
1485 repeats the first thing dwfl_standard_find_debuginfo will try.
1486
1487 * linux-kernel-modules.c (MODULE_SECT_NAME_LEN): New macro.
1488 (dwfl_linux_kernel_module_section_address): If a /sys file is missing
1489 and the section name is >= MODULE_SECT_NAME_LEN, try truncating the
1490 section name.
1491
Ulrich Drepper077c65f2006-07-12 19:54:51 +000014922006-07-12 Ulrich Drepper <drepper@redhat.com>
1493
1494 * cu.c: Adjust for internal_function_def removal.
1495 * dwfl_error.c: Likewise.
1496 * dwfl_module.c: Likewise.
1497 * dwfl_module_getdwarf.c: Likewise.
1498 * lines.c: Likewise.
1499 * relocate.c: Likewise.
1500
Ulrich Drepperc87b6e72006-07-11 22:32:28 +000015012006-07-11 Ulrich Drepper <drepper@redhat.com>
1502
1503 * dwfl_module.c (compare_modules): Don't return GElf_Sxword value,
1504 it can overflow the return value type.
1505 Patch by Tim Moore <timoore@redhat.com>.
1506
Ulrich Dreppere1812e12006-07-12 07:46:03 +000015072006-06-28 Roland McGrath <roland@redhat.com>
1508
1509 * libdwfl.h: Cosmetic changes.
1510
1511 * dwfl_line_comp_dir.c: New file.
1512 * Makefile.am (libdwfl_a_SOURCES): Add it.
1513 * libdwfl.h: Declare dwfl_line_comp_dir.
1514
1515 * dwfl_lineinfo.c (dwfl_lineinfo): Remove stray extern in defn.
1516
1517 * dwfl_linecu.c: New file.
1518 * Makefile.am (libdwfl_a_SOURCES): Add it.
1519 * libdwfl.h: Declare dwfl_linecu.
1520
1521 * libdwflP.h (dwfl_linecu_inline): Function renamed from dwfl_linecu.
1522 (dwfl_linecu): Define as macro.
1523
1524 * relocate.c (__libdwfl_relocate): Use dwfl_module_getsym.
1525
1526 * dwfl_module_getdwarf.c (dwfl_module_getsymtab): New function.
1527 (dwfl_module_addrname): Function moved ...
1528 * dwfl_module_addrname.c: ... here, new file.
1529 * dwfl_module_getsym.c: New file.
1530 * Makefile.am (libdwfl_a_SOURCES): Add them.
1531 * libdwfl.h: Declare dwfl_module_getsymtab, dwfl_module_getsym.
1532 * libdwflP.h: Add INTDECLs.
1533
15342006-06-27 Roland McGrath <roland@redhat.com>
1535
1536 * dwfl_module.c (dwfl_report_end): Whitespace fix.
1537
Ulrich Drepperd5a75192006-06-15 03:07:46 +000015382006-06-13 Roland McGrath <roland@redhat.com>
1539
1540 * elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo.
1541 Use __libdwfl_seterrno for elf_memory failure.
1542
Ulrich Dreppere1812e12006-07-12 07:46:03 +000015432006-05-22 Roland McGrath <roland@redhat.com>
1544
1545 * dwfl_module_return_value_location.c
1546 (dwfl_module_return_value_location): Use __libdwfl_module_getebl.
1547
Ulrich Drepper41cbd762006-05-27 18:19:23 +000015482006-05-27 Ulrich Drepper <drepper@redhat.com>
1549
1550 * libdwfl.h: Add extern "C".
1551
Ulrich Dreppere7a73172006-05-22 18:16:45 +000015522006-05-22 Ulrich Drepper <drepper@redhat.com>
1553
1554 * cu.c (addrarange): Handle files without aranges information.
1555
Ulrich Dreppera1690682006-05-17 05:28:36 +000015562006-05-16 Ulrich Drepper <drepper@redhat.com>
1557
1558 * dwfl_addrmodule.c (dwfl_addrmodule): Also return NULL of
1559 ->modules is NULL.
1560
Roland McGrath687d7e92006-02-27 04:53:00 +000015612006-02-26 Roland McGrath <roland@redhat.com>
1562
Roland McGrath08333122006-02-27 04:54:26 +00001563 * dwfl_version.c: New file.
1564 * Makefile.am (libdwfl_a_SOURCES): Add it.
1565 * libdwfl.h: Declare dwfl_version.
1566
Roland McGrath687d7e92006-02-27 04:53:00 +00001567 * offline.c (dwfl_report_offline): Account for dwfl_report_elf having
1568 aligned up from DWFL->offline_next_address when checking for overlap.
1569
Roland McGrathfceb7b42005-12-23 01:45:21 +000015702005-12-22 Roland McGrath <roland@redhat.com>
1571
Roland McGrath1656bc02005-12-23 01:49:50 +00001572 * argp-std.c (parse_opt): Call dwfl_end in failure cases.
1573
1574 * linux-proc-maps.c (proc_maps_report): New function, broken out of ...
1575 (dwfl_linux_proc_report): ... here. Call it.
1576 (dwfl_linux_proc_maps_report): New function.
1577 * libdwfl.h: Declare it.
1578 * libdwflP.h: Add INTDECL.
1579 * argp-std.c (options, parse_opt): Grok -M/--linux-process-map.
1580
Roland McGrathfceb7b42005-12-23 01:45:21 +00001581 * dwfl_nextcu.c (dwfl_nextcu): Don't fail when dwfl_module_getdwarf
1582 failed with DWFL_E_NO_DWARF.
1583
Roland McGrath994b4892005-12-05 22:46:21 +000015842005-11-26 Roland McGrath <roland@redhat.com>
1585
1586 * dwfl_end.c (dwfl_end): Free the DWFL itself.
1587
15882005-11-25 Roland McGrath <roland@redhat.com>
1589
1590 * dwfl_module_getdwarf.c (__libdwfl_module_getebl): New function.
1591 (load_dw): Use it.
1592 * dwfl_module_register_names.c (dwfl_module_register_names): Likewise.
1593 * libdwflP.h: Declare it.
1594
1595 * dwfl_module_register_names.c: New file.
1596 * Makefile.am (libdwfl_a_SOURCES): Add it.
1597 * libdwfl.h: Declare dwfl_module_register_names.
1598
Roland McGratha5640892005-11-26 00:38:14 +000015992005-11-21 Roland McGrath <roland@redhat.com>
1600
1601 * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
1602 Don't leak malloc'd file name.
1603 If a /sys/.../sections file is missing and starts with ".init",
1604 try the variant with "_init" too; catches PPC64 kernel braindamage.
1605
Roland McGrathe47ab762005-11-17 03:16:00 +000016062005-11-15 Roland McGrath <roland@redhat.com>
1607
1608 * libdwfl.h: Comment fixes.
1609
1610 * dwfl_module_return_value_location.c: Add unlikely for error case.
1611
16122005-11-13 Roland McGrath <roland@redhat.com>
1613
1614 * dwfl_return_value_location.c: New file.
1615 * Makefile.am (libdwfl_a_SOURCES): Add it.
1616 * libdwfl.h: Declare dwfl_module_return_value_location.
1617 * libdwflP.h (DWFL_ERRORS): Add DWFL_E_WEIRD_TYPE.
1618
Roland McGrath07d4f2f2005-10-28 06:56:24 +000016192005-10-20 Roland McGrath <roland@redhat.com>
1620
1621 * libdwflP.h (DWFL_ERRORS): New error UNKNOWN_MACHINE.
1622 * relocate.c (__libdwfl_relocate): Return DWFL_E_UNKNOWN_MACHINE
1623 instead of DWFL_E_BADRELTYPE if ebl_get_elfmachine yields EM_NONE.
1624
16252005-10-01 Roland McGrath <roland@redhat.com>
1626
1627 * linux-kernel-modules.c (report_kernel): Return ENOENT if we fail
1628 with errno 0.
1629
16302005-09-19 Roland McGrath <roland@redhat.com>
1631
1632 * linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use
1633 PRIx64 instead of PRIi64, lest addresses with high bits set overflow
1634 the signed integer reading; they will just have to be in hexadecimal.
1635 (dwfl_linux_kernel_module_section_address): Likewise.
1636
Ulrich Drepperfbe998a2005-08-29 16:27:10 +000016372005-08-28 Ulrich Drepper <drepper@redhat.com>
1638
1639 * Makefile.am (%.os): Use COMPILE.os.
1640 (COMPILE.os): Filter out gconv options.
1641
Roland McGrath995f92d2005-08-26 05:55:04 +000016422005-08-25 Roland McGrath <roland@redhat.com>
1643
1644 * cu.c (__libdwfl_nextcu): Return success when dwarf_nextcu hits end.
1645 * dwfl_nextcu.c (dwfl_nextcu): Skip modules with no dwarf info.
1646
Roland McGrath80e43a72005-08-24 21:12:15 +000016472005-08-24 Roland McGrath <roland@redhat.com>
1648
Roland McGrathefb5caa2005-08-25 01:49:53 +00001649 * dwfl_lineinfo.c (dwfl_lineinfo): Add bias, don't subtract it.
1650
Roland McGrath80e43a72005-08-24 21:12:15 +00001651 * argp-std.c [_MUDFLAP] (__libdwfl_argp_mudflap_options): New function,
1652 magic initializer to set -heur-stack-bound option.
1653
Roland McGrath3712b282005-08-23 05:58:42 +000016542005-08-22 Roland McGrath <roland@redhat.com>
1655
Roland McGrathd17fac72005-08-23 08:20:21 +00001656 * dwfl_validate_address.c: New file.
1657 * Makefile.am (libdwfl_a_SOURCES): Add it.
1658 * libdwfl.h: Declare dwfl_validate_address.
1659
1660 * derelocate.c (dwfl_module_relocate_address): Add INTDEF.
1661 * libdwflP.h: Add INTDECL.
1662
Roland McGrath3712b282005-08-23 05:58:42 +00001663 * dwfl_module_getdwarf.c (find_symtab): Use elf_getdata instead of
1664 elf_rawdata for symbol-related sections.
1665
Roland McGrathd17fac72005-08-23 08:20:21 +00001666 * offline.c (dwfl_report_offline): Move offline_next_address outside
1667 module's range, in case it's an ET_EXEC using fixed segment locations.
1668 * libdwfl.h: Update comment.
1669
1670 * dwfl_report_elf.c (dwfl_report_elf): Align BASE to first segment's
1671 required alignment.
1672
16732005-08-20 Roland McGrath <roland@redhat.com>
1674
1675 * linux-kernel-modules.c (report_kernel): Take new argument PREDICATE,
1676 function to choose whether to report.
1677 (dwfl_linux_kernel_report_offline): Likewise.
1678 * libdwfl.h: Update decl.
1679 * argp-std.c (parse_opt): Update caller.
1680
1681 * dwfl_getsrclines.c: New file.
1682 * dwfl_onesrcline.c: New file.
1683 * Makefile.am (libdwfl_a_SOURCES): Add them.
1684 * libdwfl.h: Declare dwfl_getsrclines, dwfl_onesrcline.
1685
1686 * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't leak
1687 MODULESDIR[0]. Call fts_close on failure.
1688
1689 * dwfl_module_getdwarf.c (load_dw): Take dwfl_file * instead of Elf *.
1690 Close ET_REL file descriptors after relocation.
1691 (find_dw): Update caller.
1692 * offline.c (dwfl_report_offline): Get the file into memory and close
1693 the file descriptor.
1694
1695 * dwfl_module_getdwarf.c (find_debuginfo): Do nothing when
1696 MOD->debug.elf is already set.
1697
1698 * find-debuginfo.c (try_open): Use TEMP_FAILURE_RETRY.
1699 (dwfl_standard_find_debuginfo): Fail on errors not ENOENT or ENOTDIR.
1700
1701 * argp-std.c (options, parse_opt): Grok -K/--offline-kernel, use
1702 dwfl_linux_kernel_report_offline with offline_callbacks.
1703
1704 * linux-kernel-modules.c (report_kernel): New function, broken out of
1705 ...
1706 (dwfl_linux_kernel_report_kernel): ... here. Use it.
1707 (dwfl_linux_kernel_report_offline): New function.
1708 * libdwfl.h: Declare it.
1709 * libdwflP.h: Add INTDECL.
1710
17112005-08-19 Roland McGrath <roland@redhat.com>
1712
1713 Use standard debuginfo search path to look for vmlinux.
1714 * find-debuginfo.c (dwfl_standard_find_debuginfo): Don't check CRC if
1715 passed zero.
1716 * linux-kernel-modules.c (try_kernel_name): New function, broken out
1717 of ...
1718 (dwfl_linux_kernel_report_kernel): ... here. Use it.
1719
1720 * argp-std.c (offline_callbacks): New variable.
1721 (parse_opt): Use it for -e. Allow multiple -e options.
1722
1723 * offline.c: New file.
1724 * Makefile.am (libdwfl_a_SOURCES): Add it.
1725 * libdwfl.h: Declare dwfl_offline_section_address, dwfl_report_offline.
1726 * libdwflP.h: Add INTDECLs.
1727 (OFFLINE_REDZONE): New macro.
1728 (struct Dwfl): New member `offline_next_address'.
1729 * dwfl_begin.c (dwfl_begin): Initialize it.
1730 * dwfl_module.c (dwfl_report_begin): Likewise.
1731
1732 * dwfl_report_elf.c (dwfl_report_elf): Accept all types. When ET_REL,
1733 do a nominal absolute section layout starting at BASE.
1734 * libdwfl.h: Update comment.
1735
17362005-08-18 Roland McGrath <roland@redhat.com>
1737
1738 * dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Do
1739 dwfl_module_getdwarf if necessary.
1740
1741 * dwfl_report_elf.c (dwfl_report_elf): Permit ET_REL with BASE==0.
1742 * libdwfl.h: Update comment.
1743
1744 * derelocate.c: New file.
1745 * Makefile.am (libdwfl_a_SOURCES): Add it.
1746
1747 * libdwflP.h (struct Dwfl_Module): isrel -> e_type.
1748 * dwfl_report_elf.c (dwfl_report_elf): Initialize it.
1749 * dwfl_module_getdwarf.c (open_elf): Update initialization.
1750 (load_dw, dwfl_module_addrname): Update uses.
1751 * relocate.c (__libdwfl_relocate): Likewise.
1752
17532005-08-04 Roland McGrath <roland@redhat.com>
1754
1755 * libdwfl.h (Dwfl_Callbacks.section_address): Take additional
1756 arguments SHNDX, SHDR.
1757 (dwfl_linux_kernel_module_section_address): Update prototype.
1758 * relocate.c (__libdwfl_relocate_value): Update caller.
1759 * linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
1760 Take the new arguments.
1761
Roland McGrathd2c59962005-08-10 22:13:57 +000017622005-08-10 Roland McGrath <roland@redhat.com>
1763
1764 * relocate.c (__libdwfl_relocate): Take argument DEBUGFILE,
1765 use it instead of MOD->debug.file.
1766 * libdwflP.h: Update decl.
1767 * dwfl_module_getdwarf.c (load_dw): Update caller.
1768 Fixes bug #165598.
1769
Roland McGrath4959bf82005-08-09 10:31:08 +000017702005-08-09 Roland McGrath <roland@redhat.com>
1771
1772 * libdwflP.h: Include ../libdw/libdwP.h for its INTDECLs.
1773 * cu.c: Use INTUSE on dwarf_* calls.
1774 * dwfl_error.c: Likewise.
1775 * dwfl_module.c: Likewise.
1776 * dwfl_module_getdwarf.c: Likewise.
1777 * dwfl_module_getsrc_file.c: Likewise.
1778 * lines.c: Likewise.
1779
Roland McGrath5678f872005-08-07 21:42:56 +000017802005-08-07 Roland McGrath <roland@redhat.com>
1781
1782 * linux-kernel-modules.c (dwfl_linux_kernel_find_elf): When module
1783 names contain '_' or '-', look for files named either "foo-bar.ko"
1784 or "foo_bar.ko".
1785
Roland McGrath83fcb482005-08-02 00:58:33 +000017862005-07-29 Roland McGrath <roland@redhat.com>
1787
1788 * loc2c.c: File removed.
1789 * loc2c.h: File removed.
1790 * loc2c-runtime.h: File removed.
1791 * test2.c: File removed.
1792 * Makefile.am (EXTRA_DIST): Variable removed.
1793 (noinst_HEADERS): Remove loc2c.h from here.
1794
Ulrich Drepper18618fd2005-07-28 21:29:22 +000017952005-07-28 Ulrich Drepper <drepper@redhat.com>
1796
Ulrich Drepper4d527362005-07-28 22:32:58 +00001797 * libdwfl.h: Add a few missing extern for function prototypes.
1798
Ulrich Drepper18618fd2005-07-28 21:29:22 +00001799 * libdwfl_crc32.c: New file.
1800 * libdwfl_crc32_file.c: New file.
1801 * libdwflP.h: Declare the new functions.
1802 * Makefile.am (libdwfl_a_SOURCES): Add libdwfl_crc32.c and
1803 libdwfl_crc32_file.c.
1804 * libdwfl/find-debuginfo.c (check_crc): Use __libdwfl_crc32_file
1805 instead of crc32_file.
1806
Roland McGrathd89bbe42005-07-28 07:08:01 +000018072005-07-28 Roland McGrath <roland@redhat.com>
1808
Roland McGrath244501f2005-07-28 09:15:47 +00001809 * ptest.c: Moved to ../tests/dwflmodtest.c.
1810
Roland McGrath18385902005-07-28 07:12:38 +00001811 * Makefile.am (noinst_PROGRAMS): Variable removed.
1812 (libdwfl_so_SOURCES, libdwfl_LIBS, libdwfl_so_LDADD): Likewise.
1813 (EXTRA_DIST, ptest_LDADD, test2_LDADD): Likewise.
1814 (libdwfl): Don't use libdwfl.so any more.
1815 (libdwfl.so, install, uninstall): Targets removed.
1816 (test2_SOURCES): Define EXTRA_DIST instead of this.
1817 * libdwfl.map: File removed.
1818
Roland McGrathd89bbe42005-07-28 07:08:01 +00001819 * libdwfl.h: Use "" for libdw.h #include.
1820
Roland McGrath5bab2442005-07-28 00:44:29 +000018212005-07-27 Roland McGrath <roland@redhat.com>
1822
1823 * libdwfl.map: Add dwfl_getmodules.
1824
Ulrich Drepperb08d5a82005-07-26 05:00:05 +000018252005-07-23 Ulrich Drepper <drepper@redhat.com>
1826
1827 * Makefile.am: Fix rules to allow building with mudflap.
1828
18292005-07-21 Roland McGrath <roland@redhat.com>
1830
1831 * Makefile.am (noinst_HEADERS): Add loc2c.c.
1832
1833 * test2.c (main): Check sscanf result to quiet warning.
1834
18352005-07-20 Roland McGrath <roland@redhat.com>
1836
1837 * libdwfl-branch merged, creating this direcotry.