Closed quantrpeter closed 4 years ago
When objdump disassembles, it looks for the nearest symbol. Sometimes the nearest symbol is a previous one in which case you get symbol+offset. Sometimes the nearest symbol is a following one, in which case you get symbol-offset. This last case is rare, but is the case you hit here. So clz_tab is 0x300, and 0300-0xc0 is 0x240 which is the address you have.
I would suspect the real problem here is that you used -D inxtead of -d. -d disassembles code. -D disassembles everything including data, so you get weird looking sections of code like what you have above because they aren't code, they are data. Disassembling them is not useful. The solution is to stop using -D. -D is only useful to experts in obscure cases, e.g. a jit compiler that has instruction templates in the data section, and you want to verify that the templates are correct. Otherwise, normally, you should not be using -D. It just confuses people.
Perfect answer, thanks so much
Hi What is "-0xc0" means? and where i can find this information in elf?
I found the symbol clz_tab, but it should start in 0x8000300, but not 0x8000240
thanks Peter