15 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
310
views
pyelftools "Magic number does not match" but the ELF magic number is correct
So I have this function that attempts to return the length of an ELF. My use for this is extracting ELF's from a memory dump.
from elftools.elf.elffile import ELFFile
def get_elf_size(start_loc, ...
0
votes
1
answer
62
views
How to parse from a eabi .out file?
I have a .out eabi binary file and I'm trying to parse out all the symbol names, addresses, types, and byte sizes.
I found some information about this using readelf, but its not super clear to me ...
1
vote
2
answers
661
views
How to find structure member memory address from dwarf debug information?
I'm trying to find structure member memory address(Non Virtual Memory, embedded) from dwarf.
And there's two things i don't understand.
First, In below dwarf Info1 DW_AT_location value = [3, 192, 63, ...
0
votes
1
answer
2k
views
pyelftool get symbol absolute address
My Goal: use pyelftool to retrieve variables absolute placement and functions absolute address from an elf file to automatize breakpoint placement for whitebox testing.
my code:
import elftools
from ...
1
vote
1
answer
2k
views
Get address of member of struct using pyelftools
I am using the pyelftools to read an elf file. How can I get an offset value or address of a member in a struct? For example, say I have the following struct in C.
typedef struct
{
int valA;
} ...
0
votes
1
answer
4k
views
Efficient way to parse DWARF
I try to build a debugger which allows me to set breakpoints at functions or codelines. The needed debug information should be extracted from the DWARF section from an elf file. I am able to extract ...
0
votes
1
answer
2k
views
Grabbing program header information with pyelftools
I am simply trying to grab the program header information with pyelftools (the offset, virtual address, and physical address).
This can be done from the terminal by running:
readelf -l <elf_file>...
0
votes
0
answers
300
views
Processing the same file in multiple threads
I am trying to speed up how long it takes me to process a file in python. My idea is to split the task into n threads.
For example, if I have a file that has 1300 items in it. I want each thread to ...
2
votes
1
answer
2k
views
How do I find a line of code with pyelftools/libdwarf
I have a function name and an offset from the top of that function. I know I can find the line of code from looking at the assembly listing file and compute the offset for the line of code and get the ...
1
vote
2
answers
7k
views
How to MODIFY an ELF file with Python
I am trying to modify an ELF file's .text segment using python.
I successfully acquired the .text field so then I can simply change the bit that I want. The thing is that pyelftools does not provide ...
1
vote
0
answers
326
views
Python: Listing members of a structure using pyelftools
I have a structure in C with several members and an ELF file.
For instance I have the following
typedef struct my_struct {
int a;
int c;
char d;
} MYSTRUCT_T;
MYSTRUCT_T hello;
How am I ...
-1
votes
1
answer
106
views
obtaining the instruction stream (byte or assembly) for function within a shared object file (ELF) [closed]
I am working on getting the instructions associated with a certain function within a shared object file (ELF).
This shall be realized from a python script. I could do this certainly from the command ...
3
votes
1
answer
3k
views
Getting the memory layout out of an (avr)elf file by useing python + pyElftools
I am creating my own bootloader for an ATXmega128A4U. To use the bootloader I want to transform the ELF-file of the firmware into a memory map used in the the ATXmega.
For that I use python and the ...
6
votes
3
answers
4k
views
what the structure of dsym file?
What's structure of a dsym file generated when build the app. I know it contain DWARF debug info, but what's a dsym file. I want to read the DWARF info in it.
Is it just a Mach-O binary file that ...
1
vote
1
answer
2k
views
ELF Parsing : Accessing a DIE Directly using pyelftools
I need a method for accessing DIE's directly using their offset. So far, I have found that there is a method for the Computation Unit (CU) object in which you can access a DIE from its offset.
I.e....