This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Fix weak symbols order
ClosedPublic

Authored by shankarke on Mar 6 2013, 11:59 AM.

Details

Reviewers
Bigcheese
Summary

This patch fixes weak symbol order in the executable. This is needed to fix helloworld working with glibc on x86_64 with layout pass.

This makes helloworld pass on x86_64/hexagon with LayoutPass.

Diff Detail

Event Timeline

Bigcheese accepted this revision.Mar 6 2013, 1:35 PM

Looks fine with these changes. Also, you're missing the binary files.

lib/Passes/LayoutPass.cpp
162
.empty()
204–205

No newline.

219–226

This function is getting nested too deeply. It should probably be split into multiple functions.

lib/ReaderWriter/ELF/File.h
464

Drop the extra parens.

if ((*si)->getBinding() == llvm::ELF::STB_WEAK && anonAtom)

will add the binary files too.

lib/Passes/LayoutPass.cpp
162

atom doesnot have empty() function.

204–205

Ok.

219–226

Will take this in the upcoming patches.

lib/ReaderWriter/ELF/File.h
464

ok.

Eugene.Zelenko closed this revision.Oct 5 2016, 3:32 PM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in rL176583.