HomePhabricator

[llvm-readobj] Little clean up inside `parseDynamicTable`

Description

[llvm-readobj] Little clean up inside parseDynamicTable

Summary:
This anoymous function actually has same logic with Obj->toMappedAddr.

Besides, I have a question on resolving illegal value. gnu-readelf, gnu-objdump and llvm-objdump could parse the test file 'test/tools/llvm-objdump/Inputs/private-headers-x86_64.elf', but llvm-readobj will fail when parse DT_RELR segment. Because, the value is 0x87654321 which is illegal. So, shall we do this clean up rather then remove the checking statements inside anoymous function?

if (Delta >= Phdr.p_filesz)
    return createError("Virtual address is not in any segment");

Reviewers: rupprecht, jhenderson

Reviewed By: jhenderson

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D55329

Details

Committed
HiguoxingDec 7 2018, 9:32 PM
Reviewer
jhenderson
Differential Revision
D55329: [llvm-readobj] Little clean up inside `parseDynamicTable`
Parents
rL348700: Creating release candidate rc3 from release_701 branch
Branches
Unknown
Tags
Unknown