Home | History | Annotate | Download | only in libdwfl
      1 2011-12-02  Roland McGrath  <roland (a] hack.frob.com>
      2 
      3 	* elf-from-memory.c (elf_from_remote_memory): Fix ELFCLASS64 case
      4 	to use elf64_xlatetom and PHDRS.p64.
      5 	Reported by Serge Pavlov <serge.pavlov.at.gnu (a] gmail.com>.
      6 
      7 2011-11-31  Mark Wielaard  <mjw (a] redhat.com>
      8 
      9 	* dwfl_module_addrsym.c (dwfl_module_addrsym): First search all
     10 	global symbols. Then only when that doesn't provide a match search
     11 	all local symbols too.
     12 	* dwfl_module_getdwarf.c (load_symtab): Take first_global int arg
     13 	and fill it in.
     14 	(find_symtab): Initialize mod->first_global and pass it to load_symtab.
     15 	* libdwfl/libdwflP.h (Dwfl_Module): Add first_global field.
     16 
     17 2011-11-31  Mark Wielaard  <mjw (a] redhat.com>
     18 
     19 	* dwfl_module_addrsym.c (dwfl_module_addrsym): Only update
     20 	sizeless_sym if needed and closer to desired addr.
     21 
     22 2011-10-20  Mark Wielaard  <mjw (a] redhat.com>
     23 
     24 	* derelocate.c (cache_sections): Intern mod->reloc_info check.
     25 	(dwfl_module_relocations): Don't check mod->reloc_info.
     26 	(dwfl_module_relocation_info): Likewise.
     27 	(find_section): Likewise.
     28 
     29 2011-07-09  Roland McGrath  <roland (a] hack.frob.com>
     30 
     31 	* image-header.c (LE32): Macro removed (now in lib/system.h).
     32 
     33 2011-04-11  Mark Wielaard  <mjw (a] redhat.com>
     34 
     35 	* linux-kernel-modules.c (vmlinux_suffixes): Guard definition
     36 	by check for zlib, bzlib or lzma defines to check it isn't empty.
     37 	(try_kernel_name): Use same guard for use of vmlinux_suffixes.
     38 
     39 2011-03-08  Roland McGrath  <roland (a] redhat.com>
     40 
     41 	* dwfl_module_getdwarf.c (open_elf): Clear errno before CBFAIL.
     42 	Reported by Kurt Roeckx <kurt (a] roeckx.be>.
     43 
     44 2011-02-11  Roland McGrath  <roland (a] redhat.com>
     45 
     46 	* linux-kernel-modules.c (try_kernel_name): Try .gz, .bz2, .xz
     47 	suffixes if corresponding decompression support is enabled.
     48 
     49 2011-02-01  Roland McGrath  <roland (a] redhat.com>
     50 
     51 	* dwfl_module_getdwarf.c (find_prelink_address_sync): Use the
     52 	section-end address as the synchronization point, rather than sh_addr.
     53 
     54 	* dwfl_module_getdwarf.c (find_prelink_address_sync): Discover
     55 	PT_INTERP p_vaddr separately from main phdrs and undo phdrs.
     56 
     57 	* dwfl_module_getdwarf.c (find_prelink_address_sync): Fix pasto in
     58 	last change, so we recognize PT_INTERP in ELFCLASS64 correctly.
     59 
     60 2011-01-11  Roland McGrath  <roland (a] redhat.com>
     61 
     62 	* dwfl_module_getdwarf.c (open_elf): Remove section-based
     63 	address_sync fixup from here.
     64 	(find_prelink_address_sync): New function.
     65 	(find_debuginfo): Call it.
     66 	* libdwflP.h (DWFL_ERRORS): Add BAD_PRELINK error.
     67 
     68 2011-01-04  Roland McGrath  <roland (a] redhat.com>
     69 
     70 	* dwfl_module_getdwarf.c (open_elf): Enhance address_sync calculation
     71 	logic to consider section addresses, the better to survive all the
     72 	possible prelink machinations.
     73 	* libdwflP.h (struct dwfl_file): Comment change.
     74 
     75 2010-11-30  Roland McGrath  <roland (a] redhat.com>
     76 
     77 	* derelocate.c (dwfl_module_relocations): Remove over-eager assert.
     78 
     79 2010-11-12  Roland McGrath  <roland (a] redhat.com>
     80 
     81 	* libdwflP.h (struct Dwfl_Module): New member main_bias.
     82 	(dwfl_adjusted_address, dwfl_deadjust_address): Use it.
     83 	* dwfl_module_getdwarf.c (__libdwfl_getelf): Initialize it.
     84 
     85 	* libdwflP.h (dwfl_deadjust_address): New function.
     86 	(dwfl_deadjust_dwarf_addr, dwfl_deadjust_st_value): New functions.
     87 	* cu.c (addrarange): Use dwfl_deadjust_dwarf_addr.
     88 	* dwfl_module_addrsym.c: Use dwfl_deadjust_st_value.
     89 
     90 2010-11-11  Roland McGrath  <roland (a] redhat.com>
     91 
     92 	* libdwflP.h (struct dwfl_file): Remove bias member.
     93 	Add vaddr and address_sync members instead.
     94 	(dwfl_adjusted_address): Calculate using vaddr.
     95 	(dwfl_adjusted_dwarf_addr): Calculate using address_sync and call that.
     96 	(dwfl_adjusted_st_value): Use one of those calls.
     97 	* dwfl_module_getdwarf.c (open_elf): Initialize vaddr and address_sync.
     98 	* dwfl_segment_report_module.c (dwfl_segment_report_module): Likewise.
     99 	* derelocate.c (dwfl_module_relocations): Update ET_EXEC assertions.
    100 	* link_map.c (consider_executable): Adjust only MOD->low_addr for
    101 	detected PIE bias change.
    102 
    103 	* libdwflP.h (dwfl_adjusted_dwarf_addr): New function.
    104 	* dwfl_module_info.c: Use it.
    105 	* cu.c (addrarange): Likewise.
    106 	* dwfl_dwarf_line.c: Likewise.
    107 	* dwfl_module_dwarf_cfi.c: Likewise.
    108 	* dwfl_lineinfo.c: Likewise.
    109 	* dwfl_nextcu.c: Likewise.
    110 	* dwfl_module_getdwarf.c (dwfl_module_getdwarf): Likewise.
    111 
    112 	* libdwflP.h (dwfl_adjusted_st_value): New function.
    113 	* relocate.c (resolve_symbol): Use it.
    114 	* dwfl_module_getsym.c: Likewise.
    115 	* dwfl_module_addrsym.c: Likewise.
    116 	* dwfl_module_info.c: Likewise.
    117 
    118 	* libdwflP.h (dwfl_adjusted_address): New function.
    119 	* dwfl_module_build_id.c (__libdwfl_find_build_id): Use it.
    120 	* relocate.c (__libdwfl_relocate_value): Likewise.
    121 	* derelocate.c (cache_sections): Likewise.
    122 	(dwfl_module_address_section): Likewise.
    123 	* dwfl_module_getelf.c: Likewise.
    124 	* dwfl_module_eh_cfi.c: Likewise.
    125 	* link_map.c (consider_executable): Likewise.
    126 
    127 2010-08-24  Roland McGrath  <roland (a] redhat.com>
    128 
    129 	* dwfl_dwarf_line.c: New file.
    130 	* Makefile.am (libdwfl_a_SOURCES): Add it.
    131 
    132 2010-08-18  Roland McGrath  <roland (a] redhat.com>
    133 
    134 	* link_map.c (report_r_debug): Use found name if we have no name,
    135 	even if we already have an Elf handle.
    136 
    137 2010-06-30  Roland McGrath  <roland (a] redhat.com>
    138 
    139 	* linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't be
    140 	confused by -1 return from dwfl_build_id_find_elf after it opened
    141 	the Elf handle.
    142 	* find-debuginfo.c (dwfl_standard_find_debuginfo): Likewise for
    143 	dwfl_build_id_find_debuginfo.
    144 
    145 2010-06-16  Roland McGrath  <roland (a] redhat.com>
    146 
    147 	* cu.c (cudie_offset): Use DIE_OFFSET_FROM_CU_OFFSET macro.
    148 
    149 2010-06-14  Roland McGrath  <roland (a] redhat.com>
    150 
    151 	* find-debuginfo.c (try_open): Take new arg MAIN_STAT.  Compare
    152 	candidate file to that st_dev/st_ino and pretend it didn't exist
    153 	if they match.
    154 	(find_debuginfo_in_path): Update caller, pass main file's info.
    155 
    156 2010-05-20  Roland McGrath  <roland (a] redhat.com>
    157 
    158 	* linux-proc-maps.c (find_sysinfo_ehdr): Renamed to ...
    159 	(grovel_auxv): ... this.  Take DWFL argument.
    160 	(dwfl_linux_proc_report): Update caller.
    161 
    162 	* dwfl_module_getdwarf.c (open_elf): Calculate alignment for bias
    163 	based on dwfl->segment_align or manifest alignment of MOD->low_addr.
    164 
    165 2010-05-19  Roland McGrath  <roland (a] redhat.com>
    166 
    167 	* linux-kernel-modules.c (intuit_kernel_bounds): Rewritten.
    168 
    169 2010-05-06  Roland McGrath  <roland (a] redhat.com>
    170 
    171 	* segment.c (insert): Clear inserted elements of DWFL->lookup_module.
    172 
    173 	* libdwflP.h (DWFL_ERRORS): Add WRONG_ID_ELF.
    174 	* dwfl_build_id_find_elf.c: Set MOD->main.valid when there is a build
    175 	ID but we didn't find a file.
    176 	* dwfl_module_getdwarf.c (__libdwfl_getelf): When that's set, check
    177 	and refuse any fallback file-by-name if it lacks the matching ID.
    178 
    179 	* dwfl_error.c (dwfl_errno): Add INTDEF.
    180 	* libdwflP.h: Add INTDECL.
    181 
    182 	* dwfl_module_getdwarf.c (open_elf): Do elf_end and clear FILE->elf in
    183 	failure cases.
    184 
    185 2010-05-04  Roland McGrath  <roland (a] redhat.com>
    186 
    187 	* dwfl_segment_report_module.c: Use "[pie]" rather than "[dso]" for an
    188 	ET_DYN that has a DT_DEBUG.
    189 
    190 	* dwfl_segment_report_module.c: Fix jump-start of NDX-finding loop.
    191 
    192 	* segment.c (insert): Fix moving of values following insertion.
    193 	(reify_segments): Fix up MOD->segment backpointer indices after
    194 	later insertions in the main loop invalidate them.
    195 
    196 	* link_map.c (dwfl_link_map_report): Detect bias of embedded phdrs and
    197 	apply it to PT_DYNAMIC p_vaddr so we handle a PIE correctly.
    198 
    199 	* core-file.c (dwfl_core_file_report): Return any nonzero count of
    200 	modules reported, even if link_map grovelling failed and only sniffing
    201 	found anything.
    202 
    203 2010-04-26  Roland McGrath  <roland (a] redhat.com>
    204 
    205 	* relocate.c (relocate_section): Treat R_*_NONE reloc as no reloc.
    206 	Works around probably-wrong ld -r behavior for case of a DWARF address
    207 	constant that refers to a discarded SHF_ALLOC section.
    208 
    209 2010-04-14  Roland McGrath  <roland (a] redhat.com>
    210 
    211 	* link_map.c (report_r_debug): Limit iterations on the l_next chain to
    212 	an upper bound on sane possible number of elements.
    213 
    214 2010-03-11  Roland McGrath  <roland (a] redhat.com>
    215 
    216 	* link_map.c (auxv_format_probe): Fix scanning loop, so we really scan
    217 	the second half for 32-bit matches.
    218 
    219 2010-03-10  Roland McGrath  <roland (a] redhat.com>
    220 
    221 	* core-file.c (dwfl_core_file_report): Punt EHDR argument.
    222 	* argp-std.c (parse_opt): Update caller.
    223 	* libdwfl.h: Declare dwfl_core_file_report.
    224 	* libdwflP.h: Don't.
    225 
    226 2010-02-17  Roland McGrath  <roland (a] redhat.com>
    227 
    228 	* dwfl_segment_report_module.c (addr_segndx): Take new flag argument.
    229 	If set, find the first index not below ADDR.
    230 	(dwfl_segment_report_module): Update callers.
    231 	Pass true when calculating return value.
    232 
    233 2010-02-15  Roland McGrath  <roland (a] redhat.com>
    234 
    235 	* Makefile.am: Use config/eu.am for common stuff.
    236 
    237 	* find-debuginfo.c (find_debuginfo_in_path): Fix uninitialized
    238 	variable in failure path.
    239 
    240 2010-02-02  Mark Wielaard  <mjw (a] redhat.com>
    241 
    242 	* dwfl_module_dwarf_cfi.c (dwfl_module_dwarf_cfi): Always set bias.
    243 	* dwfl_module_eh_cfi.c (dwfl_module_eh_cfi): Likewise
    244 
    245 2010-01-07  Roland McGrath  <roland (a] redhat.com>
    246 
    247 	* core-file.c (dwfl_core_file_report): Use elf_getphdrnum.
    248 	* dwfl_module_build_id.c (__libdwfl_find_build_id): Likewise.
    249 	* dwfl_module_getdwarf.c (open_elf, find_dynsym): Likewise.
    250 	* dwfl_report_elf.c (__libdwfl_report_elf): Likewise.
    251 
    252 2010-01-06  Roland McGrath  <roland (a] redhat.com>
    253 
    254 	* relocate.c (relocate_getsym): For SHN_COMMON, zero st_value.
    255 	(relocate_section): Let unresolved SHN_COMMON symbol stay 0.
    256 
    257 2009-11-16  Roland McGrath  <roland (a] redhat.com>
    258 
    259 	* relocate.c (relocate_section): Skip SHT_NOBITS or empty target scn.
    260 
    261 2009-11-12  Petr Machata  <pmachata (a] redhat.com>
    262 
    263 	* core-file.c (dwfl_elf_phdr_memory_callback): Only load ahead if
    264 	the chunk is both offset-contiguous and vaddr-contiguous.
    265 
    266 2009-11-05  Roland McGrath  <roland (a] redhat.com>
    267 
    268 	* link_map.c (report_r_debug): Skip entries with l_ld==0.
    269 	Use dwfl_addrmodule for l_ld lookup, don't bail on lookup failure.
    270 
    271 2009-09-04  Roland McGrath  <roland (a] redhat.com>
    272 
    273 	* image-header.c (__libdw_image_header): Fix tranposed comparison.
    274 
    275 2009-08-27  Roland McGrath  <roland (a] redhat.com>
    276 
    277 	* image-header.c: New file.
    278 	* Makefile.am (libdwfl_a_SOURCES): Add it.
    279 	* libdwflP.h: Declare __libdw_image_header.
    280 	* open.c (decompress): Don't consume ELF on failure.
    281 	(what_kind): New function, broken out of ...
    282 	(__libdw_open_file): ... here.  Call it.
    283 	If it fails, try __libdw_image_header and then try what_kind again.
    284 
    285 	* gzip.c (unzip): Reuse *WHOLE as first INPUT_BUFFER,
    286 	leave it behind for next decompressor.
    287 	* open.c (decompress): Free BUFFER on failure.
    288 
    289 2009-08-26  Roland McGrath  <roland (a] redhat.com>
    290 
    291 	* gzip.c (find_zImage_payload): New function, broken out of ...
    292 	(mapped_zImage): ... here.  Call it.
    293 	(find_zImage_payload) [LZMA]: Match LZMA-compressed kernels with
    294 	stupid method of just trying the decoder.
    295 
    296 	* open.c [USE_LZMA]: Try __libdw_unlzma.
    297 	* libdwflP.h: Declare it.
    298 	(DWFL_ERRORS): Add DWFL_E_LZMA.
    299 	* gzip.c [LZMA]: Implement liblzma version for XZ file format.
    300 	* lzma.c: New file.
    301 	* Makefile.am [LZMA] (libdwfl_a_SOURCES): Add it.
    302 
    303 	* gzip.c (mapped_zImage): Limit scan to 32kb.
    304 	Make this unconditional, support bzip2 kernel images too.
    305 	(unzip): Use direct inflate method for non-mmap case too.
    306 	Only zlib uses the stream method.
    307 
    308 2009-08-09  Roland McGrath  <roland (a] redhat.com>
    309 
    310 	* dwfl_module_build_id.c: Use new macros for versioned definitions.
    311 
    312 2009-07-08  Roland McGrath  <roland (a] redhat.com>
    313 
    314 	* dwfl_module_dwarf_cfi.c: New file.
    315 	* dwfl_module_eh_cfi.c: New file.
    316 	* Makefile.am (libdwfl_a_SOURCES): Add them.
    317 	* libdwflP.h (struct Dwfl_Module): New members `dwarf_cfi', `eh_cfi.
    318 	Add INTDECL for dwfl_module_eh_cfi, dwfl_module_dwarf_cfi.
    319 
    320 2009-07-08  Roland McGrath  <roland (a] redhat.com>
    321 
    322 	* libdwflP.h (struct Dwfl_Module): Reorder members to pack better.
    323 
    324 2009-06-18  Mark Wielaard  <mjw (a] redhat.com>
    325 
    326 	* dwfl_report_elf.c (__libdwfl_report_elf): Return NULL on overlap.
    327 
    328 2009-06-13  Ulrich Drepper  <drepper (a] redhat.com>
    329 
    330 	* derelocate.c: Don't use deprecated libelf functions.
    331 	* dwfl_module_getdwarf.c: Likewise.
    332 	* relocate.c: Likewise.
    333 
    334 2009-04-23  Ulrich Drepper  <drepper (a] redhat.com>
    335 
    336 	* dwfl_module_build_id.c: Define versioned symbols only if SHARED is
    337 	defined.  Otherwise just define the latest version.
    338 
    339 2009-04-22  Roland McGrath  <roland (a] redhat.com>
    340 
    341 	* relocate.c (resolve_symbol): Apply correct bias to st_value found in
    342 	a non-ET_REL module.
    343 
    344 	* dwfl_module_build_id.c (__libdwfl_find_build_id): Fix last change to
    345 	adjust properly for non-ET_REL.
    346 
    347 2009-04-21  Roland McGrath  <roland (a] redhat.com>
    348 
    349 	* dwfl_module_getsym.c: Apply non-ET_REL bias only if SHF_ALLOC.
    350 
    351 	* relocate.c (__libdwfl_relocate_value): Assert that MOD is ET_REL.
    352 	* derelocate.c (cache_sections): Call __libdwfl_relocate_value only
    353 	for ET_REL.
    354 	* dwfl_module_build_id.c (__libdwfl_find_build_id): Likewise.
    355 
    356 2009-04-20  Roland McGrath  <roland (a] redhat.com>
    357 
    358 	* dwfl_module_getdwarf.c (__libdwfl_getelf): Add internal_function.
    359 
    360 2009-04-19  Roland McGrath  <roland (a] redhat.com>
    361 
    362 	* dwfl_module_getdwarf.c (find_file): Renamed to ...
    363 	(__libdwfl_getelf): ... this.  Make it global.
    364 	(find_symtab, find_dw): Update callers.
    365 	(dwfl_module_getelf): Functions moved ...
    366 	* dwfl_module_getelf.c: ... here, new file.
    367 	* Makefile.am (libdwfl_a_SOURCES): Add it.
    368 	* libdwflP.h: Declare __libdwfl_getelf.
    369 
    370 2009-04-14  Roland McGrath  <roland (a] redhat.com>
    371 
    372 	* dwfl_segment_report_module.c: Handle DT_STRTAB value being either
    373 	absolute (already adjusted in place) or needing load bias adjustment.
    374 
    375 	* core-file.c (dwfl_elf_phdr_memory_callback): Fix return value for
    376 	gelf_getphdr failure.  Fix file size limit checks.
    377 
    378 	* dwfl_segment_report_module.c: Fix underflow in DYNSTRSZ check.
    379 
    380 2009-04-08  Roland McGrath  <roland (a] redhat.com>
    381 
    382 	* dwfl_module_getsym.c: Don't adjust for bias again after
    383 	__libdwfl_relocate_value.
    384 
    385 	* relocate.c (__libdwfl_relocate_value): Don't adjust a value from
    386 	a non-SHF_ALLOC section.
    387 	(relocate_getsym): Test st_shndx for SHN_* values, not *SHNDX.
    388 	* dwfl_module_getsym.c (dwfl_module_getsym): Likewise.
    389 
    390 2009-03-09  Roland McGrath  <roland (a] redhat.com>
    391 
    392 	* dwfl_module_build_id.c (__libdwfl_find_build_id): Move SHSTRNDX
    393 	variable to outer scope, so we cache it for the loop.
    394 
    395 	* relocate.c (__libdwfl_relocate_value): Add MOD->main.bias to sh_addr.
    396 
    397 2009-02-12  Roland McGrath  <roland (a] redhat.com>
    398 
    399 	* dwfl_module_build_id.c (__libdwfl_find_build_id): Use
    400 	__libdwfl_relocate_value to find correct sh_addr value.
    401 
    402 2009-02-10  Roland McGrath  <roland (a] redhat.com>
    403 
    404 	* dwfl_report_elf.c (__libdwfl_report_elf): Take new arg SANITY.
    405 	If false, don't fail for NO_PHDR.
    406 	(dwfl_report_elf): Update caller.
    407 	* libdwflP.h: Update decl.
    408 	* offline.c (process_elf): Call it with false, so we don't refuse
    409 	dubiously-formed objects here.
    410 
    411 	* link_map.c (consider_executable): Don't assert dwfl_addrsegment
    412 	finds our module.  We shouldn't crash when we confuse some guesses.
    413 
    414 2009-02-10  Ulrich Drepper  <drepper (a] redhat.com>
    415 
    416 	* open.c (decompress): Avoid crash with empty input file.
    417 
    418 2009-01-27  Roland McGrath  <roland (a] redhat.com>
    419 
    420 	* dwfl_report_elf.c (__libdwfl_report_elf): Ignore trailing PT_LOAD
    421 	with zero vaddr and memsz.
    422 
    423 2009-01-22  Roland McGrath  <roland (a] redhat.com>
    424 
    425 	* open.c (decompress): Move BUFFER, SIZE decls outside #if.
    426 
    427 	* dwfl_segment_report_module.c (addr_segndx): Remove bogus adjustments
    428 	after address-matching loop.
    429 
    430 	* segment.c (lookup): Fix fencepost in checking for HINT match.
    431 
    432 2009-01-14  Roland McGrath  <roland (a] redhat.com>
    433 
    434 	* gzip.c [!BZLIB] (mapped_zImage): New function.
    435 	(unzip) [!BZLIB]: Grok Linux kernel zImage format.
    436 
    437 2009-01-10  Ulrich Drepper  <drepper (a] redhat.com>
    438 
    439 	* dwfl_error.c: Always use __thread.  Remove all !USE_TLS code.
    440 
    441 2009-01-08  Roland McGrath  <roland (a] redhat.com>
    442 
    443 	* linux-kernel-modules.c (dwfl_linux_kernel_report_offline):
    444 	Skip subdirectory named "source".
    445 	(dwfl_linux_kernel_find_elf): Likewise.
    446 
    447 2009-01-06  Roland McGrath  <roland (a] redhat.com>
    448 
    449 	* linux-kernel-modules.c (check_suffix): New function.
    450 	Match ".ko", ".ko.gz", and ".ko.bz2" suffixes.
    451 	(dwfl_linux_kernel_report_offline): Use it.
    452 	(dwfl_linux_kernel_find_elf): Likewise.
    453 
    454 2009-01-05  Roland McGrath  <roland (a] redhat.com>
    455 
    456 	* argp-std.c (parse_opt): Use __libdw_open_file for core file.
    457 	* dwfl_build_id_find_debuginfo.c: Use it to open the file.
    458 	* dwfl_build_id_find_elf.c: Likewise.
    459 	* dwfl_module_getdwarf.c (open_elf): Likewise.
    460 	* dwfl_report_elf.c: Likewise.
    461 	* find-debuginfo.c (validate): Likewise.
    462 	* offline.c (__libdwfl_report_offline): Likewise.
    463 
    464 	* libdwflP.h: Declare __libdw_open_file.
    465 	* open.c: New file.
    466 	* Makefile.am (libdwfl_a_SOURCES): Add it.
    467 
    468 	* gzip.c: New file.
    469 	* Makefile.am [ZLIB] (libdwfl_a_SOURCES): Add it.
    470 	* bzip2.c: New file.
    471 	* Makefile.am [BZLIB] (libdwfl_a_SOURCES): Add it.
    472 	* libdwflP.h: Declare __libdw_gunzip, __libdw_bunzip2.
    473 
    474 2008-12-16  Roland McGrath  <roland (a] redhat.com>
    475 
    476 	* dwfl_module_build_id.c (dwfl_module_build_id): Define with alias and
    477 	symver magic to bind to ELFUTILS_0.138.
    478 	(_BUG_COMPAT_dwfl_module_build_id): New function, bug compatible
    479 	wrapper for ELFUTILS_0.130 version set.
    480 
    481 2008-12-18  Roland McGrath  <roland (a] redhat.com>
    482 
    483 	* derelocate.c (dwfl_module_relocate_address): Fix last fix: ET_DYN
    484 	addresses are taken as relative to MOD->low_addr.
    485 
    486 2008-12-15  Roland McGrath  <roland (a] redhat.com>
    487 
    488 	* derelocate.c (dwfl_module_relocate_address): Apply main.bias, not
    489 	debug.bias.
    490 
    491 2008-12-11  Roland McGrath  <roland (a] redhat.com>
    492 
    493 	* offline.c (process_archive): Don't call elf_end and close if
    494 	returning NULL.  Check first elf_begin call and set error code
    495 	specially for empty archive.
    496 	Fixes RHBZ#465878.
    497 
    498 2008-12-02  Roland McGrath  <roland (a] redhat.com>
    499 
    500 	* dwfl_getmodules.c (dwfl_getmodules): Typo fix in last change.
    501 
    502 2008-11-26  Roland McGrath  <roland (a] redhat.com>
    503 
    504 	* dwfl_getmodules.c (dwfl_getmodules): Encode iteration style in
    505 	return value, and interpret encoded OFFSET argument.
    506 
    507 2008-10-07  Roland McGrath  <roland (a] redhat.com>
    508 
    509 	* dwfl_module_build_id.c (check_notes): Fix typo in vaddr calculation.
    510 
    511 2008-09-29  Roland McGrath  <roland (a] redhat.com>
    512 
    513 	* segment.c (insert): Must realloc DWFL->lookup_module here too.
    514 	(dwfl_report_segment): Clear DWFL->lookup_module before insert calls.
    515 
    516 2008-08-28  Roland McGrath  <roland (a] redhat.com>
    517 
    518 	* segment.c (reify_segments): Fix last change.
    519 
    520 2008-08-27  Roland McGrath  <roland (a] redhat.com>
    521 
    522 	* linux-proc-maps.c (read_proc_memory): Return 0 for EINVAL or EPERM
    523 	failure from pread64.
    524 
    525 2008-08-26  Roland McGrath  <roland (a] redhat.com>
    526 
    527 	* segment.c (reify_segments): Insert a trailing segment for a module
    528 	end that is above the highest current segment.
    529 
    530 2008-08-25  Roland McGrath  <roland (a] redhat.com>
    531 
    532 	* dwfl_module_getdwarf.c (open_elf): Extract elf_errno () for
    533 	coded return value, not plain DWFL_E_LIBELF.  Return DWFL_E_BADELF
    534 	if FILE->elf is not ELF_K_ELF.
    535 
    536 	* dwfl_segment_report_module.c: Add a cast.
    537 
    538 2008-08-21  Denys Vlasenko  <dvlasenk (a] redhat.com>
    539 
    540 	* dwfl_module_addrsym.c (dwfl_module_addrsym): Improve logic
    541 	which decides which symbol is "closest" to a given address.
    542 
    543 2008-08-15  Roland McGrath  <roland (a] redhat.com>
    544 
    545 	* argp-std.c (offline_callbacks): Use dwfl_build_id_find_elf.
    546 	(options, parse_opt): Handle --core.
    547 
    548 	* core-file.c: New file.
    549 	* Makefile.am (libdwfl_a_SOURCES): Add it.
    550 	* libdwflP.h (dwfl_core_file_report): Declare it.
    551 
    552 	* link_map.c: New file.
    553 	* Makefile.am (libdwfl_a_SOURCES): Add it.
    554 	* libdwflP.h (dwfl_link_map_report): Declare it.
    555 
    556 	* libdwflP.h (MIN, MAX): New macros.
    557 	(Dwfl_Memory_Callback): New typedef.
    558 	(Dwfl_Module_Callback): New typedef.
    559 	(dwfl_segment_report_module): Declare it.
    560 	* dwfl_segment_report_module.c: New file.
    561 	* Makefile.am (libdwfl_a_SOURCES): Add it.
    562 
    563 	* derelocate.c (dwfl_module_address_section): Add INTDEF.
    564 	* libdwflP.h: Add INTDECL.
    565 
    566 	* segment.c: New file.
    567 	* Makefile.am (libdwfl_a_SOURCES): Add it.
    568 	* libdwfl.h: Declare dwfl_addrsegment, dwfl_report_segment.
    569 	* libdwflP.h (struct Dwfl): New members lookup_elts, lookup_alloc,
    570 	lookup_addr, lookup_module, lookup_segndx, replace removed members
    571 	modules, nmodules.
    572 	(struct Dwfl_Module): New member segment.
    573 	* dwfl_end.c (dwfl_end): Free the new ones.  Iterate via modulelist
    574 	to each free module.
    575 	* dwfl_module.c (dwfl_report_begin_add): Do nothing.
    576 	(dwfl_report_begin): Don't call it.  Truncate the segment table instead.
    577 	(dwfl_report_module): Don't touch DWFL->nmodules.
    578 	(dwfl_report_end): Don't touch DWFL->modules and DWFL->nmodules.
    579 	(compare_modules): Function removed.
    580 	* dwfl_getmodules.c: Rewritten.
    581 	Add INTDEF.
    582 	* libdwflP.h: Add INTDECLs.
    583 	* dwfl_getdwarf.c: Rewritten to call dwfl_getmodules.
    584 	* dwfl_addrmodule.c: Rewritten to just call dwfl_addrsegment.
    585 
    586 2008-08-03  Roland McGrath  <roland (a] redhat.com>
    587 
    588 	* linux-kernel-modules.c: Include <fts.h> before <config.h>.
    589 
    590 2008-07-17  Roland McGrath  <roland (a] redhat.com>
    591 
    592 	* dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Set errno to
    593 	zero if the failure was only ENOENT.
    594 
    595 2008-06-03  Roland McGrath  <roland (a] redhat.com>
    596 
    597 	* dwfl_module_addrsym.c (dwfl_module_addrsym): Exclude undefined
    598 	symbols.
    599 
    600 2008-05-22  Petr Machata  <pmachata (a] redhat.com>
    601 
    602 	* dwfl_module_getdwarf.c (open_elf): Bias of ET_EXEC files is always 0.
    603 
    604 2008-05-06  Roland McGrath  <roland (a] frob.com>
    605 
    606 	* linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Use
    607 	FTS_LOGICAL here too.
    608 	(dwfl_linux_kernel_find_elf): Likewise.
    609 
    610 2008-04-29  Roland McGrath  <roland (a] redhat.com>
    611 
    612 	* find-debuginfo.c (dwfl_standard_find_debuginfo): Try path search
    613 	based on canonicalize_file_name if it differs from the supplied name.
    614 
    615 	* linux-kernel-modules.c (check_module_notes): Use FTS_LOGICAL so
    616 	we accept symlinks.
    617 
    618 2008-04-27  Roland McGrath  <roland (a] redhat.com>
    619 
    620 	* linux-kernel-modules.c (report_kernel): Fix crash when
    621 	dwfl_report_elf fails.
    622 
    623 2008-04-05  Roland McGrath  <roland (a] redhat.com>
    624 
    625 	* linux-proc-maps.c (proc_maps_report): Don't leak LAST_FILE.
    626 
    627 	* dwfl_module_getdwarf.c (find_file): Always free build_id_bits.
    628 	Clear it after freeing.
    629 	* dwfl_module_report_build_id.c (dwfl_module_report_build_id): Likewise.
    630 
    631 2008-03-26  Roland McGrath  <roland (a] redhat.com>
    632 
    633 	* dwfl_module_getdwarf.c (load_symtab): Don't return success for
    634 	SHT_DYNSYM, just set *SYMSCN like the comment says.
    635 
    636 	* dwfl_end.c (dwfl_end): Iterate on modulelist chain, not modules array.
    637 
    638 	* argp-std.c (parse_opt): On failure, call dwfl_end before argp_failure.
    639 
    640 2008-03-19  Roland McGrath  <roland (a] redhat.com>
    641 
    642 	* dwfl_module_getsrc.c: Adjust address for module bias before search.
    643 
    644 2008-03-01  Roland McGrath  <roland (a] redhat.com>
    645 
    646 	* libdwflP.h (__libdwfl_seterrno): Remove parameter name from
    647 	prototype to avoid older compiler's complaint about reuse of the name.
    648 	(__libdwfl_canon_error): Likewise.
    649 
    650 2008-02-19  Roland McGrath  <roland (a] redhat.com>
    651 
    652 	* relocate.c (relocate_section): Check for an unhandled relocation
    653 	type before resolving a reloc's symbol.  Lift DWFL_E_BADRELTYPE ->
    654 	DWFL_E_UNKNOWN_MACHINE check out of loops.
    655 
    656 	* dwfl_module_getdwarf.c (load_dw): Skip relocation if
    657 	DEBUGFILE->relocated is already set.
    658 
    659 2008-01-26  Roland McGrath  <roland (a] redhat.com>
    660 
    661 	* dwfl_module_getdwarf.c (open_elf): Open FILE->name if it's non-null.
    662 
    663 	* dwfl_build_id_find_elf.c (__libdwfl_open_by_build_id): Don't clear
    664 	incoming *FILE_NAME at the start.
    665 
    666 2008-01-08  Roland McGrath  <roland (a] redhat.com>
    667 
    668 	* Makefile.am (euinclude): Variable removed.
    669 	(pkginclude_HEADERS): Set this instead of euinclude_HEADERS.
    670 
    671 2007-10-23  Roland McGrath  <roland (a] redhat.com>
    672 
    673 	* linux-kernel-modules.c (report_kernel_archive): Reorder the kernel
    674 	module to appear first.
    675 
    676 2007-10-20  Roland McGrath  <roland (a] redhat.com>
    677 
    678 	* offline.c (process_archive_member): Take FD argument, pass it down
    679 	to process_file.  Return Elf_Cmd, not bool.
    680 	Call elf_next here, always before elf_end.
    681 	(process_archive): Update caller.  Don't close FD here unless there
    682 	are no member refs.
    683 
    684 	* dwfl_module.c (free_file): Close fd only when elf_end returns zero.
    685 
    686 	* libdwflP.h (struct dwfl_file): New bool member `relocated'.
    687 	* dwfl_module_getdwarf.c (dwfl_module_getelf): For ET_REL, apply
    688 	partial relocation to one or both files.
    689 	(dwfl_module_getdwarf): For ET_REL, make sure extra sections'
    690 	relocations have been applied to the debug file if dwfl_module_getelf
    691 	has been used before.
    692 
    693 	* relocate.c (resolve_symbol): New function.
    694 	(relocate_section): Call it.
    695 
    696 	* relocate.c (relocate_getsym): Handle null MOD->symfile.
    697 	(relocate_section): Take new bool arg, PARTIAL.  If true,
    698 	no error for BADRELTYPE/RELUNDEF, instead just skip them
    699 	and leave only those skipped relocs behind the reloc section.
    700 	(__libdwfl_relocate_section): Take new arg, pass it down.
    701 	(__libdwfl_relocate): Take new bool arg, DEBUG.  If false,
    702 	do partial relocation on all sections.
    703 	* dwfl_module_getdwarf.c (load_dw): Update caller.
    704 	* libdwflP.h: Update decls.
    705 	* derelocate.c (dwfl_module_address_section): Pass new argument
    706 	to __libdwfl_relocate_section, true.
    707 
    708 	* derelocate.c (cache_sections): Don't cache reloc sections when
    709 	section_address callback is null.
    710 
    711 2007-10-19  Roland McGrath  <roland (a] redhat.com>
    712 
    713 	* relocate.c (relocate_section): Fix fencepost error in r_offset check.
    714 
    715 	* derelocate.c (struct dwfl_relocation): Add member `relocs'.
    716 	(struct secref): Likewise.
    717 	(cache_sections): Cache the relocation section referring to each
    718 	section we cache, if any.
    719 	(dwfl_module_address_section): Use __libdwfl_relocate_section as
    720 	necessary.
    721 
    722 	* relocate.c (struct reloc_symtab_cache): New type.
    723 	(relocate_getsym): Use it instead of four arguments.
    724 	(__libdwfl_relocate): Update caller.
    725 	(relocate_section): New function, broken out of ...
    726 	(__libdwfl_relocate): ... here.
    727 	(__libdwfl_relocate_section): New function.
    728 	* libdwflP.h: Declare it.
    729 
    730 2007-10-17  Roland McGrath  <roland (a] redhat.com>
    731 
    732 	* dwfl_module_getsym.c (dwfl_module_getsym): Apply MOD->symfile->bias
    733 	to relocated st_value.
    734 
    735 	* dwfl_report_elf.c (__libdwfl_report_elf): Align initial BASE for
    736 	ET_REL to 0x100.
    737 
    738 2007-10-16  Roland McGrath  <roland (a] redhat.com>
    739 
    740 	* dwfl_report_elf.c (__libdwfl_report_elf): Readjust BASE when a later
    741 	section has larger alignment requirements not met by the original BASE,
    742 	rather than padding more between sections.
    743 
    744 	* dwfl_report_elf.c (__libdwfl_report_elf): Fix bias calculation.
    745 
    746 	* dwfl_module_build_id.c (__libdwfl_find_build_id): Apply module bias
    747 	to sh_addr value.
    748 
    749 	* dwfl_report_elf.c (__libdwfl_report_elf): Don't be confused by BASE
    750 	at zero in ET_REL case.  Adjust BASE to necessary alignment.
    751 
    752 	* dwfl_module_build_id.c (check_notes): Take -1, not 0, as stub value
    753 	for DATA_VADDR.
    754 	(__libdwfl_find_build_id): Update caller.
    755 
    756 	* relocate.c (__libdwfl_relocate_value): Don't use sh_offset.
    757 	* dwfl_report_elf.c (__libdwfl_report_elf): Likewise.
    758 	* offline.c (dwfl_offline_section_address): Bail early if there is
    759 	separate debug file.
    760 
    761 	* relocate.c (__libdwfl_relocate): Don't return DWFL_E_NO_DWARF.
    762 
    763 2007-10-09  Roland McGrath  <roland (a] redhat.com>
    764 
    765 	* dwfl_report_elf.c (__libdwfl_report_elf): Clear SHDR->sh_offset when
    766 	caching SHDR->sh_addr = 0.
    767 	* offline.c (dwfl_offline_section_address): Never called for sh_addr
    768 	really at 0, don't check for it.  Use MOD->debug directly, not symfile.
    769 
    770 	* dwfl_module_getdwarf.c (load_symtab): Return success properly when
    771 	we've found SHT_SYMTAB.
    772 
    773 	* relocate.c (relocate_getsym): New function.
    774 	(__libdwfl_relocate): Use it.
    775 	(__libdwfl_relocate_value): Take new Elf * argument.  Make SYMSHSTRNDX
    776 	be a pointer instead of value; cache getshstrndx result there.
    777 	* libdwflP.h: Update decl.
    778 	* derelocate.c (cache_sections): Update caller.
    779 	Always work on the main file, not the symfile.
    780 	(dwfl_module_address_section): Likewise.
    781 	* dwfl_module_getsym.c (dwfl_module_getsym): Update caller.
    782 
    783 2007-10-07  Roland McGrath  <roland (a] redhat.com>
    784 
    785 	* offline.c (process_archive): Initialize MOD.
    786 
    787 	* linux-kernel-modules.c (get_release): New function, broken out of ...
    788 	(report_kernel): ... here.  Call it.
    789 	(try_kernel_name): Take new arg TRY_DEBUG, only try ".debug" if set.
    790 	(find_kernel_elf): Update caller.
    791 	(report_kernel_archive): New function.
    792 	(dwfl_linux_kernel_report_offline): Call it.
    793 
    794 	* offline.c (process_file): Take new arg PREDICATE, pass it down.
    795 	(process_archive): Likewise.
    796 	(process_archive_member): Likewise.  When nonnull, let the predicate
    797 	decide whether to use this member.
    798 	(__libdwfl_report_offline): New function, broken out of ...
    799 	(dwfl_report_offline): ... here.  Call it.
    800 	* libdwflP.h: Declare it.
    801 
    802 	* offline.c (process_archive, process_archive_member): New functions.
    803 	(process_elf, process_file): New functions, broken out of ...
    804 	(dwfl_report_offline): ... here.  Call process_file, which recurses on
    805 	ELF_K_AR files.
    806 
    807 	* dwfl_report_elf.c (__libdwfl_report_elf): New, broken out of ...
    808 	(dwfl_report_elf): ... here.  Call it.
    809 	* libdwflP.h: Declare it.
    810 
    811 2007-10-06  Roland McGrath  <roland (a] redhat.com>
    812 
    813 	* derelocate.c (dwfl_module_relocations): Don't call
    814 	dwfl_module_getdwarf.
    815 
    816 	* derelocate.c (find_section): Use __libdwfl_seterrno, not
    817 	__libdw_seterrno.
    818 
    819 	* relocate.c (__libdwfl_relocate_value): Abuse sh_offset, not
    820 	SHF_ALLOC, to cache sh_addr resolved to 0.
    821 
    822 	* dwfl_report_elf.c (dwfl_report_elf): When an ET_REL file has sh_addr
    823 	values nonzero already, just use its existing layout.
    824 
    825 	* relocate.c (__libdwfl_relocate): Clear size of reloc section in its
    826 	in-core shdr after applying it.
    827 
    828 2007-10-04  Ulrich Drepper  <drepper (a] redhat.com>
    829 
    830 	* linux-kernel-modules.c (dwfl_linux_kernel_report_kernel): Fake
    831 	initialization of notes variable.
    832 
    833 2007-10-04  Roland McGrath  <roland (a] redhat.com>
    834 
    835 	* linux-kernel-modules.c (intuit_kernel_bounds): Take new arg NOTES,
    836 	fill in with vaddr of "__start_notes" symbol if found.
    837 	(check_notes): New function.
    838 	(check_kernel_notes): New function.
    839 	(dwfl_linux_kernel_report_kernel): Call it.
    840 	(check_module_notes): New function.
    841 	(dwfl_linux_kernel_report_modules): Call it.
    842 
    843 	* linux-kernel-modules.c (dwfl_linux_kernel_find_elf):
    844 	Try dwfl_build_id_find_elf first.
    845 
    846 	* linux-kernel-modules.c (report_kernel): Don't leak FD if !REPORT.
    847 	Set kernel module e_type to ET_DYN.
    848 
    849 2007-10-03  Roland McGrath  <roland (a] redhat.com>
    850 
    851 	* find-debuginfo.c (validate): New function, broken out of ...
    852 	(find_debuginfo_in_path): ... here.  New function, broken out of ...
    853 	(dwfl_standard_find_debuginfo): ... here.  Call it, after trying
    854 	dwfl_build_id_find_debuginfo first.
    855 
    856 	* dwfl_build_id_find_elf.c: New file.
    857 	* dwfl_build_id_find_debuginfo.c: New file.
    858 	* Makefile.am (libdwfl_a_SOURCES): Add them.
    859 	* libdwfl.h: Declare them.
    860 	* libdwflP.h: Add INTDECLs.
    861 
    862 	* dwfl_module_build_id.c: New file.
    863 	* dwfl_module_report_build_id.c: New file.
    864 	* Makefile.am (libdwfl_a_SOURCES): Add them.
    865 	* libdwfl.h: Declare them.
    866 	* libdwflP.h (struct Dwfl_Module): New members build_id_bits,
    867 	build_id_len, build_id_vaddr.  Declare __libdwfl_find_build_id.
    868 	* dwfl_module.c (__libdwfl_module_free): Free MOD->build_id_bits.
    869 
    870 	* dwfl_module_getdwarf.c (find_offsets): New function.
    871 	(find_dynsym): New function, calls that.
    872 	(find_symtab): Call it.
    873 
    874 2007-09-11  Roland McGrath  <roland (a] redhat.com>
    875 
    876 	* dwfl_module_addrsym.c: Prefer a later global symbol at the same
    877 	address if its st_size is smaller.
    878 
    879 2007-08-13  Roland McGrath  <roland (a] redhat.com>
    880 
    881 	* dwfl_module_addrsym.c: Add dead initializer for stupid compiler.
    882 
    883 2007-08-12  Roland McGrath  <roland (a] redhat.com>
    884 
    885 	* linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Don't use
    886 	FTS_LOGICAL.
    887 
    888 	* elf-from-memory.c (elf_from_remote_memory): Don't reset LOADBASE on
    889 	a second phdr if it happens to match EHDR_VMA exactly.
    890 
    891 2007-08-08  Roland McGrath  <roland (a] redhat.com>
    892 
    893 	* dwfl_module_addrsym.c: Don't use STT_SECTION, STT_FILE symbols and
    894 	those with no names.  Rewrite best symbol algorithm not to assume a
    895 	sorted table and to be smarter handling sizeless symbols.
    896 
    897 2007-07-16  Roland McGrath  <roland (a] redhat.com>
    898 
    899 	* dwfl_module.c (dwfl_report_module): Increment DWFL->nmodules when
    900 	reviving an existing module.
    901 
    902 2007-06-08  Roland McGrath  <roland (a] redhat.com>
    903 
    904 	* libdwflP.h: Fix #ifndef for config.h to use PACKAGE_NAME.
    905 
    906 2007-05-17  Roland McGrath  <roland (a] redhat.com>
    907 
    908 	* linux-kernel-modules.c (dwfl_linux_kernel_report_offline): Look at
    909 	whole /lib/modules/VERSION tree, not just /lib/modules/VERSION/kernel.
    910 	(dwfl_linux_kernel_find_elf): Likewise.
    911 
    912 	* linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use
    913 	getline and sscanf instead of fscanf.
    914 
    915 2007-05-08  Roland McGrath  <roland (a] redhat.com>
    916 
    917 	* offline.c (dwfl_offline_section_address): Don't assume section
    918 	numbers match between stripped and debuginfo files.  Instead, assume
    919 	only that the ordering among SHF_ALLOC sections matches.
    920 
    921 	* linux-kernel-modules.c (report_kernel): Change RELEASE argument to
    922 	pointer to string.
    923 	(dwfl_linux_kernel_report_offline): Update caller.
    924 	(dwfl_linux_kernel_report_kernel): Likewise.
    925 
    926 2007-04-23  Roland McGrath  <roland (a] redhat.com>
    927 
    928 	* argp-std.c (options): Fix group title string.
    929 
    930 	* argp-std.c (parse_opt): Handle ARGP_KEY_ERROR, free the Dwfl.
    931 	Update via STATE->input every time we set STATE->hook, not only at
    932 	ARGP_KEY_SUCCESS.
    933 
    934 	* dwfl_module.c (free_file): Free FILE->name.
    935 
    936 2007-04-16  Roland McGrath  <roland (a] redhat.com>
    937 
    938 	* derelocate.c (cache_sections): Apply bias to sh_addr.
    939 	(compare_secrefs): Fix address comparison to avoid signed overflow.
    940 	(find_section): New function, broken out of ...
    941 	(dwfl_module_relocate_address): ... here, call it.
    942 	(check_module): New function, broken out of ...
    943 	(dwfl_module_relocate_address): ... here, call it.
    944 	(dwfl_module_address_section): New function.
    945 	* libdwfl.h: Declare it.
    946 
    947 2007-03-26  Roland McGrath  <roland (a] redhat.com>
    948 
    949 	* dwfl_module.c (__libdwfl_module_free): Free MOD itself.
    950 
    951 2007-03-18  Roland McGrath  <roland (a] redhat.com>
    952 
    953 	* dwfl_module_getdwarf.c (find_debuglink): New function, broken out of
    954 	(find_debuginfo): ... here.  Call it.
    955 	Don't return error for libelf errors finding .gnu_debuglink section.
    956 
    957 2007-03-12  Roland McGrath  <roland (a] redhat.com>
    958 
    959 	* dwfl_module.c (dwfl_report_begin_add): New function broken out of ...
    960 	(dwfl_report_begin): ... here.  Call it.
    961 	* libdwfl.h: Declare it.
    962 	* libdwflP.h: Add INTDECL.
    963 
    964 	* elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo.
    965 
    966 	* offline.c: Comment typo fix.
    967 
    968 2007-03-04  Roland McGrath  <roland (a] redhat.com>
    969 
    970 	* linux-kernel-modules.c (KERNEL_MODNAME): New macro for "kernel".
    971 	(find_kernel_elf): New function, broken out of ...
    972 	(report_kernel): ... here.  Call it.
    973 	(dwfl_linux_kernel_find_elf): Use it for module named KERNEL_MODNAME.
    974 	(intuit_kernel_bounds): New function, grovel /proc/kallsyms to guess
    975 	virtual address bounds of kernel from symbols rounded to page size.
    976 	(dwfl_linux_kernel_report_kernel): Use that if it works, before
    977 	resorting to report_kernel.
    978 
    979 	* dwfl_module_getdwarf.c (open_elf): Set MOD->e_type to ET_DYN for an
    980 	ET_EXEC file with nonzero bias.
    981 
    982 	* dwfl_module_addrname.c (dwfl_module_addrname): Just call
    983 	dwfl_module_addrsym.  Guts moved to ...
    984 	* dwfl_module_addrsym.c: ... here; new file.
    985 	* Makefile.am (libdwfl_a_SOURCES): Add it.
    986 	* libdwfl.h: Declare dwfl_module_addrsym.
    987 	* libdwflP.h: Add INTDECL.
    988 
    989 2007-03-03  Roland McGrath  <roland (a] redhat.com>
    990 
    991 	* dwfl_module.c (free_file): New function, broken out of ...
    992 	(__libdwfl_module_free): ... here.  In it, close fd after elf_end.
    993 
    994 	* dwfl_module_getdwarf.c (open_elf): Close fd and reset to -1
    995 	on libelf failure.
    996 
    997 2007-03-02  Roland McGrath  <roland (a] redhat.com>
    998 
    999 	* linux-kernel-modules.c: Fix bogus error test for asprintf call.
   1000 
   1001 2007-02-02  Roland McGrath  <roland (a] redhat.com>
   1002 
   1003 	* dwfl_addrmodule.c (dwfl_addrmodule): Match a module's high boundary
   1004 	address exactly if it's no other module's low boundary.
   1005 
   1006 	* dwfl_module_addrname.c (dwfl_module_addrname): If no symbol's value
   1007 	and size cover the address, select the closest symbol with st_size==0
   1008 	that lies in the same section.
   1009 
   1010 2007-01-29  Roland McGrath  <roland (a] redhat.com>
   1011 
   1012 	* dwfl_version.c (dwfl_version): Return PACKAGE_VERSION,
   1013 	not PACKAGE_STRING.
   1014 
   1015 2007-01-20  Roland McGrath  <roland (a] redhat.com>
   1016 
   1017 	* relocate.c (__libdwfl_relocate_value): Treat section_address of -1
   1018 	as omitted, not 0.
   1019 	* libdwfl.h (Dwfl_Callbacks): Update comment.
   1020 	* derelocate.c (cache_sections): Don't ignore sh_addr == 0 sections.
   1021 	* linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
   1022 	For ignored missing section, use -1 instead of 0.
   1023 	* offline.c (dwfl_offline_section_address): Expect a call for 0.
   1024 
   1025 2007-01-19  Roland McGrath  <roland (a] redhat.com>
   1026 
   1027 	* argp-std.c (parse_opt): For -e, reset DWFL->offline_next_address to
   1028 	zero so a lone -e foo.so is shown without address bias.
   1029 
   1030 2007-01-10  Roland McGrath  <roland (a] redhat.com>
   1031 
   1032 	* linux-kernel-modules.c (report_kernel): Check asprintf return value
   1033 	directly instead of via side effect, to silence warn_unused_result.
   1034 	(dwfl_linux_kernel_report_offline): Likewise.
   1035 	(dwfl_linux_kernel_find_elf): Likewise.
   1036 	(dwfl_linux_kernel_module_section_address): Likewise.
   1037 	* find-debuginfo.c (try_open): Likewise.
   1038 	* linux-proc-maps.c (find_sysinfo_ehdr): Likewise.
   1039 	(dwfl_linux_proc_report): Likewise.
   1040 
   1041 	* libdwfl.h (dwfl_begin): Require nonnull argument.
   1042 
   1043 2006-12-27  Roland McGrath  <roland (a] redhat.com>
   1044 
   1045 	* dwfl_module.c (compare_modules): Fix address comparison to avoid
   1046 	signed overflow.  Patch by Frank Ch. Eigler <fche (a] redhat.com>.
   1047 
   1048 2006-10-30  Roland McGrath  <roland (a] redhat.com>
   1049 
   1050 	* dwfl_module.c (dwfl_report_module): Comment typo fix.
   1051 
   1052 2006-09-05  Roland McGrath  <roland (a] redhat.com>
   1053 
   1054 	* derelocate.c (cache_sections): Use alloca instead of variable-sized
   1055 	auto array, in function already using alloca.
   1056 
   1057 2006-08-14  Roland McGrath  <roland (a] redhat.com>
   1058 
   1059 	* linux-kernel-modules.c (try_kernel_name): If the call to
   1060 	dwfl_standard_find_debuginfo produces no results, try it again
   1061 	with NULL as DEBUGLINK_FILE to try *FNAME with .debug suffix.
   1062 
   1063 	* find-debuginfo.c (DEFAULT_DEBUGINFO_PATH): Macro moved ...
   1064 	* libdwflP.h: ... to here.
   1065 	* linux-kernel-modules.c (try_kernel_name): Skip manual open if it
   1066 	repeats the first thing dwfl_standard_find_debuginfo will try.
   1067 
   1068 	* linux-kernel-modules.c (MODULE_SECT_NAME_LEN): New macro.
   1069 	(dwfl_linux_kernel_module_section_address): If a /sys file is missing
   1070 	and the section name is >= MODULE_SECT_NAME_LEN, try truncating the
   1071 	section name.
   1072 
   1073 2006-07-12  Ulrich Drepper  <drepper (a] redhat.com>
   1074 
   1075 	* cu.c: Adjust for internal_function_def removal.
   1076 	* dwfl_error.c: Likewise.
   1077 	* dwfl_module.c: Likewise.
   1078 	* dwfl_module_getdwarf.c: Likewise.
   1079 	* lines.c: Likewise.
   1080 	* relocate.c: Likewise.
   1081 
   1082 2006-07-11  Ulrich Drepper  <drepper (a] redhat.com>
   1083 
   1084 	* dwfl_module.c (compare_modules): Don't return GElf_Sxword value,
   1085 	it can overflow the return value type.
   1086 	Patch by Tim Moore <timoore (a] redhat.com>.
   1087 
   1088 2006-06-28  Roland McGrath  <roland (a] redhat.com>
   1089 
   1090 	* libdwfl.h: Cosmetic changes.
   1091 
   1092 	* dwfl_line_comp_dir.c: New file.
   1093 	* Makefile.am (libdwfl_a_SOURCES): Add it.
   1094 	* libdwfl.h: Declare dwfl_line_comp_dir.
   1095 
   1096 	* dwfl_lineinfo.c (dwfl_lineinfo): Remove stray extern in defn.
   1097 
   1098 	* dwfl_linecu.c: New file.
   1099 	* Makefile.am (libdwfl_a_SOURCES): Add it.
   1100 	* libdwfl.h: Declare dwfl_linecu.
   1101 
   1102 	* libdwflP.h (dwfl_linecu_inline): Function renamed from dwfl_linecu.
   1103 	(dwfl_linecu): Define as macro.
   1104 
   1105 	* relocate.c (__libdwfl_relocate): Use dwfl_module_getsym.
   1106 
   1107 	* dwfl_module_getdwarf.c (dwfl_module_getsymtab): New function.
   1108 	(dwfl_module_addrname): Function moved ...
   1109 	* dwfl_module_addrname.c: ... here, new file.
   1110 	* dwfl_module_getsym.c: New file.
   1111 	* Makefile.am (libdwfl_a_SOURCES): Add them.
   1112 	* libdwfl.h: Declare dwfl_module_getsymtab, dwfl_module_getsym.
   1113 	* libdwflP.h: Add INTDECLs.
   1114 
   1115 2006-06-27  Roland McGrath  <roland (a] redhat.com>
   1116 
   1117 	* dwfl_module.c (dwfl_report_end): Whitespace fix.
   1118 
   1119 2006-06-13  Roland McGrath  <roland (a] redhat.com>
   1120 
   1121 	* elf-from-memory.c (elf_from_remote_memory): Fix 32/64 typo.
   1122 	Use __libdwfl_seterrno for elf_memory failure.
   1123 
   1124 2006-05-22  Roland McGrath  <roland (a] redhat.com>
   1125 
   1126 	* dwfl_module_return_value_location.c
   1127 	(dwfl_module_return_value_location): Use __libdwfl_module_getebl.
   1128 
   1129 2006-05-27  Ulrich Drepper  <drepper (a] redhat.com>
   1130 
   1131 	* libdwfl.h: Add extern "C".
   1132 
   1133 2006-05-22  Ulrich Drepper  <drepper (a] redhat.com>
   1134 
   1135 	* cu.c (addrarange): Handle files without aranges information.
   1136 
   1137 2006-05-16  Ulrich Drepper  <drepper (a] redhat.com>
   1138 
   1139 	* dwfl_addrmodule.c (dwfl_addrmodule): Also return NULL of
   1140 	->modules is NULL.
   1141 
   1142 2006-02-26  Roland McGrath  <roland (a] redhat.com>
   1143 
   1144 	* dwfl_version.c: New file.
   1145 	* Makefile.am (libdwfl_a_SOURCES): Add it.
   1146 	* libdwfl.h: Declare dwfl_version.
   1147 
   1148 	* offline.c (dwfl_report_offline): Account for dwfl_report_elf having
   1149 	aligned up from DWFL->offline_next_address when checking for overlap.
   1150 
   1151 2005-12-22  Roland McGrath  <roland (a] redhat.com>
   1152 
   1153 	* argp-std.c (parse_opt): Call dwfl_end in failure cases.
   1154 
   1155 	* linux-proc-maps.c (proc_maps_report): New function, broken out of ...
   1156 	(dwfl_linux_proc_report): ... here.  Call it.
   1157 	(dwfl_linux_proc_maps_report): New function.
   1158 	* libdwfl.h: Declare it.
   1159 	* libdwflP.h: Add INTDECL.
   1160 	* argp-std.c (options, parse_opt): Grok -M/--linux-process-map.
   1161 
   1162 	* dwfl_nextcu.c (dwfl_nextcu): Don't fail when dwfl_module_getdwarf
   1163 	failed with DWFL_E_NO_DWARF.
   1164 
   1165 2005-11-26  Roland McGrath  <roland (a] redhat.com>
   1166 
   1167 	* dwfl_end.c (dwfl_end): Free the DWFL itself.
   1168 
   1169 2005-11-25  Roland McGrath  <roland (a] redhat.com>
   1170 
   1171 	* dwfl_module_getdwarf.c (__libdwfl_module_getebl): New function.
   1172 	(load_dw): Use it.
   1173 	* dwfl_module_register_names.c (dwfl_module_register_names): Likewise.
   1174 	* libdwflP.h: Declare it.
   1175 
   1176 	* dwfl_module_register_names.c: New file.
   1177 	* Makefile.am (libdwfl_a_SOURCES): Add it.
   1178 	* libdwfl.h: Declare dwfl_module_register_names.
   1179 
   1180 2005-11-21  Roland McGrath  <roland (a] redhat.com>
   1181 
   1182 	* linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
   1183 	Don't leak malloc'd file name.
   1184 	If a /sys/.../sections file is missing and starts with ".init",
   1185 	try the variant with "_init" too; catches PPC64 kernel braindamage.
   1186 
   1187 2005-11-15  Roland McGrath  <roland (a] redhat.com>
   1188 
   1189 	* libdwfl.h: Comment fixes.
   1190 
   1191 	* dwfl_module_return_value_location.c: Add unlikely for error case.
   1192 
   1193 2005-11-13  Roland McGrath  <roland (a] redhat.com>
   1194 
   1195 	* dwfl_return_value_location.c: New file.
   1196 	* Makefile.am (libdwfl_a_SOURCES): Add it.
   1197 	* libdwfl.h: Declare dwfl_module_return_value_location.
   1198 	* libdwflP.h (DWFL_ERRORS): Add DWFL_E_WEIRD_TYPE.
   1199 
   1200 2005-10-20  Roland McGrath  <roland (a] redhat.com>
   1201 
   1202 	* libdwflP.h (DWFL_ERRORS): New error UNKNOWN_MACHINE.
   1203 	* relocate.c (__libdwfl_relocate): Return DWFL_E_UNKNOWN_MACHINE
   1204 	instead of DWFL_E_BADRELTYPE if ebl_get_elfmachine yields EM_NONE.
   1205 
   1206 2005-10-01  Roland McGrath  <roland (a] redhat.com>
   1207 
   1208 	* linux-kernel-modules.c (report_kernel): Return ENOENT if we fail
   1209 	with errno 0.
   1210 
   1211 2005-09-19  Roland McGrath  <roland (a] redhat.com>
   1212 
   1213 	* linux-kernel-modules.c (dwfl_linux_kernel_report_modules): Use
   1214 	PRIx64 instead of PRIi64, lest addresses with high bits set overflow
   1215 	the signed integer reading; they will just have to be in hexadecimal.
   1216 	(dwfl_linux_kernel_module_section_address): Likewise.
   1217 
   1218 2005-08-28  Ulrich Drepper  <drepper (a] redhat.com>
   1219 
   1220 	* Makefile.am (%.os): Use COMPILE.os.
   1221 	(COMPILE.os): Filter out gconv options.
   1222 
   1223 2005-08-25  Roland McGrath  <roland (a] redhat.com>
   1224 
   1225 	* cu.c (__libdwfl_nextcu): Return success when dwarf_nextcu hits end.
   1226 	* dwfl_nextcu.c (dwfl_nextcu): Skip modules with no dwarf info.
   1227 
   1228 2005-08-24  Roland McGrath  <roland (a] redhat.com>
   1229 
   1230 	* dwfl_lineinfo.c (dwfl_lineinfo): Add bias, don't subtract it.
   1231 
   1232 	* argp-std.c [_MUDFLAP] (__libdwfl_argp_mudflap_options): New function,
   1233 	magic initializer to set -heur-stack-bound option.
   1234 
   1235 2005-08-22  Roland McGrath  <roland (a] redhat.com>
   1236 
   1237 	* dwfl_validate_address.c: New file.
   1238 	* Makefile.am (libdwfl_a_SOURCES): Add it.
   1239 	* libdwfl.h: Declare dwfl_validate_address.
   1240 
   1241 	* derelocate.c (dwfl_module_relocate_address): Add INTDEF.
   1242 	* libdwflP.h: Add INTDECL.
   1243 
   1244 	* dwfl_module_getdwarf.c (find_symtab): Use elf_getdata instead of
   1245 	elf_rawdata for symbol-related sections.
   1246 
   1247 	* offline.c (dwfl_report_offline): Move offline_next_address outside
   1248 	module's range, in case it's an ET_EXEC using fixed segment locations.
   1249 	* libdwfl.h: Update comment.
   1250 
   1251 	* dwfl_report_elf.c (dwfl_report_elf): Align BASE to first segment's
   1252 	required alignment.
   1253 
   1254 2005-08-20  Roland McGrath  <roland (a] redhat.com>
   1255 
   1256 	* linux-kernel-modules.c (report_kernel): Take new argument PREDICATE,
   1257 	function to choose whether to report.
   1258 	(dwfl_linux_kernel_report_offline): Likewise.
   1259 	* libdwfl.h: Update decl.
   1260 	* argp-std.c (parse_opt): Update caller.
   1261 
   1262 	* dwfl_getsrclines.c: New file.
   1263 	* dwfl_onesrcline.c: New file.
   1264 	* Makefile.am (libdwfl_a_SOURCES): Add them.
   1265 	* libdwfl.h: Declare dwfl_getsrclines, dwfl_onesrcline.
   1266 
   1267 	* linux-kernel-modules.c (dwfl_linux_kernel_find_elf): Don't leak
   1268 	MODULESDIR[0].  Call fts_close on failure.
   1269 
   1270 	* dwfl_module_getdwarf.c (load_dw): Take dwfl_file * instead of Elf *.
   1271 	Close ET_REL file descriptors after relocation.
   1272 	(find_dw): Update caller.
   1273 	* offline.c (dwfl_report_offline): Get the file into memory and close
   1274 	the file descriptor.
   1275 
   1276 	* dwfl_module_getdwarf.c (find_debuginfo): Do nothing when
   1277 	MOD->debug.elf is already set.
   1278 
   1279 	* find-debuginfo.c (try_open): Use TEMP_FAILURE_RETRY.
   1280 	(dwfl_standard_find_debuginfo): Fail on errors not ENOENT or ENOTDIR.
   1281 
   1282 	* argp-std.c (options, parse_opt): Grok -K/--offline-kernel, use
   1283 	dwfl_linux_kernel_report_offline with offline_callbacks.
   1284 
   1285 	* linux-kernel-modules.c (report_kernel): New function, broken out of
   1286 	...
   1287 	(dwfl_linux_kernel_report_kernel): ... here.  Use it.
   1288 	(dwfl_linux_kernel_report_offline): New function.
   1289 	* libdwfl.h: Declare it.
   1290 	* libdwflP.h: Add INTDECL.
   1291 
   1292 2005-08-19  Roland McGrath  <roland (a] redhat.com>
   1293 
   1294 	Use standard debuginfo search path to look for vmlinux.
   1295 	* find-debuginfo.c (dwfl_standard_find_debuginfo): Don't check CRC if
   1296 	passed zero.
   1297 	* linux-kernel-modules.c (try_kernel_name): New function, broken out
   1298 	of ...
   1299 	(dwfl_linux_kernel_report_kernel): ... here.  Use it.
   1300 
   1301 	* argp-std.c (offline_callbacks): New variable.
   1302 	(parse_opt): Use it for -e.  Allow multiple -e options.
   1303 
   1304 	* offline.c: New file.
   1305 	* Makefile.am (libdwfl_a_SOURCES): Add it.
   1306 	* libdwfl.h: Declare dwfl_offline_section_address, dwfl_report_offline.
   1307 	* libdwflP.h: Add INTDECLs.
   1308 	(OFFLINE_REDZONE): New macro.
   1309 	(struct Dwfl): New member `offline_next_address'.
   1310 	* dwfl_begin.c (dwfl_begin): Initialize it.
   1311 	* dwfl_module.c (dwfl_report_begin): Likewise.
   1312 
   1313 	* dwfl_report_elf.c (dwfl_report_elf): Accept all types.  When ET_REL,
   1314 	do a nominal absolute section layout starting at BASE.
   1315 	* libdwfl.h: Update comment.
   1316 
   1317 2005-08-18  Roland McGrath  <roland (a] redhat.com>
   1318 
   1319 	* dwfl_module_getsrc_file.c (dwfl_module_getsrc_file): Do
   1320 	dwfl_module_getdwarf if necessary.
   1321 
   1322 	* dwfl_report_elf.c (dwfl_report_elf): Permit ET_REL with BASE==0.
   1323 	* libdwfl.h: Update comment.
   1324 
   1325 	* derelocate.c: New file.
   1326 	* Makefile.am (libdwfl_a_SOURCES): Add it.
   1327 
   1328 	* libdwflP.h (struct Dwfl_Module): isrel -> e_type.
   1329 	* dwfl_report_elf.c (dwfl_report_elf): Initialize it.
   1330 	* dwfl_module_getdwarf.c (open_elf): Update initialization.
   1331 	(load_dw, dwfl_module_addrname): Update uses.
   1332 	* relocate.c (__libdwfl_relocate): Likewise.
   1333 
   1334 2005-08-04  Roland McGrath  <roland (a] redhat.com>
   1335 
   1336 	* libdwfl.h (Dwfl_Callbacks.section_address): Take additional
   1337 	arguments SHNDX, SHDR.
   1338 	(dwfl_linux_kernel_module_section_address): Update prototype.
   1339 	* relocate.c (__libdwfl_relocate_value): Update caller.
   1340 	* linux-kernel-modules.c (dwfl_linux_kernel_module_section_address):
   1341 	Take the new arguments.
   1342 
   1343 2005-08-10  Roland McGrath  <roland (a] redhat.com>
   1344 
   1345 	* relocate.c (__libdwfl_relocate): Take argument DEBUGFILE,
   1346 	use it instead of MOD->debug.file.
   1347 	* libdwflP.h: Update decl.
   1348 	* dwfl_module_getdwarf.c (load_dw): Update caller.
   1349 	Fixes bug #165598.
   1350 
   1351 2005-08-09  Roland McGrath  <roland (a] redhat.com>
   1352 
   1353 	* libdwflP.h: Include ../libdw/libdwP.h for its INTDECLs.
   1354 	* cu.c: Use INTUSE on dwarf_* calls.
   1355 	* dwfl_error.c: Likewise.
   1356 	* dwfl_module.c: Likewise.
   1357 	* dwfl_module_getdwarf.c: Likewise.
   1358 	* dwfl_module_getsrc_file.c: Likewise.
   1359 	* lines.c: Likewise.
   1360 
   1361 2005-08-07  Roland McGrath  <roland (a] redhat.com>
   1362 
   1363 	* linux-kernel-modules.c (dwfl_linux_kernel_find_elf): When module
   1364 	names contain '_' or '-', look for files named either "foo-bar.ko"
   1365 	or "foo_bar.ko".
   1366 
   1367 2005-07-29  Roland McGrath  <roland (a] redhat.com>
   1368 
   1369 	* loc2c.c: File removed.
   1370 	* loc2c.h: File removed.
   1371 	* loc2c-runtime.h: File removed.
   1372 	* test2.c: File removed.
   1373 	* Makefile.am (EXTRA_DIST): Variable removed.
   1374 	(noinst_HEADERS): Remove loc2c.h from here.
   1375 
   1376 2005-07-28  Ulrich Drepper  <drepper (a] redhat.com>
   1377 
   1378 	* libdwfl.h: Add a few missing extern for function prototypes.
   1379 
   1380 	* libdwfl_crc32.c: New file.
   1381 	* libdwfl_crc32_file.c: New file.
   1382 	* libdwflP.h: Declare the new functions.
   1383 	* Makefile.am (libdwfl_a_SOURCES): Add libdwfl_crc32.c and
   1384 	libdwfl_crc32_file.c.
   1385 	* libdwfl/find-debuginfo.c (check_crc): Use __libdwfl_crc32_file
   1386 	instead of crc32_file.
   1387 
   1388 2005-07-28  Roland McGrath  <roland (a] redhat.com>
   1389 
   1390 	* ptest.c: Moved to ../tests/dwflmodtest.c.
   1391 
   1392 	* Makefile.am (noinst_PROGRAMS): Variable removed.
   1393 	(libdwfl_so_SOURCES, libdwfl_LIBS, libdwfl_so_LDADD): Likewise.
   1394 	(EXTRA_DIST, ptest_LDADD, test2_LDADD): Likewise.
   1395 	(libdwfl): Don't use libdwfl.so any more.
   1396 	(libdwfl.so, install, uninstall): Targets removed.
   1397 	(test2_SOURCES): Define EXTRA_DIST instead of this.
   1398 	* libdwfl.map: File removed.
   1399 
   1400 	* libdwfl.h: Use "" for libdw.h #include.
   1401 
   1402 2005-07-27  Roland McGrath  <roland (a] redhat.com>
   1403 
   1404 	* libdwfl.map: Add dwfl_getmodules.
   1405 
   1406 2005-07-23  Ulrich Drepper  <drepper (a] redhat.com>
   1407 
   1408 	* Makefile.am: Fix rules to allow building with mudflap.
   1409 
   1410 2005-07-21  Roland McGrath  <roland (a] redhat.com>
   1411 
   1412 	* Makefile.am (noinst_HEADERS): Add loc2c.c.
   1413 
   1414 	* test2.c (main): Check sscanf result to quiet warning.
   1415 
   1416 2005-07-20  Roland McGrath  <roland (a] redhat.com>
   1417 
   1418 	* libdwfl-branch merged, creating this direcotry.
   1419