Skip to content

Commit

Permalink
contrib: Changes to checks for PowerPC64
Browse files Browse the repository at this point in the history
Changes from bitcoin#14066.
  • Loading branch information
luke-jr authored and laanwj committed Nov 20, 2020
1 parent 8c3b297 commit e6441c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions contrib/devtools/security-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ def check_ELF_separate_code(executable):
b'.data': R | W,
b'.bss': R | W,
}
if elf.hdr.e_machine == pixie.EM_PPC64:
# .plt is RW on ppc64 even with separate-code
EXPECTED_FLAGS[b'.plt'] = R | W
# For all LOAD program headers get mapping to the list of sections,
# and for each section, remember the flags of the associated program header.
flags_per_section = {}
Expand Down
3 changes: 3 additions & 0 deletions contrib/devtools/symbol-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
'ld-linux.so.2', # 32-bit dynamic linker
'ld-linux-aarch64.so.1', # 64-bit ARM dynamic linker
'ld-linux-armhf.so.3', # 32-bit ARM dynamic linker
'ld64.so.1', # POWER64 ABIv1 dynamic linker
'ld64.so.2', # POWER64 ABIv2 dynamic linker
'ld-linux-riscv64-lp64d.so.1', # 64-bit RISC-V dynamic linker
# bitcoin-qt only
'libxcb.so.1', # part of X11
Expand All @@ -80,6 +82,7 @@
pixie.EM_X86_64: (2,2,5),
pixie.EM_ARM: (2,4),
pixie.EM_AARCH64:(2,17),
pixie.EM_PPC64: (2,17),
pixie.EM_RISCV: (2,27)
}

Expand Down

0 comments on commit e6441c6

Please sign in to comment.