Ver código fonte

btf: remove object::pod usage

Alessandro Decina 4 anos atrás
pai
commit
fd0ba2355d
3 arquivos alterados com 0 adições e 10 exclusões
  1. 0 5
      src/bpf.rs
  2. 0 3
      src/obj/btf/btf.rs
  3. 0 2
      src/obj/btf/types.rs

+ 0 - 5
src/bpf.rs

@@ -7,15 +7,12 @@ use std::{
 use thiserror::Error;
 
 use crate::{
-    generated::bpf_insn,
     maps::{Map, MapError},
     obj::{Object, ParseError, RelocationError},
     programs::{KProbe, Program, ProgramData, ProgramError, SocketFilter, TracePoint, UProbe, Xdp},
     syscalls::bpf_map_update_elem_ptr,
 };
 
-unsafe impl object::Pod for bpf_insn {}
-
 pub(crate) const BPF_OBJ_NAME_LEN: usize = 16;
 
 /* FIXME: these are arch dependent */
@@ -45,8 +42,6 @@ pub(crate) struct bpf_map_def {
     pub(crate) map_flags: u32,
 }
 
-unsafe impl object::Pod for bpf_map_def {}
-
 #[derive(Debug)]
 pub struct Bpf {
     maps: HashMap<String, RefCell<Map>>,

+ 0 - 3
src/obj/btf/btf.rs

@@ -11,9 +11,6 @@ use crate::generated::{btf_ext_header, btf_header};
 
 use super::{BtfType, Relocation};
 
-unsafe impl object::pod::Pod for btf_header {}
-unsafe impl object::pod::Pod for btf_ext_header {}
-
 pub(crate) const MAX_RESOLVE_DEPTH: u8 = 32;
 pub(crate) const MAX_SPEC_LEN: usize = 64;
 

+ 0 - 2
src/obj/btf/types.rs

@@ -14,8 +14,6 @@ use crate::{
     obj::btf::{Btf, BtfError, MAX_RESOLVE_DEPTH},
 };
 
-unsafe impl object::pod::Pod for btf_type {}
-
 #[derive(Clone, Debug)]
 pub(crate) enum BtfType {
     Unknown,