Skip to content

Commit

Permalink
[BugFix] Fix BFD initialization error on aarch64 (backport #54372) (#…
Browse files Browse the repository at this point in the history
…54434)

Co-authored-by: qingzhongli <[email protected]>
  • Loading branch information
mergify[bot] and qingzhongli authored Dec 27, 2024
1 parent d9d0a8e commit 33cc3be
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions be/src/util/bfd_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,17 @@ void BfdParser::init_bfd() {
}
std::lock_guard<std::mutex> lock(_bfd_mutex);
bfd_init();
#if defined(__x86_64__)
if (!bfd_set_default_target("elf64-x86-64")) {
LOG(ERROR) << "set default target to elf64-x86-64 failed.";
}
#elif defined(__aarch64__)
if (!bfd_set_default_target("elf64-littleaarch64")) {
LOG(ERROR) << "set default target to elf64-littleaarch64 failed.";
}
#else
#error "Not supported architecture"
#endif
_is_bfd_inited = true;
}

Expand Down

0 comments on commit 33cc3be

Please sign in to comment.