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

Patching relocs #140

Open
lab313ru opened this issue Apr 5, 2020 · 2 comments
Open

Patching relocs #140

lab313ru opened this issue Apr 5, 2020 · 2 comments

Comments

@lab313ru
Copy link
Contributor

lab313ru commented Apr 5, 2020

hunk["type"] == Hunk.HUNK_ABSRELOC32
or hunk["type"] == Hunk.HUNK_DREL32

My question is why are you patching only 32-bit relocs here? And what to do with 16 and 8 bit relocs?

@lab313ru
Copy link
Contributor Author

lab313ru commented Apr 5, 2020

For example, I have the following file, which contains 16-bit relocations: c.zip

@cnvogelg
Copy link
Owner

cnvogelg commented Apr 7, 2020

The HunkRelocate class is used to relocate a LoadSeg() binary into memory. In a binary only 32 bit relocations are used (and supported by the Dos LoadSegment()). Supported are both 32 bit relocs stored in 32 bit and 16 bit words.

Your example is an object file. This needs to be treated by a linker first to resolve shorter relocations when placing the object into final segments. Linker support is currently not available in amitools.

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

2 participants