Fix shared object relcations with multiple static arrays (#2121)
This commit is contained in:
10
programs/bpf/c/src/multiple_static.c
Normal file
10
programs/bpf/c/src/multiple_static.c
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#include <solana_sdk.h>
|
||||||
|
|
||||||
|
static const char msg[] = "This is a message";
|
||||||
|
static const char msg2[] = "This is a different message";
|
||||||
|
|
||||||
|
extern bool entrypoint(const uint8_t *input) {
|
||||||
|
sol_log((char*)msg);
|
||||||
|
sol_log((char*)msg2);
|
||||||
|
return true;
|
||||||
|
}
|
@ -32,7 +32,7 @@ if [[ ! -r criterion-$machine-$version.md ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Install LLVM
|
# Install LLVM
|
||||||
version=v0.0.6
|
version=v0.0.7
|
||||||
if [[ ! -f llvm-native-$machine-$version.md ]]; then
|
if [[ ! -f llvm-native-$machine-$version.md ]]; then
|
||||||
(
|
(
|
||||||
filename=solana-llvm-$machine.tar.bz2
|
filename=solana-llvm-$machine.tar.bz2
|
||||||
|
@ -299,7 +299,13 @@ fn test_program_builtin_bpf_noop() {
|
|||||||
fn test_program_bpf_c() {
|
fn test_program_bpf_c() {
|
||||||
logger::setup();
|
logger::setup();
|
||||||
|
|
||||||
let programs = ["noop", "struct_pass", "struct_ret", "noop++"];
|
let programs = [
|
||||||
|
"noop",
|
||||||
|
"noop++",
|
||||||
|
"struct_pass",
|
||||||
|
"struct_ret",
|
||||||
|
"multiple_static",
|
||||||
|
];
|
||||||
for program in programs.iter() {
|
for program in programs.iter() {
|
||||||
println!("Test program: {:?}", program);
|
println!("Test program: {:?}", program);
|
||||||
let mut file = File::open(create_bpf_path(program)).expect("file open failed");
|
let mut file = File::open(create_bpf_path(program)).expect("file open failed");
|
||||||
|
Reference in New Issue
Block a user