Closed Bug 547255 Opened 15 years ago Closed 15 years ago

Make DWARF addresses load-address-relative

Categories

(Servo Graveyard :: Rust, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: graydon, Unassigned)

References

Details

Address attributes in DIEs are taken as relative to a shared-relocatable unit's base address (see DWARF standard section 7.3), whereas currently we are emitting them as absolute and "correcting" for relocation on the fly by subtracting out the crate relocation distance. This works for us but won't for other DWARF consumers. Need to do the right thing, which means crates should learn their load address. Place an "image base" fixup in the semant ctxt, emit it as a MARK in the 0th position of the first load-segment, and store distance-to-that in the crate as well; then add that distance at runtime to the crate-relocation distance.
Fixed in 3294f694b5d2.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Group: servo
You need to log in before you can comment on or make changes to this bug.