Skip to content

Commit

Permalink
Merge pull request iovisor#1411 from iovisor/yhs_dev
Browse files Browse the repository at this point in the history
bpf: fix a couple of issues related to arm64
  • Loading branch information
4ast authored Oct 26, 2017
2 parents 3d51c0f + 7abe63a commit 1e7dc39
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmake/clang_libs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if (${_llvm_coroutines} GREATER -1)
list(APPEND llvm_raw_libs coroutines)
endif()
if (${LLVM_PACKAGE_VERSION} VERSION_GREATER "5")
list(APPEND llvm_raw_libs bpfasmparser)
list(APPEND llvm_raw_libs bpfdisassembler)
endif()
llvm_map_components_to_libnames(_llvm_libs ${llvm_raw_libs})
Expand Down
2 changes: 2 additions & 0 deletions src/cc/bcc_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ static int load_ld_cache(const char *cache_path) {
#define ABI_X8664_LIB64 0x0300
#define ABI_S390_LIB64 0x0400
#define ABI_POWERPC_LIB64 0x0500
#define ABI_AARCH64_LIB64 0x0a00

static bool match_so_flags(int flags) {
if ((flags & FLAG_TYPE_MASK) != TYPE_ELF_LIBC6)
Expand All @@ -322,6 +323,7 @@ static bool match_so_flags(int flags) {
case ABI_X8664_LIB64:
case ABI_S390_LIB64:
case ABI_POWERPC_LIB64:
case ABI_AARCH64_LIB64:
return (sizeof(void *) == 8);
}

Expand Down
1 change: 1 addition & 0 deletions src/cc/bpf_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ BPFModule::BPFModule(unsigned flags, TableStorage *ts)
LLVMInitializeBPFTargetInfo();
LLVMInitializeBPFAsmPrinter();
#if LLVM_MAJOR_VERSION >= 6
LLVMInitializeBPFAsmParser();
if (flags & DEBUG_SOURCE)
LLVMInitializeBPFDisassembler();
#endif
Expand Down

0 comments on commit 1e7dc39

Please sign in to comment.