From f74ad7eb4c6439948d8f2781da3744ed0cd56165 Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Fri, 3 Apr 2009 11:56:03 -0300 Subject: [PATCH] elf_symtab: Add elf_sym__section helper Signed-off-by: Arnaldo Carvalho de Melo --- elf_symtab.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/elf_symtab.h b/elf_symtab.h index b64c4be..f8face6 100644 --- a/elf_symtab.h +++ b/elf_symtab.h @@ -40,6 +40,11 @@ static inline uint8_t elf_sym__type(const GElf_Sym *sym) return GELF_ST_TYPE(sym->st_info); } +static inline uint16_t elf_sym__section(const GElf_Sym *sym) +{ + return sym->st_shndx; +} + static inline uint8_t elf_sym__bind(const GElf_Sym *sym) { return GELF_ST_BIND(sym->st_info);