How to recover function names of executables in the packages

ch flag

I want to get a list of <func_name, binary code> pairs of the executables in the package. Since the binary in a package is stripped, I'm thinking about use the .ddeb package. And here are two questions:

  1. Why the number of executables is not compatible with the number of .debug in .ddeb file.(e.g. package 0ad), and how to match them respectively.
  2. how to restore the function name by using .debug file? I have tried eu-unstrip binary binary.dbg, but it seems couldn't recover function names (or maybe because of the first issue). Or can it just read func_name and the corresponding start_addr and end_addr from the .debug file
waltinator avatar
it flag
Start by reading `man elf readelf`. Can't you just use the binary from the development package, `package-dev`? It's more likely to have debug symbols.
QiuSH avatar
ch flag
@waltinator Thanks, I will think about read the manual. And no, there are some packages that have no `package-dev`, which makes the number of packages cannot meet my requirement.
I sit in a Tesla and translated this thread with Ai:


Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.