I have some compiled code and would like to use Cutter (Radare2) to find the place where a certain static string is printed out. The code is an object file, compiled for ARM, and to be included with the Linux kernel. It is not a full executable or module.
$ file mybinary mybinary: ELF 32-bit LSB relocatable, ARM, EABI5 version 1 (SYSV), not stripped
When I load the file in Cutter, I can see some functions, but they do not seem relevant, and I can see the string I am looking for. However, if I try to find Xrefs for the string, I don't find anything.
I do find addresses in the disassembly that look similar to addresses in data, e.g. they both end with the same digits but have an offset. This makes me think you have to specify an offset, especially since this is a relocatable object? Maybe you have to specify the map offset (
-m)? How to know this value?
Here is a similar question, but the poster seemed to have a problem with their installation. Also I have only an object file, where they had an executable, so I the issue of relocation is relevant in my case: Find reference to string in radare2