Opened 12 years ago
Closed 12 years ago
#331 closed defect (fixed)
need working relocate_area_contents() for ia32
Reported by: | gb | Owned by: | gb |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Runtime (threads, GC) | Version: | trunk |
Keywords: | Cc: |
Description
If the image loader can't load an image at its preferred address (presumably because of mmap limitations or something like that), a function named 'relocate_area_contents' is supposed to walk all pointer-bearing areas, adjusting the pointers it finds there by the difference ('bias') between the expected image address and the actual address. I don't know the details, but this doesn't seem to work yet on x8632. (For a long time, it didn't work right on x8664: the code there didn't handle embedded pointers in function objects correctly.)
Change History (3)
comment:1 Changed 12 years ago by rme
comment:2 Changed 12 years ago by gb
- Status changed from new to assigned
Among other things, we're effectively moving a bunch of functions around (or fixing things up to account for the fact that mmap() moved the whole heap around); on x8632, we need to update self-references in every function that didn't get loaded at the same address that it was saved from.
So, it seems that we need to call update_self_references(start) when we find that start is pointing at a function, as well as skipping over the function's code before (re-)entering the general loop.
This seems to work; I'll try to check it in soon.
comment:3 Changed 12 years ago by gb
- Resolution set to fixed
- Status changed from assigned to closed
Seems to have been fixed in r11468.
There's the following relatively obvious patch:
But there's still something wrong.