Questions tagged [readelf]

readelf displays information about ELF object files

1
vote
1answer
41 views

How to extract symbol name from ELF file for a given offset

I have a hex offset say 0xcccddd . Using gdb info symbol 0xcccddd i can get the symbol name eg. fn() in section_name. How to do this using readelf or objdump command.Or any other commands without ...
0
votes
1answer
30 views

Can I get symbol name by “GOT address”?

Now I'm developing program like readelf using pyelftools libraries. I want to print the table like below.In here, Offset field is stderr@GOT address. jiwon@jiwon$ readelf -a --wide libstdbuf....
1
vote
2answers
25 views

How to understand the difference between Offset and VirAddr in Program Headers in elf?

There is a shared library elf file, I use readelf -l to see the program headers, the output is:Elf file type is DYN (Shared object file)Entry point 0x0There are 11 program headers, starting at ...
1
vote
1answer
40 views

How linker adds Program Headers to the Relocatable file?

So we know that linker (in my case ld ) adds the Program Headers to the Relocatable file while creating the actual Executable. Then these Headers are used to load the program into memory at run-time....
0
votes
1answer
51 views

How to determine what is being relocated using readelf

From the snippet below, I can see that the relocation entry is to be applied at offset 0x000000201018 of some section, but how can I determine what section?Also all of my sections are smaller than ...
0
votes
0answers
12 views

How to use readelf or objdump to capture same info as nm to identify source code

Today I am able to generate a list of user-created source code file names and functions used to build the exe using nm -lAC. Problem with nm is that it is to slow for the project we are working on....
0
votes
0answers
18 views

Identify source infor used to build the executable, readelf vs nm

Trying to figure out how to interpret (objdump -WC | readelf -wi) output to identify source code and function info used to build the executable, basically the same info as nm -lA. I am unable to use ...
0
votes
0answers
20 views

Modifying existing ELF objects

I am new to ELF modifying, so as a start i want to see if RDWR work fine. I am not actually do any updates to the original.int main(int argc, char *argv[]) { size_t ehdrsz, phdrsz;int ...
0
votes
0answers
34 views

Analyzing ELF memory layout

I was analyzing an ELF Executable with readelf and getting the following Program and header. |Type | Offset | VirtAddr | PhysAddr | FileSiz | MemSiz | Flg | Align | size | start addr |...
1
vote
0answers
77 views

How padding works in elf file

I know the relationship between the virtual address and the file offset in an ELF file VirtAddr=Offset + k * Allinand I know it is due to page dimension (0x1000 in a x86 architecture).First ...
1
vote
1answer
65 views

How are function sizes calculated by readelf

I am trying to understand how readelf utility calculates function size. I wrote a simple program#include <stdio.h>int main() {printf("Test!\n");}Now to check function size I used ...
-2
votes
1answer
173 views

Why can I not read Big Endian ELF files the same way as Little Endian files in C++?

Essentially, I am doing something similar to https://wiki.osdev.org/ELF_Tutorial, where I load the data into structs and read the various sections by their offsets. The host is little endian and I'm ...
1
vote
1answer
30 views

ELF. Hide exported symbol for already linked DSO

I have an already compiled / linked DSO file, that exports few functions that indeed must be hidden. When I try to link my code against that library - it picks up those unneeded symbols instead of my ...
0
votes
0answers
70 views

“readelf” command is not displaying variables and structure information for C++ files

readelf command is not displaying variables and structure information for C++ files. I used following command to check the structures defined in the C++ files readelf --debug-dump=info [C++ Object ...
0
votes
1answer
77 views

What's the difference between .data, .symtab in an ELF file?

My understanding is that .data stores the initialized global variables of the program. But isn't that what .symtab stores as well?

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,