Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion llvm/tools/llvm-jitlink/llvm-jitlink-elf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ Error registerELFGraphInfo(Session &S, LinkGraph &G) {
else
FileInfo.SectionInfos[Sec.getName()] = {
ArrayRef<char>(FirstSym->getBlock().getContent().data(), SecSize),
SecAddr.getValue(), FirstSym->getTargetFlags()};
(SecAddr - FirstSym->getOffset()).getValue(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of setting this here, it seems like it'd be tidier to define SecAddr like this on line 183:

auto SecAddr = FirstSym->getAddress() - FirstSym->getOffset();

Unless you've already tried that and hit other issues I'm happy to go ahead and make that change.

FirstSym->getTargetFlags()};
}

return Error::success();
Expand Down