[PATCH] D60825: [llvm-objcopy] - Check dynamic relocation sections for broken references.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 07:06:08 PDT 2019
grimar created this revision.
grimar added reviewers: jhenderson, jakehehrlich, rupprecht, alexshap.
Herald added subscribers: MaskRay, arichardson, emaste.
Herald added a reviewer: espindola.
This is a fix for https://bugs.llvm.org/show_bug.cgi?id=41371.
Currently, it is possible to break the sh_link field of the dynamic relocation section
by removing the section it refers to. The patch fixes an issue and adds 2 test cases.
One of them shows that it does not seem possible to break the sh_info field.
That is explained in the comments. I added an assert to verify this.
https://reviews.llvm.org/D60825
Files:
test/tools/llvm-objcopy/ELF/dynrelocsec-remove-shinfo-reference.test
test/tools/llvm-objcopy/ELF/dynrelocsec-remove-shlink-reference.test
tools/llvm-objcopy/ELF/Object.cpp
tools/llvm-objcopy/ELF/Object.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60825.195563.patch
Type: text/x-patch
Size: 4198 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190417/efe2ee33/attachment.bin>
More information about the llvm-commits
mailing list