projects
/
pyelftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a98d47
)
Only byteswap the little endian version of mips64 r_raw_info (#297)
author
Audrey Dutcher
<audrey@rhelmot.io>
Sat, 14 Mar 2020 12:28:12 +0000
(
05:28
-0700)
committer
GitHub
<noreply@github.com>
Sat, 14 Mar 2020 12:28:12 +0000
(
05:28
-0700)
elftools/elf/structs.py
patch
|
blob
|
history
diff --git
a/elftools/elf/structs.py
b/elftools/elf/structs.py
index 6fc05da4bcb767c8a650a84ae56397e6b4152fc2..2fb56a7a0caf7cc1648d2b28741d27183a1120e2 100644
(file)
--- a/
elftools/elf/structs.py
+++ b/
elftools/elf/structs.py
@@
-237,6
+237,9
@@
class ELFStructs(object):
def compute_r_info(ctx):
raw = ctx['r_raw_info']
+ if not self.little_endian:
+ return raw
+ # little endian requires an additional byteswap
return (((raw & 0xffffffff) << 32)
| ((raw >> 56) & 0xff)
| ((raw >> 40) & 0xff00)