You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/site-packages/makeelf/elf.py", line 312, in append_section
return self._append_section(sec_name, sec_data, sec_addr,
File "/usr/local/lib/python3.9/site-packages/makeelf/elf.py", line 275, in _append_section
shstrtab_hdr, shstrtab = self.get_section_by_name('.shstrtab')
File "/usr/local/lib/python3.9/site-packages/makeelf/elf.py", line 246, in get_section_by_name
shstrtab_hdr = self.Elf.Shdr_table[shstrtab_idx]
IndexError: list index out of range
Why we need a .shstrtab section first? It could be empty:
readelf -a test.elf
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: ARM
Version: 0x1
Entry point address: 0x80000bd
Start of program headers: 71784 (bytes into file)
Start of section headers: 0 (bytes into file)
Flags: 0x5000202, Version5 EABI, soft-float ABI, <unknown>
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 1
Size of section headers: 0 (bytes)
Number of section headers: 0
Section header string table index: 0
There are no sections in this file.
There are no section groups in this file.
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000040 0x08000000 0x08000000 0x11828 0x13714 RWE 0x40
There is no dynamic section in this file.
There are no relocations in this file.
Dynamic symbol information is not available for displaying symbols.
No version information found in this file.
The text was updated successfully, but these errors were encountered:
I run the following code:
Then i got the excepion:
Why we need a .shstrtab section first? It could be empty:
The text was updated successfully, but these errors were encountered: