HomePhabricator

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

Authored by Higuoxing on Dec 7 2018, 9:32 PM.

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

llvm-svn: 348701

Details

Committed
HiguoxingDec 7 2018, 9:32 PM
Reviewer
jhenderson
Differential Revision
D55329: [llvm-readobj] Little clean up inside `parseDynamicTable`
Parents
rGe388680dfa17: Convert some ObjC msgSends to runtime calls.
Branches
Unknown
Tags
Unknown