[ELF] Move getSectionAndRelocations to ELF.cpp from ELFDumper.cpp
authorAiden Grossman <agrossman154@yahoo.com>
Sat, 25 Feb 2023 10:18:34 +0000 (10:18 +0000)
committerAiden Grossman <agrossman154@yahoo.com>
Thu, 9 Mar 2023 17:10:30 +0000 (17:10 +0000)
commit9c645a99e4e7451c0073dddea74d52dac7f7e837
tree543a9339e752bffc8c6aac1014da4bf85dd51a60
parentcf90633cf215a5df9626f52c17ab73f0a6b57aa4
[ELF] Move getSectionAndRelocations to ELF.cpp from ELFDumper.cpp

This refactoring will allow for this utility function to be used in
other places in the codebase outside of the llvm-readobj tool.

Reviewed By: jhenderson, rahmanl

Differential Revision: https://reviews.llvm.org/D144783
llvm/include/llvm/Object/ELF.h
llvm/lib/Object/ELF.cpp
llvm/test/tools/llvm-readobj/ELF/call-graph-profile.test
llvm/test/tools/llvm-readobj/ELF/stack-sizes.test
llvm/tools/llvm-readobj/ELFDumper.cpp
llvm/unittests/Object/ELFObjectFileTest.cpp