HomePhabricator

[llvm-objcopy] - Check dynamic relocation sections for broken references.

Description

[llvm-objcopy] - Check dynamic relocation sections for broken references.

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.
I added an assert to verify this.

Differential revision: https://reviews.llvm.org/D60825

Details

Committed
grimarApr 30 2019, 4:02 AM
Differential Revision
D60825: [llvm-objcopy] - Check dynamic relocation sections for broken references.
Parents
rL359551: Fix gcc "-Wdangling-else" warning. NFCI.
Branches
Unknown
Tags
Unknown