added a method for returning the index of a section by name (#331)
authorJonathan Bruchim <50236903+JonBruchim@users.noreply.github.com>
Mon, 7 Dec 2020 16:36:47 +0000 (18:36 +0200)
committerGitHub <noreply@github.com>
Mon, 7 Dec 2020 16:36:47 +0000 (08:36 -0800)
commitad5375fd8b24efc111a7b3dc9898b77a4c3407aa
tree5e6914dfcbd56ea42c82b4ed213bdc06221b78cd
parent9f851f7b6979d5dc3e848c553161913502f11b83
added a method for returning the index of a section by name (#331)

* added an method for returning the index of a section by name

Signed-off-by: Jonathan <yonbruchim@gmail.com>
* changed naming of init mapping function

Signed-off-by: Jonathan <yonbruchim@gmail.com>
* Fixed CR

Added a test file containing 3 tests
1. test index of existing section
2. test index of missing section
3. test index of existing section when section_map_name is None

Signed-off-by: Jonathan Bruchim <yonbruchim@gmail.com>
elftools/elf/elffile.py
test/test_get_section_index.py [new file with mode: 0644]