• Home
  • Raw
  • Download

Lines Matching refs:reader

35 void checkHeader( elfio&        reader,  in checkHeader()  argument
49 BOOST_CHECK_EQUAL( reader.get_class(), nClass ); in checkHeader()
50 BOOST_CHECK_EQUAL( reader.get_encoding(), encoding ); in checkHeader()
51 BOOST_CHECK_EQUAL( reader.get_elf_version(), elfVersion ); in checkHeader()
52 BOOST_CHECK_EQUAL( reader.get_os_abi(), OSABI ); in checkHeader()
53 BOOST_CHECK_EQUAL( reader.get_abi_version(), ABIVersion ); in checkHeader()
54 BOOST_CHECK_EQUAL( reader.get_type(), type ); in checkHeader()
55 BOOST_CHECK_EQUAL( reader.get_machine(), machine ); in checkHeader()
56 BOOST_CHECK_EQUAL( reader.get_version(), version ); in checkHeader()
57 BOOST_CHECK_EQUAL( reader.get_entry(), entry ); in checkHeader()
58 BOOST_CHECK_EQUAL( reader.get_flags(), flags ); in checkHeader()
59 BOOST_CHECK_EQUAL( reader.sections.size(), secNum ); in checkHeader()
60 BOOST_CHECK_EQUAL( reader.segments.size(), segNum ); in checkHeader()
204 elfio reader; in BOOST_AUTO_TEST_CASE() local
205 BOOST_REQUIRE_EQUAL( reader.load( "elf_examples/hello_32" ), true ); in BOOST_AUTO_TEST_CASE()
206 checkHeader( reader, ELFCLASS32, ELFDATA2LSB, EV_CURRENT, ET_EXEC, EM_386, in BOOST_AUTO_TEST_CASE()
211 section* sec = reader.sections[0]; in BOOST_AUTO_TEST_CASE()
214 sec = reader.sections[1]; in BOOST_AUTO_TEST_CASE()
218 sec = reader.sections[9]; in BOOST_AUTO_TEST_CASE()
222 sec = reader.sections[19]; in BOOST_AUTO_TEST_CASE()
226 sec = reader.sections[27]; in BOOST_AUTO_TEST_CASE()
229 const section* sec1 = reader.sections[".strtab"]; in BOOST_AUTO_TEST_CASE()
234 segment* seg = reader.segments[0]; in BOOST_AUTO_TEST_CASE()
238 seg = reader.segments[4]; in BOOST_AUTO_TEST_CASE()
242 seg = reader.segments[6]; in BOOST_AUTO_TEST_CASE()
247 sec = reader.sections[".symtab"]; in BOOST_AUTO_TEST_CASE()
249 symbol_section_accessor sr( reader, sec ); in BOOST_AUTO_TEST_CASE()
267 sec = reader.sections[".rel.dyn"]; in BOOST_AUTO_TEST_CASE()
269 relocation_section_accessor reloc( reader, sec ); in BOOST_AUTO_TEST_CASE()
275 sec = reader.sections[".rel.plt"]; in BOOST_AUTO_TEST_CASE()
277 relocation_section_accessor reloc1( reader, sec ); in BOOST_AUTO_TEST_CASE()
289 sec = reader.sections[".note.ABI-tag"]; in BOOST_AUTO_TEST_CASE()
291 note_section_accessor notes( reader, sec ); in BOOST_AUTO_TEST_CASE()
300 elfio reader; in BOOST_AUTO_TEST_CASE() local
302 BOOST_REQUIRE_EQUAL( reader.load( "elf_examples/hello_64" ), true ); in BOOST_AUTO_TEST_CASE()
306 checkHeader( reader, ELFCLASS64, ELFDATA2LSB, EV_CURRENT, ET_EXEC, in BOOST_AUTO_TEST_CASE()
311 section* sec = reader.sections[0]; in BOOST_AUTO_TEST_CASE()
315 sec = reader.sections[1]; in BOOST_AUTO_TEST_CASE()
320 sec = reader.sections[9]; in BOOST_AUTO_TEST_CASE()
325 sec = reader.sections[20]; in BOOST_AUTO_TEST_CASE()
330 sec = reader.sections[28]; in BOOST_AUTO_TEST_CASE()
334 const section* sec1 = reader.sections[".strtab"]; in BOOST_AUTO_TEST_CASE()
339 segment* seg = reader.segments[0]; in BOOST_AUTO_TEST_CASE()
343 seg = reader.segments[2]; in BOOST_AUTO_TEST_CASE()
348 seg = reader.segments[7]; in BOOST_AUTO_TEST_CASE()
353 sec = reader.sections[".symtab"]; in BOOST_AUTO_TEST_CASE()
355 symbol_section_accessor sr( reader, sec ); in BOOST_AUTO_TEST_CASE()
375 sec = reader.sections[".rela.dyn"]; in BOOST_AUTO_TEST_CASE()
377 relocation_section_accessor reloc( reader, sec ); in BOOST_AUTO_TEST_CASE()
383 sec = reader.sections[".rela.plt"]; in BOOST_AUTO_TEST_CASE()
385 relocation_section_accessor reloc1( reader, sec ); in BOOST_AUTO_TEST_CASE()
395 sec = reader.sections[".note.ABI-tag"]; in BOOST_AUTO_TEST_CASE()
397 note_section_accessor notes( reader, sec ); in BOOST_AUTO_TEST_CASE()
406 elfio reader; in BOOST_AUTO_TEST_CASE() local
408 BOOST_REQUIRE_EQUAL( reader.load( "elf_examples/hello_64.o" ), true ); in BOOST_AUTO_TEST_CASE()
412 checkHeader( reader, ELFCLASS64, ELFDATA2LSB, EV_CURRENT, ET_REL, EM_X86_64, in BOOST_AUTO_TEST_CASE()
417 section* sec = reader.sections[0]; in BOOST_AUTO_TEST_CASE()
421 sec = reader.sections[1]; in BOOST_AUTO_TEST_CASE()
426 section* sec1 = reader.sections[".text"]; in BOOST_AUTO_TEST_CASE()
429 sec = reader.sections[12]; in BOOST_AUTO_TEST_CASE()
432 sec1 = reader.sections[".strtab"]; in BOOST_AUTO_TEST_CASE()
437 sec = reader.sections[".symtab"]; in BOOST_AUTO_TEST_CASE()
439 symbol_section_accessor sr( reader, sec ); in BOOST_AUTO_TEST_CASE()
447 sec = reader.sections[".rela.text"]; in BOOST_AUTO_TEST_CASE()
449 relocation_section_accessor reloc( reader, sec ); in BOOST_AUTO_TEST_CASE()
456 sec = reader.sections[".rela.eh_frame"]; in BOOST_AUTO_TEST_CASE()
458 relocation_section_accessor reloc1( reader, sec ); in BOOST_AUTO_TEST_CASE()
467 elfio reader; in BOOST_AUTO_TEST_CASE() local
469 BOOST_REQUIRE_EQUAL( reader.load( "elf_examples/hello_32.o" ), true ); in BOOST_AUTO_TEST_CASE()
473 checkHeader( reader, ELFCLASS32, ELFDATA2LSB, EV_CURRENT, ET_REL, EM_386, 1, in BOOST_AUTO_TEST_CASE()
478 section* sec = reader.sections[0]; in BOOST_AUTO_TEST_CASE()
482 sec = reader.sections[1]; in BOOST_AUTO_TEST_CASE()
487 section* sec1 = reader.sections[".text"]; in BOOST_AUTO_TEST_CASE()
490 sec = reader.sections[10]; in BOOST_AUTO_TEST_CASE()
494 sec1 = reader.sections[".strtab"]; in BOOST_AUTO_TEST_CASE()
499 sec = reader.sections[".symtab"]; in BOOST_AUTO_TEST_CASE()
501 symbol_section_accessor sr( reader, sec ); in BOOST_AUTO_TEST_CASE()
509 sec = reader.sections[".rel.text"]; in BOOST_AUTO_TEST_CASE()
511 relocation_section_accessor reloc( reader, sec ); in BOOST_AUTO_TEST_CASE()
521 elfio reader; in BOOST_AUTO_TEST_CASE() local
523 BOOST_REQUIRE_EQUAL( reader.load( "elf_examples/test_ppc.o" ), true ); in BOOST_AUTO_TEST_CASE()
527 checkHeader( reader, ELFCLASS32, ELFDATA2MSB, EV_CURRENT, ET_REL, EM_PPC, 1, in BOOST_AUTO_TEST_CASE()
532 section* sec = reader.sections[0]; in BOOST_AUTO_TEST_CASE()
536 sec = reader.sections[1]; in BOOST_AUTO_TEST_CASE()
541 section* sec1 = reader.sections[".text"]; in BOOST_AUTO_TEST_CASE()
544 sec = reader.sections[15]; in BOOST_AUTO_TEST_CASE()
548 sec1 = reader.sections[".strtab"]; in BOOST_AUTO_TEST_CASE()
553 sec = reader.sections[".symtab"]; in BOOST_AUTO_TEST_CASE()
555 symbol_section_accessor sr( reader, sec ); in BOOST_AUTO_TEST_CASE()
565 sec = reader.sections[".rela.text"]; in BOOST_AUTO_TEST_CASE()
567 relocation_section_accessor reloc( reader, sec ); in BOOST_AUTO_TEST_CASE()
574 sec = reader.sections[".rela.ctors"]; in BOOST_AUTO_TEST_CASE()
576 relocation_section_accessor reloc1( reader, sec ); in BOOST_AUTO_TEST_CASE()
581 sec = reader.sections[".rela.eh_frame"]; in BOOST_AUTO_TEST_CASE()
583 relocation_section_accessor reloc2( reader, sec ); in BOOST_AUTO_TEST_CASE()
592 elfio reader; in BOOST_AUTO_TEST_CASE() local
594 BOOST_REQUIRE_EQUAL( reader.load( "elf_examples/test_ppc" ), true ); in BOOST_AUTO_TEST_CASE()
598 checkHeader( reader, ELFCLASS32, ELFDATA2MSB, EV_CURRENT, ET_EXEC, EM_PPC, in BOOST_AUTO_TEST_CASE()
603 section* sec = reader.sections[0]; in BOOST_AUTO_TEST_CASE()
607 sec = reader.sections[1]; in BOOST_AUTO_TEST_CASE()
612 sec = reader.sections[9]; in BOOST_AUTO_TEST_CASE()
617 sec = reader.sections[20]; in BOOST_AUTO_TEST_CASE()
622 sec = reader.sections[28]; in BOOST_AUTO_TEST_CASE()
626 const section* sec1 = reader.sections[".shstrtab"]; in BOOST_AUTO_TEST_CASE()
631 segment* seg = reader.segments[0]; in BOOST_AUTO_TEST_CASE()
635 seg = reader.segments[2]; in BOOST_AUTO_TEST_CASE()
639 seg = reader.segments[7]; in BOOST_AUTO_TEST_CASE()
644 sec = reader.sections[".symtab"]; in BOOST_AUTO_TEST_CASE()
646 symbol_section_accessor sr( reader, sec ); in BOOST_AUTO_TEST_CASE()
667 sec = reader.sections[".rela.dyn"]; in BOOST_AUTO_TEST_CASE()
669 relocation_section_accessor reloc( reader, sec ); in BOOST_AUTO_TEST_CASE()
674 sec = reader.sections[".rela.plt"]; in BOOST_AUTO_TEST_CASE()
676 relocation_section_accessor reloc1( reader, sec ); in BOOST_AUTO_TEST_CASE()
685 sec = reader.sections[".note.ABI-tag"]; in BOOST_AUTO_TEST_CASE()
687 note_section_accessor notes( reader, sec ); in BOOST_AUTO_TEST_CASE()
722 elfio reader; in BOOST_AUTO_TEST_CASE() local
724 reader.load( "elf_examples/elf_dummy_header_i386_32.elf" ), true ); in BOOST_AUTO_TEST_CASE()
728 checkHeader( reader, ELFCLASS32, ELFDATA2LSB, EV_CURRENT, ET_REL, EM_386, in BOOST_AUTO_TEST_CASE()
732 section* sec = reader.sections[""]; in BOOST_AUTO_TEST_CASE()
736 sec = reader.sections[".shstrtab"]; in BOOST_AUTO_TEST_CASE()
740 sec = reader.sections[".note"]; in BOOST_AUTO_TEST_CASE()
775 elfio reader; in BOOST_AUTO_TEST_CASE() local
777 reader.load( "elf_examples/elf_dummy_header_ppc_32.elf" ), true ); in BOOST_AUTO_TEST_CASE()
781 checkHeader( reader, ELFCLASS32, ELFDATA2MSB, EV_CURRENT, ET_REL, EM_PPC, in BOOST_AUTO_TEST_CASE()
785 section* sec = reader.sections[""]; in BOOST_AUTO_TEST_CASE()
789 sec = reader.sections[".note"]; in BOOST_AUTO_TEST_CASE()
794 sec = reader.sections[".shstrtab"]; in BOOST_AUTO_TEST_CASE()
828 elfio reader; in BOOST_AUTO_TEST_CASE() local
830 reader.load( "elf_examples/elf_dummy_header_i386_64.elf" ), true ); in BOOST_AUTO_TEST_CASE()
834 checkHeader( reader, ELFCLASS64, ELFDATA2LSB, EV_CURRENT, ET_REL, EM_X86_64, in BOOST_AUTO_TEST_CASE()
838 section* sec = reader.sections[""]; in BOOST_AUTO_TEST_CASE()
842 sec = reader.sections[".note"]; in BOOST_AUTO_TEST_CASE()
847 sec = reader.sections[".shstrtab"]; in BOOST_AUTO_TEST_CASE()
881 elfio reader; in BOOST_AUTO_TEST_CASE() local
883 reader.load( "elf_examples/elf_dummy_header_ppc_64.elf" ), true ); in BOOST_AUTO_TEST_CASE()
887 checkHeader( reader, ELFCLASS64, ELFDATA2MSB, EV_CURRENT, ET_REL, EM_PPC64, in BOOST_AUTO_TEST_CASE()
891 section* sec = reader.sections[""]; in BOOST_AUTO_TEST_CASE()
895 sec = reader.sections[".shstrtab"]; in BOOST_AUTO_TEST_CASE()
899 sec = reader.sections[".note"]; in BOOST_AUTO_TEST_CASE()
908 elfio reader; in BOOST_AUTO_TEST_CASE() local
910 BOOST_REQUIRE_EQUAL( reader.load( "elf_examples/main" ), true ); in BOOST_AUTO_TEST_CASE()
912 section* dynsec = reader.sections[".dynamic"]; in BOOST_AUTO_TEST_CASE()
915 dynamic_section_accessor da( reader, dynsec ); in BOOST_AUTO_TEST_CASE()
942 elfio reader; in BOOST_AUTO_TEST_CASE() local
944 BOOST_REQUIRE_EQUAL( reader.load( "elf_examples/libfunc.so" ), true ); in BOOST_AUTO_TEST_CASE()
946 section* dynsec = reader.sections[".dynamic"]; in BOOST_AUTO_TEST_CASE()
949 dynamic_section_accessor da( reader, dynsec ); in BOOST_AUTO_TEST_CASE()
973 elfio reader; in BOOST_AUTO_TEST_CASE() local
975 BOOST_REQUIRE_EQUAL( reader.load( "elf_examples/main" ), true ); in BOOST_AUTO_TEST_CASE()
977 section* dynsec = reader.sections[".dynamic"]; in BOOST_AUTO_TEST_CASE()
980 dynamic_section_accessor da( reader, dynsec ); in BOOST_AUTO_TEST_CASE()
983 section* strsec1 = reader.sections.add( ".dynstr" ); in BOOST_AUTO_TEST_CASE()
985 strsec1->set_entry_size( reader.get_default_entry_size( SHT_STRTAB ) ); in BOOST_AUTO_TEST_CASE()
987 section* dynsec1 = reader.sections.add( ".dynamic1" ); in BOOST_AUTO_TEST_CASE()
989 dynsec1->set_entry_size( reader.get_default_entry_size( SHT_DYNAMIC ) ); in BOOST_AUTO_TEST_CASE()
991 dynamic_section_accessor da1( reader, dynsec1 ); in BOOST_AUTO_TEST_CASE()