Browse code

walkVersym(): display the linked section.

Xavier G authored on 23/08/2015 23:29:47
Showing 1 changed files
... ...
@@ -3289,6 +3289,9 @@ sub walkVersym {
3289 3289
 	my $section = $elf_data->{'sections'}->{$section_index};
3290 3290
 	return if (!defined($section));
3291 3291
 
3292
+	my $dynsym = displayLinkedSection($ind, $elf_data, $section_index);
3293
+	my $dynsym_index = defined($dynsym) ? $dynsym->{'_index'} : undef;
3294
+
3292 3295
 	# How many entries do we intend to read?
3293 3296
 	my $count = $section->{'sh_size'} / $section->{'sh_entsize'};
3294 3297
 	# Note: sh_entsize is expected to be 2 bytes (16 bits) as the LSB states
... ...
@@ -3308,7 +3311,7 @@ sub walkVersym {
3308 3311
 			next;
3309 3312
 		}
3310 3313
 
3311
-		my $symbol = symbolFromIndex($elf_data, $i);
3314
+		my $symbol = symbolFromIndex($elf_data, $i, $dynsym_index);
3312 3315
 
3313 3316
 		my $value = readELFValue($elf_fh, 'Half');
3314 3317
 		my $printable_value = colored(formatValue($value, 'Half'), 'value');