I have a little endian 32-bit ARM binary, compiled for a CPU that's running embedded Linux. I want to figure out what a specific byte in the binary means. An example hex view of the first few bytes of my binary is:
03 00 00 00 82 2C 00 00 50 01 00 00 C0 01 00 00
1A 00 00 00 2B 00 00 00 80 00 00 00 00 00 00 00
24 26 00 00 08 00 00 00 04 10 00 00 30 29 00 00
FC FF 07 00 00 00 00 00 F7 27 13 00 FF 03 00 00
01 00 00 00 74 2C 00 00 00 00 00 00 00 00 00 00
I am interested in finding the purpose of the byte with value 0x13
in line 4. The particular number seems to increase as the size of the binary increases, but I can't seem to find the exact correlation between file size and this number. I have tried the usual suspects (number of blocks, file size in e.g. KB etc.) but nothing gives an exact match with the number I observe in that byte offset.
Disassembling the binary in IDA renders the following assembly code for that portion:
ROM:00000000 AREA ROM, CODE, READWRITE, ALIGN=0
ROM:00000000 CODE32
ROM:00000000 DCD 3, 0x2C82, 0x150, 0x1C0, 0x1A, 0x2B, 0x80, 0
ROM:00000020 DCD off_2624
ROM:00000024 DCD 8, 0x1004, 0x2930, 0x7FFFC, 0
ROM:00000038 DCD 0x1327F7, 0x3FF, 1, 0x2C74, 0, 0
where the number of interest appears in the last line as DCD 0x1327F7
. That number doesn't appear anywhere else in the code, neither that address is referenced anywhere in the rest of the code. The neighboring bytes (here 0x27F7
) change in a seemingly "random" way (it is likely possible that I just haven't figured out their purpose yet). Regardless I am only interested in the 0x13
field.
Is there a convention for the contents of the first bytes of an ARM binary? Any ideas as to the purpose of that byte or if there actually exists a correlation to the file's size?
P.S. For differential analysis purposes I'm adding another file's initial bytes. Here the number I am interested in is 0x03
in line 4. The offset of interest is always the same. The first file was 11928 bytes whereas this one is 2850 bytes.
0300 0000 9608 0000 5001 0000 0701 0000
0a00 0000 1300 0000 8000 0000 0000 0000
6404 0000 0800 0000 0410 0000 9006 0000
fcff 0700 0000 0000 087d 0300 ff03 0000
0100 0000 8808 0000 0000 0000 0000 0000