Skip to content

Commit

Permalink
fix: Link with -melf_ on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
quantumsheep committed Jul 19, 2020
1 parent fea16c4 commit 0ba4a50
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions include/san/Linker.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,16 @@ class Linker
}
else if (os == "linux" || os == "darwin")
{
raw_args.push_back("-arch");
raw_args.push_back(arch.c_str());
if (os == "linux")
{
raw_args.push_back("-m");
raw_args.push_back(copy_str("elf_" + arch));
}
else if (os == "darwin")
{
raw_args.push_back("-arch");
raw_args.push_back(arch.c_str());
}

for (auto &library : libraries)
{
Expand Down

0 comments on commit 0ba4a50

Please sign in to comment.