Lines Matching refs:elf
20 #include ELFUTILS_HEADER(elf)
58 test (Elf *elf, int class, bool layout) in test() argument
62 check_elf ("gelf_newehdr", gelf_newehdr (elf, class) != 0); in test()
63 check_elf ("gelf_getclass", gelf_getclass (elf) == class); in test()
65 check_elf ("elf_flagelf", elf_flagelf (elf, layout ? ELF_C_SET : ELF_C_CLR, in test()
69 check_elf ("gelf_getehdr", gelf_getehdr (elf, &ehdr) != NULL); in test()
76 check_elf ("elf_getshdrnum", elf_getshdrnum (elf, &shnum) == 0); in test()
80 check_elf ("elf_getphdrnum", elf_getphdrnum (elf, &phnum) == 0); in test()
88 check_elf ("gelf_update_ehdr", gelf_update_ehdr (elf, &ehdr) != 0); in test()
90 check_elf ("elf_update", elf_update (elf, ELF_C_NULL) > 0); in test()
92 check_elf ("gelf_getehdr", gelf_getehdr (elf, &ehdr) != NULL); in test()
102 check_elf ("elf_getshdrnum", elf_getshdrnum (elf, &shnum) == 0); in test()
105 check_elf ("elf_getphdrnum", elf_getphdrnum (elf, &phnum) == 0); in test()
109 check_elf ("elf_newscn", elf_newscn (elf) != NULL); in test()
110 check_elf ("gelf_newphdr", gelf_newphdr (elf, 1) != 0); in test()
116 check_elf ("gelf_getehdr", gelf_getehdr (elf, &ehdr) != NULL); in test()
121 check_elf ("gelf_update_ehdr", gelf_update_ehdr (elf, &ehdr) != 0); in test()
124 check_elf ("elf_update", elf_update (elf, ELF_C_NULL) > 0); in test()
126 check_elf ("elf_getshdrnum", elf_getshdrnum (elf, &shnum) == 0); in test()
129 check_elf ("elf_getphdrnum", elf_getphdrnum (elf, &phnum) != 0); in test()
132 check_elf ("gelf_getehdr", gelf_getehdr (elf, &ehdr) != NULL); in test()
158 Elf *elf; in main() local
160 elf = elf_begin (fd, ELF_C_WRITE, NULL); in main()
161 check_elf ("elf_begin", elf != NULL); in main()
162 test (elf, ELFCLASS32, false); in main()
163 elf_end (elf); in main()
165 elf = elf_begin (fd, ELF_C_WRITE, NULL); in main()
166 check_elf ("elf_begin", elf != NULL); in main()
167 test (elf, ELFCLASS32, true); in main()
168 elf_end (elf); in main()
170 elf = elf_begin (fd, ELF_C_WRITE, NULL); in main()
171 check_elf ("elf_begin", elf != NULL); in main()
172 test (elf, ELFCLASS64, false); in main()
173 elf_end (elf); in main()
175 elf = elf_begin (fd, ELF_C_WRITE, NULL); in main()
176 check_elf ("elf_begin", elf != NULL); in main()
177 test (elf, ELFCLASS64, true); in main()
178 elf_end (elf); in main()