Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing wrong cross-refs that are now incorrect deductions after changing mem regions #7908

Open
fenugrec opened this issue Mar 14, 2025 · 0 comments

Comments

@fenugrec
Copy link
Contributor

The disassembler is creating a wrong cross-ref due to an early mistake:

          000b16ec 20 79 00        movea.l    (DAT_0000ef0c).l,A0
          000b16f2 4e 90           jsr        (A0=>FUN_000081cc)

EF0C is in RAM, but earlier in my analysis I had some initialized data there, which contained the value 000081cc.
That RAM block is now correctly marked as "uninitialized", but I'm left with a large number of misleading refs like this.

Is there a way to undo the damage ? The obvious re-running the analysis doesn't change anything (it's probably for the best, that the analyzer is excessively careful not to delete refs , so no complaint here).

To Reproduce

  • load attached .bin file as mc68000, big-endian, at address 0x88000
  • don't analyze now
  • Memory Map: add another region (read-only), starting at 0x8000, initialized with that same .bin file contents
  • browse to b1682 and disassemble

Expected behavior
I'm not sure... Running analysis (one-shot or globally) should 'fix everything magically' ?
And disasm would look like

          000b16ec 20 79 00        movea.l    (DAT_0000ef0c).l,A0                                      = ??
                   00 ef 0c
          000b16f2 4e 90           jsr        (A0)

Screenshots
I noticed, in the 'wrong' db, if I open the Instruction Info window, the right-hand pane shows the unwanted address xref.
Image

Attachments
Current state of the project:
https://filebin.net/35d94r4ip8i4v8ox/mc68_jsr.gzf
or, to start from scratch, the following .bin file must be loaded at address 0x88000 .
https://filebin.net/35d94r4ip8i4v8ox/U21_8000.bin.zip

Environment (please complete the following information):

  • OS: archlinux
  • Java Version: 21.0.6
  • Ghidra Version: 11.3
  • Ghidra Origin: distro package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant