This is an archive of the discontinued LLVM Phabricator instance.

Install llvm-readelf instead of llvm-readobj
AcceptedPublic

Authored by arichardson on Jun 19 2020, 3:00 AM.

Details

Summary

I would like to install llvm-readelf as part of a toolchain install
with -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON. However, llvm-readelf is currently
a symlink to llvm-readobj. llvm-readelf uses the GNU compatible output
style, whereas llvm-readobj is mostly used for testing.
This commit changes llvm-readobj to be a symlink to llvm-readelf so we can
create a -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON installation that has a readelf
binary but does not include llvm-readobj.

See D82170

Diff Detail

Event Timeline

arichardson created this revision.Jun 19 2020, 3:00 AM
MaskRay added a comment.EditedJun 19 2020, 9:58 AM

Looks good (llvm-readobj is very rarely used outside LLVM, while llvm-readelf is more common as a replacement of GNU readelf)

MaskRay accepted this revision.Aug 30 2023, 11:43 PM

LGTM, but this needs to fix lld: error: undefined symbol: llvm_readelf_main(int, char**, llvm::ToolContext const&)

This revision is now accepted and ready to land.Aug 30 2023, 11:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2023, 11:43 PM

LGTM too, pending @MaskRay's requested fix.

jhenderson accepted this revision.Aug 31 2023, 12:10 AM

Thanks for the review, totally forgot about this patch. Will update and submit once the multicall driver error had been fixed.