File tree 1 file changed +6
-13
lines changed
1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -545,21 +545,14 @@ def _populate_symbols(self):
545
545
continue
546
546
547
547
for symbol in section .iter_symbols ():
548
- if not symbol .entry .st_value :
548
+ value = symbol .entry .st_value
549
+ if not value :
549
550
continue
551
+ self .symbols [symbol .name ] = value
550
552
551
- self .symbols [symbol .name ] = symbol .entry .st_value
552
-
553
- # Add 'plt.foo' and 'got.foo' to the symbols for entries,
554
- # iff there is no symbol for that address
555
- for sym , addr in self .plt .items ():
556
- if addr not in self .symbols .values ():
557
- self .symbols ['plt.%s' % sym ] = addr
558
-
559
- for sym , addr in self .got .items ():
560
- if addr not in self .symbols .values ():
561
- self .symbols ['got.%s' % sym ] = addr
562
-
553
+ # Add 'plt.foo' and 'got.foo' to the symbols for entries
554
+ self .symbols .update ({'plt.%s' % sym : addr for sym , addr in self .plt .items ()})
555
+ self .symbols .update ({'got.%s' % sym : addr for sym , addr in self .got .items ()})
563
556
564
557
def _populate_got_plt (self ):
565
558
"""Loads the GOT and the PLT symbols and addresses.
You can’t perform that action at this time.
0 commit comments