This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Return file offset as address only for allocatable sections when building .gdb_index
ClosedPublic

Authored by grimar on Dec 22 2016, 12:06 AM.

Details

Summary

It is my suggestion for fixing issue we discussing in
"[llvm] r289961 - Revert "dwarfdump: Support/process relocations on a CU's abbrev_off"" thread.

Since callback named getSectionLoadAddress() it looks reasonable to make it return address only
for allocatable sections. That works for LLD needs and solves problem.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar updated this revision to Diff 82310.Dec 22 2016, 12:06 AM
grimar retitled this revision from to [ELF] - Return file offset as address only for allocatable sections when building .gdb_index.
grimar updated this object.
grimar added a reviewer: dblaikie.
grimar added subscribers: ruiu, rafael, llvm-commits, grimar.
aprantl added inline comments.Dec 22 2016, 8:06 AM
ELF/GdbIndex.cpp
190 ↗(On Diff #82310)

Would returning an Optional<uint64_t> be better here?

dblaikie accepted this revision.Dec 22 2016, 1:10 PM
dblaikie edited edge metadata.
This revision is now accepted and ready to land.Dec 22 2016, 1:10 PM
This revision was automatically updated to reflect the committed changes.