4
0

two_progs.rs 394 B

123456789101112131415161718192021
  1. // Two programs in the same ELF section
  2. #![no_std]
  3. #![no_main]
  4. use aya_bpf::{macros::tracepoint, programs::TracePointContext};
  5. #[tracepoint]
  6. pub fn test_tracepoint_one(_ctx: TracePointContext) -> u32 {
  7. 0
  8. }
  9. #[tracepoint]
  10. pub fn test_tracepoint_two(_ctx: TracePointContext) -> u32 {
  11. 0
  12. }
  13. #[cfg(not(test))]
  14. #[panic_handler]
  15. fn panic(_info: &core::panic::PanicInfo) -> ! {
  16. loop {}
  17. }