forked from qmonnet/rbpf
-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve unresolved symbol error reporting (#8)
- Loading branch information
Showing
10 changed files
with
171 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash -ex | ||
|
||
# Requires Latest release of Solana's custom LLVM | ||
#https://github.com/solana-labs/llvm-builder/releases | ||
|
||
LLVM_DIR=../../../solana/sdk/bpf/llvm-native/bin/ | ||
|
||
"$LLVM_DIR"clang -Werror -target bpf -O2 -emit-llvm -fno-builtin -fPIC -o noop.bc -c noop.c | ||
"$LLVM_DIR"llc -march=bpf -filetype=obj -o noop.o noop.bc | ||
"$LLVM_DIR"ld.lld -z notext -shared --Bdynamic -o noop.so noop.o | ||
rm noop.bc | ||
rm noop.o | ||
|
||
"$LLVM_DIR"clang -Werror -target bpf -O2 -emit-llvm -fno-builtin -fPIC -o unresolved_helper.bc -c unresolved_helper.c | ||
"$LLVM_DIR"llc -march=bpf -filetype=obj -o unresolved_helper.o unresolved_helper.bc | ||
"$LLVM_DIR"ld.lld -z notext -shared --Bdynamic -o unresolved_helper.so unresolved_helper.o | ||
rm unresolved_helper.bc | ||
rm unresolved_helper.o |
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/** | ||
* @brief test program | ||
*/ | ||
|
||
typedef unsigned char uint8_t; | ||
typedef unsigned long int uint64_t; | ||
|
||
extern void log(const char*); | ||
extern void log_64(uint64_t, uint64_t, uint64_t, uint64_t, uint64_t); | ||
|
||
extern uint64_t entrypoint(const uint8_t *input) { | ||
log("message"); | ||
log_64(1, 2, 3, 4, 5); | ||
return 0; | ||
} |
Binary file not shown.
Oops, something went wrong.