drgn/libdrgn
Omar Sandoval 63672be809 libdrgn: linux_kernel: save module .init section addresses
Linux kernel modules usually contain ELF relocations in DWARF and ORC
sections for symbols in .init sections. Since we ignore .init sections
entirely in cache_kernel_module_sections(), these relocations end up
being based on an address of 0 (so, e.g., a function from .init.text
could be reported as having an address of 0x0). It makes a little more
sense to use the address where the .init section was before it was
freed. So, let's update the sections' sh_addr but continue ignoring them
for determining the module's address range.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2021-03-26 15:13:47 -07:00
..
build-aux libdrgn: replace elfutils DWARF unwinder with our own 2021-03-15 16:43:12 -07:00
examples libdrgn: add load_debug_info example program 2020-07-10 16:18:58 -07:00
include libdrgn: add latest elf.h and dwarf.h to support elfutils 0.165 2021-03-21 23:18:39 -07:00
m4 Remove bundled version of elfutils 2021-03-16 00:52:09 -07:00
python libdrgn: python: identify bit fields in TypeMember.__repr__ 2021-03-17 12:02:53 -07:00
.gitignore Document with Sphinx 2019-04-11 12:48:15 -07:00
arch_ppc64.c libdrgn: replace elfutils DWARF unwinder with our own 2021-03-15 16:43:12 -07:00
arch_ppc64.defs libdrgn: define structure for storing processor register values 2021-03-15 16:36:38 -07:00
arch_register_layout.h libdrgn: replace elfutils DWARF unwinder with our own 2021-03-15 16:43:12 -07:00
arch_x86_64.c libdrgn: replace elfutils DWARF unwinder with our own 2021-03-15 16:43:12 -07:00
arch_x86_64.defs libdrgn: define structure for storing processor register values 2021-03-15 16:36:38 -07:00
binary_buffer.c Fix some include-what-you-use warnings and update for Bear 3 2021-02-26 16:05:49 -08:00
binary_buffer.h libdrgn: binary_buffer: add binary_buffer_next_[us]int() 2021-03-15 12:13:45 -07:00
binary_search_tree.h libdrgn: consistently use __ for __attribute__ names 2021-02-21 03:16:23 -08:00
bitops.h libdrgn: split bit operations into their own header 2020-10-09 17:44:15 -07:00
cfi.c libdrgn: add DWARF call frame information parsing 2021-03-15 16:36:38 -07:00
cfi.h libdrgn: add DWARF call frame information parsing 2021-03-15 16:36:38 -07:00
cityhash.h libdrgn: consistently use __ for __attribute__ names 2021-02-21 03:16:23 -08:00
configure.ac libdrgn: add latest elf.h and dwarf.h to support elfutils 0.165 2021-03-21 23:18:39 -07:00
debug_info.c libdrgn: handle errors from elf_strptr() 2021-03-26 14:28:16 -07:00
debug_info.h libdrgn: replace elfutils DWARF unwinder with our own 2021-03-15 16:43:12 -07:00
Doxyfile libdrgn: clean up stale comment references and Doxygen warnings 2021-03-16 16:15:43 -07:00
drgn.h.in libdrgn: clean up stale comment references and Doxygen warnings 2021-03-16 16:15:43 -07:00
dwarf_index.c libdrgn: debug_info: save platform per module 2021-03-15 12:13:48 -07:00
dwarf_index.h libdrgn: debug_info: try to find DIE specification when parsing type 2021-03-08 15:24:24 -08:00
error.c libdrgn: rename "unavailable" objects to "absent" objects 2020-12-29 14:58:26 -08:00
error.h libdrgn: clean up usage of drgn_stop 2021-03-05 12:46:06 -08:00
hash_table.c libdrgn: consistently use __ for __attribute__ names 2021-02-21 03:16:23 -08:00
hash_table.h libdrgn: consistently use __ for __attribute__ names 2021-02-21 03:16:23 -08:00
helpers.h Clean up #includes with include-what-you-use 2020-09-23 16:29:42 -07:00
kdump.c libdrgn: add powerpc stack trace support 2021-01-29 11:31:59 -08:00
language_c.c libdrgn: clean up usage of drgn_stop 2021-03-05 12:46:06 -08:00
language.c libdrgn: stretch minimum supported version of libelf to 0.170 2021-03-21 14:28:29 -07:00
language.h libdrgn: simplify language fall back handling 2021-01-08 10:46:35 -08:00
lazy_object.c libdrgn: replace lazy types with lazy objects 2021-01-08 17:39:51 -08:00
lazy_object.h libdrgn: clean up stale comment references and Doxygen warnings 2021-03-16 16:15:43 -07:00
lexer.c Clean up #includes with include-what-you-use 2020-09-23 16:29:42 -07:00
lexer.h Clean up #includes with include-what-you-use 2020-09-23 16:29:42 -07:00
linux_kernel_helpers.c Track byte order in scalar types instead of objects 2021-02-19 21:41:29 -08:00
linux_kernel.c libdrgn: linux_kernel: save module .init section addresses 2021-03-26 15:13:47 -07:00
linux_kernel.h libdrgn: linux kernel: remove THREAD_SIZE object finder 2020-12-10 02:08:13 -08:00
Makefile.am libdrgn: add latest elf.h and dwarf.h to support elfutils 0.165 2021-03-21 23:18:39 -07:00
memory_reader.c libdrgn: add {min,max}_iconst() and rewrite min() and max() 2020-10-10 23:48:03 -07:00
memory_reader.h libdrgn: fix Doxygen 2020-09-30 01:32:33 -07:00
minmax.h libdrgn: clean up stale comment references and Doxygen warnings 2021-03-16 16:15:43 -07:00
object_index.c Clean up #includes with include-what-you-use 2020-09-23 16:29:42 -07:00
object_index.h libdrgn: fold drgn_type_index into drgn_program 2020-08-26 17:36:35 -07:00
object.c libdrgn: improve truncate_signed() and truncate_unsigned() 2021-02-26 16:05:49 -08:00
object.h libdrgn: clean up stale comment references and Doxygen warnings 2021-03-16 16:15:43 -07:00
path.c Clean up #includes with include-what-you-use 2020-09-23 16:29:42 -07:00
path.h libdrgn: fix Doxygen 2020-09-30 01:32:33 -07:00
platform.c libdrgn: define structure for storing processor register values 2021-03-15 16:36:38 -07:00
platform.h libdrgn: use flexible array for pgtable_iterator::arch 2021-03-16 16:18:49 -07:00
pp.h libdrgn: add preprocessor utility macros 2020-10-09 16:36:59 -07:00
program.c libdrgn: stretch minimum supported version of libelf to 0.170 2021-03-21 14:28:29 -07:00
program.h libdrgn: clean up stale comment references and Doxygen warnings 2021-03-16 16:15:43 -07:00
register_state.c libdrgn: define structure for storing processor register values 2021-03-15 16:36:38 -07:00
register_state.h libdrgn: add DWARF call frame information parsing 2021-03-15 16:36:38 -07:00
serialize.c libdrgn: add copy_lsbytes() 2021-03-15 12:13:48 -07:00
serialize.h libdrgn: add copy_lsbytes() 2021-03-15 12:13:48 -07:00
siphash.h Update copyright headers to Facebook and add missing headers 2020-05-15 15:13:02 -07:00
splay_tree.c Clean up #includes with include-what-you-use 2020-09-23 16:29:42 -07:00
stack_trace.c libdrgn: replace elfutils DWARF unwinder with our own 2021-03-15 16:43:12 -07:00
stack_trace.h libdrgn: replace elfutils DWARF unwinder with our own 2021-03-15 16:43:12 -07:00
string_builder.c libdrgn: add {min,max}_iconst() and rewrite min() and max() 2020-10-10 23:48:03 -07:00
string_builder.h libdrgn: consistently use __ for __attribute__ names 2021-02-21 03:16:23 -08:00
symbol.c Clean up #includes with include-what-you-use 2020-09-23 16:29:42 -07:00
symbol.h Update copyright headers to Facebook and add missing headers 2020-05-15 15:13:02 -07:00
type.c Fix some include-what-you-use warnings and update for Bear 3 2021-02-26 16:05:49 -08:00
type.h Track byte order in scalar types instead of objects 2021-02-19 21:41:29 -08:00
util.h libdrgn: add DWARF call frame information parsing 2021-03-15 16:36:38 -07:00
vector.c libdrgn: fix vector_shrink_to_fit() with size 0 2021-01-06 17:47:39 -08:00
vector.h libdrgn: clean up stale comment references and Doxygen warnings 2021-03-16 16:15:43 -07:00