1

I would like to write a script which extracts and modifies both the symbol and relocation tables in object files. How do I find out where those tables are located?

EDIT: I am currently examining ELF format binaries EDIT2: I am using the gcc compiler

chillsauce
  • 157
  • 1
  • 8
  • @ikegami Indeed! I am examining ELF format binaries – chillsauce Jan 22 '20 at 03:14
  • Sounds like something `objdump` could do – ikegami Jan 22 '20 at 03:22
  • @ikegami `objdump -rt` can show the contents of each, but I want to know the locations and I can't seem to figure out how – chillsauce Jan 22 '20 at 03:26
  • [Start here](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format) and then follow the links in the References, Further Reading, and External Links sections for more details. – user3386109 Jan 22 '20 at 03:42
  • 1
    [ELF format specification](https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#Specifications) and at the command prompt: `man 5 elf` – user3629249 Jan 22 '20 at 04:03
  • Why don't you refer the .map file? – AlphaGoku Jan 22 '20 at 04:51
  • @AkshayImmanuelD What is a .map file? – chillsauce Jan 22 '20 at 05:03
  • 1
    Refer [1](https://stackoverflow.com/questions/22199844/what-are-gcc-linker-map-files-used-for/36735943) [2](https://stackoverflow.com/questions/38961649/gcc-how-to-create-a-mapfile-of-the-object-file). Useful to find the address of every variable and function. Mentioning which compiler and linker you are using could yield more specific results – AlphaGoku Jan 22 '20 at 05:15

0 Answers0