RonItay / Offender

Offender - Offset Finder in elf and dwarf files
0 stars 0 forks source link

Fix getting Symbols from dynamic symbol table #2

Open RonItay opened 5 days ago

RonItay commented 5 days ago

Dynamic symbol table may export symbols with the same name, aimed at different versions (the different version signified after '@' in the name in SOME cases) for example, running: nm -D resources/libc.so.6 | grep __libc_start_main produces two results:

000000000002a200 T __libc_start_main@@GLIBC_2.34
000000000002a200 T __libc_start_main@GLIBC_2.2.5

Those results point to the same address in this particular case, but it is not always the case.

Also, the destined versions (after "@") doesn't always exist in the name of the searcher in every searcher (elftools_searcher does not include this information in the name so there is no way to differentiate the two).

Need to:

  1. Define what is the desired behavior
    • Could be just disabling read from Dynsym
    • Requiring specification of version for each symbol seems counter productive (create different config for different versions - exactly what I want to avoid).
  2. Implement desired behavior
noelknaepen commented 3 days ago

****63

- [ ] ~~@noelknaepen T8.STAT_DTST_997.CTAC_ORG_1.DIFF_LVL_1.NL.pdf