-
Notifications
You must be signed in to change notification settings - Fork 52
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
Limit relocations to current line #168
base: main
Are you sure you want to change the base?
Conversation
Is the reloc from some other section? If so this is not a great fix, because the line number could match up by accident... If we're willing to accept that the PR looks good though. |
The reloc is from earlier in the .text section.. I've raised a bug on bugzilla but I'm not particularly hopeful it'll get fixed. Are line numbers per-section? I.e. for MWCC with multiple .text sections, do line numbers start at 0x0 for each one? I guess I can try and answer that myself... Edit Looking at a mwccpp-compiled file, the previous text sections are going to be empty if we pass However, wouldn't asm-differ be grabbing the wrong relocs anyway (on master) ?
|
This feels like it could be a pretty common case. I imagine in this case the relocs all end up next to the first instruction of the --disassemble'd function? Can you test it? E.g. add a function
I don't think it would? Or does objdump put relocs in the wrong .text section? (I could see that happening, but it's hard to guess. I vaguely recall some problem with multiple .text sections but I don't remember what it was...) |
There are two scenarios for the
The relocs are included (per bugzilla bug) but the OFFSETS start from the beginning of the file, so there is no chance of a mismatch.
The full output of
|
Do you have any thoughts on this PR - is there a different way to solve the issue? |
I think it might be a good fix, but I haven't had time to do any kind of decomp-related work for the last two months or so, and so haven't thought deeply enough about it... It does feel like my schedule might be clearing up though so maybe I can actually get back to this soon. |
Closes #167.
Is there a better way to solve this? We use the line number of the reloc if there is one. It solves the issue I'm seeing and didnt appear to break the other scratches I have locally.