mirror of https://github.com/Nonannet/pelfy.git
Compare commits
No commits in common. "c6682effc7b04f233c8021d67649fed3fb68ae82" and "cfbc53afc6c0ae25e56585f0c1bcaf9cbcf47fc4" have entirely different histories.
c6682effc7
...
cfbc53afc6
|
@ -8,7 +8,6 @@ on:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
name: Linting, typechecking and testing code
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
|
|
|
@ -9,7 +9,7 @@ permissions:
|
|||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
@ -30,22 +30,8 @@ jobs:
|
|||
rm ./source/*.rst
|
||||
make html
|
||||
touch ./build/html/.nojekyll
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: docs/build/html
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: docs/build/html
|
||||
|
|
|
@ -9,9 +9,6 @@ jobs:
|
|||
publish:
|
||||
name: Build and publish
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: pypi
|
||||
url: https://pypi.org/project/${{ github.event.repository.name }}/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
|
|
@ -20,7 +20,6 @@ share/python-wheels/
|
|||
.installed.cfg
|
||||
*.egg
|
||||
MANIFEST
|
||||
.vscode
|
||||
|
||||
# Jupyter Notebook
|
||||
.ipynb_checkpoints
|
||||
|
|
|
@ -164,7 +164,7 @@ class elf_section():
|
|||
def symbols(self) -> 'symbol_list':
|
||||
"""All ELF symbols associated with this section
|
||||
"""
|
||||
return symbol_list(self.file.list_symbols(self.index))
|
||||
return symbol_list(self.file._list_symbols(self.index))
|
||||
|
||||
@property
|
||||
def data_hex(self) -> str:
|
||||
|
@ -371,7 +371,7 @@ class elf_file:
|
|||
data: binary ELF data
|
||||
"""
|
||||
assert isinstance(data, (bytes, bytearray)), 'Binary ELF data must be provided as bytes or bytearray.'
|
||||
self._data = bytes(data)
|
||||
self._data = data
|
||||
|
||||
# Defaults required for function _read_int_from_elf_field
|
||||
self.bit_width = 32
|
||||
|
@ -403,7 +403,7 @@ class elf_file:
|
|||
ret_sections = [sh for sh in self.sections if sh.name == '.strtab']
|
||||
self.string_table_section = ret_sections[0] if ret_sections else None
|
||||
|
||||
self.symbols = symbol_list(self.list_symbols())
|
||||
self.symbols = symbol_list(self._list_symbols())
|
||||
|
||||
self.functions = symbol_list(s for s in self.symbols if s.info == 'STT_FUNC')
|
||||
self.objects = symbol_list(s for s in self.symbols if s.info == 'STT_OBJECT')
|
||||
|
@ -415,15 +415,7 @@ class elf_file:
|
|||
offs = self.fields['e_shoff'] + i * self.fields['e_shentsize']
|
||||
yield {fn: self._read_from_sh_field(offs, fn) for fn in fdat.section_header.keys()}
|
||||
|
||||
def list_symbols(self, section_index: Optional[int] = None) -> Generator[elf_symbol, None, None]:
|
||||
"""List ELF symbols.
|
||||
|
||||
Args:
|
||||
section_index: If provided, only symbols from the specified section are returned.
|
||||
|
||||
Returns:
|
||||
List of ELF symbols
|
||||
"""
|
||||
def _list_symbols(self, section_index: Optional[int] = None) -> Generator[elf_symbol, None, None]:
|
||||
if self.symbol_table_section:
|
||||
offs = self.symbol_table_section['sh_offset']
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue