diff options
author | Jean-Daniel Dupas <devlists@shadowlab.org> | 2014-12-18 21:33:38 +0000 |
---|---|---|
committer | Jean-Daniel Dupas <devlists@shadowlab.org> | 2014-12-18 21:33:38 +0000 |
commit | 23dd15e26d81c3230e7dc7b184a5dc8e37e8f3bb (patch) | |
tree | b01942ecb8283f26d86804fb8a8282c310166503 /lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp | |
parent | f27ae736175a3cc339af15ffc8ad3cb518224c0c (diff) | |
download | bcm5719-llvm-23dd15e26d81c3230e7dc7b184a5dc8e37e8f3bb.tar.gz bcm5719-llvm-23dd15e26d81c3230e7dc7b184a5dc8e37e8f3bb.zip |
[macho] -rpath support
Summary:
Work on adding -rpath support to the mach-o linker.
This patch is based on the ld64 behavior for the command line option validation.
It includes a basic test to check that the LC_RPATH load commands are properly generated when that option is used.
It also add LC_RPATH support to the binary reader, but I don't know how to test it though.
Reviewers: kledzik
Subscribers: llvm-commits
Projects: #lld
Differential Revision: http://reviews.llvm.org/D6724
llvm-svn: 224544
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp')
-rw-r--r-- | lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp index 89c6213c845..ef8ad1d3325 100644 --- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp +++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp @@ -460,6 +460,11 @@ readBinary(std::unique_ptr<MemoryBuffer> &mb, f->dependentDylibs.push_back(entry); } break; + case LC_RPATH: { + const rpath_command *rpc = reinterpret_cast<const rpath_command *>(lc); + f->rpaths.push_back(lc + read32(&rpc->path, isBig)); + } + break; case LC_DYLD_INFO: case LC_DYLD_INFO_ONLY: dyldInfo = reinterpret_cast<const dyld_info_command*>(lc); |