[patch] Fix bias for vDSOs from core files

Jan Kratochvil jan.kratochvil at redhat.com
Tue Oct 9 05:57:01 UTC 2012


On Mon, 08 Oct 2012 21:58:36 +0200, Roland McGrath wrote:
> Can you produce a more isolated test case for that?
> One that doesn't involve other code not already in elfutils.

Patch has dependency on:
	[patch] Improve ELF symbols preference (global > weak)
	https://lists.fedorahosted.org/pipermail/elfutils-devel/2012-October/002648.html


Thanks,
Jan


libdwfl/
2012-10-08  Jan Kratochvil  <jan.kratochvil at redhat.com>

	* dwfl_segment_report_module.c (dwfl_segment_report_module):
	Initialize mod->MAIN_BIAS.

tests/
2012-10-09  Jan Kratochvil  <jan.kratochvil at redhat.com>

	* run-addrname-test.sh: New test for core vDSO bias.
	* testfile65.bz5: New file.

diff --git a/libdwfl/dwfl_segment_report_module.c b/libdwfl/dwfl_segment_report_module.c
index afe9da1..7cf7499 100644
--- a/libdwfl/dwfl_segment_report_module.c
+++ b/libdwfl/dwfl_segment_report_module.c
@@ -650,6 +650,7 @@ dwfl_segment_report_module (Dwfl *dwfl, int ndx, const char *name,
       mod->main.elf = elf;
       mod->main.vaddr = module_start - bias;
       mod->main.address_sync = module_address_sync;
+      mod->main_bias = bias;
     }
 
   return finish ();
diff --git a/tests/run-addrname-test.sh b/tests/run-addrname-test.sh
index 034cf6f..4feb193 100755
--- a/tests/run-addrname-test.sh
+++ b/tests/run-addrname-test.sh
@@ -292,4 +292,10 @@ l0local2
 ??:0
 EOF
 
+testfiles testfile65
+testrun_compare ../src/addr2line -S --core=testfile65 0x7fff94bffa30 <<\EOF
+__vdso_time
+??:0
+EOF
+
 exit 0
diff --git a/tests/testfile65.bz2 b/tests/testfile65.bz2
new file mode 100644
index 0000000000000000000000000000000000000000..5e925f87b7efbeb002d7f723ff05d8dcb2dbd11b
GIT binary patch
literal 4674
zcmV-I620w0T4*^jL0KkKSw1B$7XTGG|NsC0_3!`x|NsC0|NsC0|NsB*=l$;Q_5J<!
z-+q35`~Tn&e|wB~U~8>(Y9;A_^f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