radareorg/radare2

RBin symbol names must be unique

Open

#426 opened on Dec 6, 2013

View on GitHub
 (2 comments) (0 reactions) (2 assignees)C (3,229 forks)batch import
HacktoberfestRBinblockerenhancementsdb

Repository metrics

Stars
 (23,826 stars)
PR merge metrics
 (Avg merge 16h 24m) (99 merged PRs in 30d)

Description

RBin needs a way to generate unique names for symbols/sections. This way we will get rid of the issue of having two symbols having the same name or the same filter name to store the flag.

char *r_bin_name_suggest(RList *list, char *); // one for symbols and other for sections?

We can also use a r_offsetof() to compare the name using a single generic function stored in r_util. The function must ensure that there's no other element in the list using the same name.

The name suggestion should have an hex suffix containing the lower bits of the address and an optional counter in case of collision. (we can also xor the address bytes to get a single checksum byte to reduce collisions).

We need a way to know the following information from each symbol:

  • original symbol/section name
  • name string address
  • flag name
  • address
  • size

Contributor guide