Commit 1f607504 authored by Alexei Starovoitov's avatar Alexei Starovoitov

Merge branch 'libbpf-global-vars'

Andrii Nakryiko says:

====================
This patch set salvages all the non-extern-specific changes out of blocked
externs patch set ([0]). In addition to small clean ups, it also refactors
libbpf's handling of relocations and allows support for global (non-static)
variables.

  [0] https://patchwork.ozlabs.org/project/netdev/list/?series=143358&state=*
====================
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parents a8fdaad5 393cdfbe
This diff is collapsed.
......@@ -161,7 +161,7 @@ $(OUTPUT)/flow_dissector_load.o: flow_dissector_load.h
define CLANG_BPF_BUILD_RULE
($(CLANG) $3 -O2 -target bpf -emit-llvm \
-c $1 -o - || echo "BPF obj compilation failed") | \
$(LLC) -march=bpf -mcpu=probe $4 -filetype=obj -o $2
$(LLC) -mattr=dwarfris -march=bpf -mcpu=probe $4 -filetype=obj -o $2
endef
# Similar to CLANG_BPF_BUILD_RULE, but with disabled alu32
define CLANG_NOALU32_BPF_BUILD_RULE
......
......@@ -8,10 +8,10 @@
char _license[] SEC("license") = "GPL";
static volatile struct data {
struct {
char in[256];
char out[256];
} data;
} data = {};
struct core_reloc_arrays_output {
int a2;
......
......@@ -8,10 +8,10 @@
char _license[] SEC("license") = "GPL";
static volatile struct data {
struct {
char in[256];
char out[256];
} data;
} data = {};
struct core_reloc_bitfields {
/* unsigned bitfields */
......
......@@ -8,10 +8,10 @@
char _license[] SEC("license") = "GPL";
static volatile struct data {
struct {
char in[256];
char out[256];
} data;
} data = {};
struct core_reloc_bitfields {
/* unsigned bitfields */
......
......@@ -8,10 +8,10 @@
char _license[] SEC("license") = "GPL";
static volatile struct data {
struct {
char in[256];
char out[256];
} data;
} data = {};
struct core_reloc_existence_output {
int a_exists;
......
......@@ -8,10 +8,10 @@
char _license[] SEC("license") = "GPL";
static volatile struct data {
struct {
char in[256];
char out[256];
} data;
} data = {};
struct core_reloc_flavors {
int a;
......
......@@ -8,10 +8,10 @@
char _license[] SEC("license") = "GPL";
static volatile struct data {
struct {
char in[256];
char out[256];
} data;
} data = {};
struct core_reloc_ints {
uint8_t u8_field;
......
......@@ -8,10 +8,10 @@
char _license[] SEC("license") = "GPL";
static volatile struct data {
struct {
char in[256];
char out[256];
} data;
} data = {};
struct core_reloc_kernel_output {
int valid[10];
......
......@@ -8,10 +8,10 @@
char _license[] SEC("license") = "GPL";
static volatile struct data {
struct {
char in[256];
char out[256];
} data;
} data = {};
struct core_reloc_misc_output {
int a, b, c;
......
......@@ -8,10 +8,10 @@
char _license[] SEC("license") = "GPL";
static volatile struct data {
struct {
char in[256];
char out[256];
} data;
} data = {};
struct core_reloc_mods_output {
int a, b, c, d, e, f, g, h;
......
......@@ -8,10 +8,10 @@
char _license[] SEC("license") = "GPL";
static volatile struct data {
struct {
char in[256];
char out[256];
} data;
} data = {};
struct core_reloc_nesting_substruct {
int a;
......
......@@ -8,10 +8,10 @@
char _license[] SEC("license") = "GPL";
static volatile struct data {
struct {
char in[256];
char out[256];
} data;
} data = {};
enum core_reloc_primitives_enum {
A = 0,
......
......@@ -8,10 +8,10 @@
char _license[] SEC("license") = "GPL";
static volatile struct data {
struct {
char in[256];
char out[256];
} data;
} data = {};
struct core_reloc_ptr_as_arr {
int a;
......
......@@ -8,10 +8,10 @@
char _license[] SEC("license") = "GPL";
static volatile struct data {
struct {
char in[256];
char out[256];
} data;
} data = {};
struct core_reloc_size_output {
int int_sz;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment