konrad-kruczynski / elfsharp

Pure managed C# library for reading ELF, UImage, Mach-O binaries.
https://elfsharp.it
Other
159 stars 57 forks source link

Is it possible to get variable and structure addresses using elfsharp? #88

Closed karamelekrobotics closed 1 year ago

karamelekrobotics commented 1 year ago

Hi,

I'm trying to use elfsharp to read arm based elf file of renesas mcus. I could get some useful informations by following examples and explanations but I could not get variables addresses. Maybe I could not understand what should I do or what I am doing. Is there anyone for helping me? :) If you need more information I can share with you.

konrad-kruczynski commented 1 year ago

Hi, I'd need more details regarding your issue. What do you mean by variable addresses in elf file?

karamelekrobotics commented 1 year ago

Hi,

I have an elf file that is compiled for a specific mcu. My software includes global variables and also structures that includes some application specific variables. I created a GUI that is able to read these variables using serial communication protocol and plot them. Now I am trying to upload my elf file to the GUI, and i want to get my variable names with their addresses so that i can request data from variable address. Is it possible to do that using your valuable package?

konrad-kruczynski commented 1 year ago

I'm afraid not. You could get function names and their addresses quite easily, but for variables (global ones?) you would rather need to access DWARF data. You can use ElfSharp to retrieve DWARF section, but still need to write some code/use another library to interpret the data.

konrad-kruczynski commented 1 year ago

I'm closing the issue now, please reopen if needed.