Skip to content
This repository has been archived by the owner on Jun 27, 2018. It is now read-only.

Linker does not re-correct adjustment addresses past removed code without corruption #191

Open
patflick opened this issue Nov 9, 2012 · 2 comments
Assignees

Comments

@patflick
Copy link
Member

patflick commented Nov 9, 2012

According to IRC user 'acruid' the following code does not link:

.SECTION DATA

:region
.FILL 0x30 0

.SECTION TEXT

SET A, region

.OUTPUT TEXT
.JUMP
.OUTPUT DATA

he was calling it with this:

dtasm  -o build.dobj16 main.dasm16
dtld -l kernel -o build.dkrn16 build.dobj16
Assertion failed: word != NULL, file ldbin.c, line 541

Note: this is a minimal example of his error. The code works if the .FILL is ommited.

@ghost ghost assigned hach-que Nov 9, 2012
@hach-que
Copy link
Member

This is reproducible with something as simple as:

.SECTION DATA

region:
SET B, 0x20

.SECTION TEXT

SET A, region

hach-que added a commit that referenced this issue Nov 11, 2012
@hach-que
Copy link
Member

It seems the fix above re-enabled that line which causes silent corruption. I've commented it out again (with more information) and placed a proper error message describing the bug when it's encountered (rather than the assertion failure).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants