From 18b3d75d096e3c90f8c5b2f7292637a3369f96a6 Mon Sep 17 00:00:00 2001 From: Mary Date: Wed, 10 May 2023 15:52:12 +0200 Subject: [PATCH] aya-obj: Fix ProgramSection::from_str for bss and rodata sections --- aya-obj/src/obj.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/aya-obj/src/obj.rs b/aya-obj/src/obj.rs index db1c50d9..d22a0dea 100644 --- a/aya-obj/src/obj.rs +++ b/aya-obj/src/obj.rs @@ -1093,11 +1093,12 @@ impl BpfSectionKind { BpfSectionKind::BtfMaps } else if name.starts_with(".text") { BpfSectionKind::Text - } else if name.starts_with(".bss") - || name.starts_with(".data") - || name.starts_with(".rodata") - { + } else if name.starts_with(".bss") { + BpfSectionKind::Bss + } else if name.starts_with(".data") { BpfSectionKind::Data + } else if name.starts_with(".rodata") { + BpfSectionKind::Rodata } else if name == ".BTF" { BpfSectionKind::Btf } else if name == ".BTF.ext" {