[RFC dwarves 1/3] btf_encoder: collect ELF function addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When collecting immutable ELF function info, store addresses
of functions as these will be used for better DWARF/ELF correspondence
matching.

Signed-off-by: Alan Maguire <alan.maguire@xxxxxxxxxx>
---
 btf_encoder.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/btf_encoder.c b/btf_encoder.c
index 0bc2334..b1e64d1 100644
--- a/btf_encoder.c
+++ b/btf_encoder.c
@@ -98,6 +98,7 @@ struct elf_function {
 	size_t		prefixlen;
 	bool		kfunc;
 	uint32_t	kfunc_flags;
+	uint64_t	addr;
 };
 
 struct elf_secinfo {
@@ -1461,6 +1462,7 @@ static void elf_functions__collect_function(struct elf_functions *functions, GEl
 
 	func = &functions->entries[functions->cnt];
 	func->name = name;
+	func->addr = elf_sym__value(sym);
 	if (strchr(name, '.')) {
 		const char *suffix = strchr(name, '.');
 
-- 
2.39.3





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux