#include "ft_nm.h" int is_sym_text(char *name) { if (name && !strcmp(name, ".text")) return 1; if (name && !strcmp(name, ".init")) return 1; if (name && !strcmp(name, ".fini")) return 1; if (name && !strncmp(name, ".plt", 4)) return 1; return 0; } int is_sym_text2(char *name) { if (name && !strcmp(name, ".shstrtab")) return 1; if (name && !strcmp(name, ".strtab")) return 1; if (name && !strcmp(name, ".symtab")) return 1; return 0; } int is_sym_dynamic(char *name) { if (name && !strcmp(name, ".dynamic")) return 1; if (name && !strncmp(name, ".got", 4)) return 1; return 0; } int is_sym_bss(char *name) { if (name && !strncmp(name, ".bss", 4)) return 1; return 0; } int is_sym_data(char *name) { if (name && !strcmp(name, ".data")) return 1; if (name && !strncmp(name, ".sdata", 6)) return 1; if (name && !strncmp(name, ".sbss", 5)) return 1; return 0; } int is_sym_uninit(char *name) { if (name && !strcmp(name, ".uninit")) return 1; return 0; } int is_sym_debug(char *name) { if (name && !strncmp(name, ".debug", 6)) return 1; if (name && !strncmp(name, ".stab", 5)) return 1; if (name && !strncmp(name, ".zdebug", 7)) return 1; if (name && !strncmp(name, ".gdb", 4)) return 1; return 0; } int is_sec_read_only(char *name) { if (name && !strcmp(name, ".comment")) return 1; if (name && !strcmp(name, ".group")) return 1; if (name && !strncmp(name, ".note", 5)) return 1; if (name && !strncmp(name, ".gnu", 4)) return 1; return 0; } int is_sec_read_only2(char *name) { if (name && !strncmp(name, ".annobin", 8)) return 1; return 0; }