[llvm] r249083 - [PATCH] D13360: [llvm-objdump] Teach -d about AArch64 mapping symbols
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 6 11:55:53 PDT 2015
On Mon, Oct 5, 2015 at 5:32 AM, Rafael EspĂndola
<rafael.espindola at gmail.com> wrote:
>> // Sort the symbols by address, just in case they didn't come in that way.
>> array_pod_sort(Symbols.begin(), Symbols.end());
>> + std::sort(DataMappingSymsAddr.begin(), DataMappingSymsAddr.end());
>> + std::sort(TextMappingSymsAddr.begin(), TextMappingSymsAddr.end());
>
> Why not array_pod_sort?
>
>> // Make a list of all the relocations for this section.
>> std::vector<RelocationRef> Rels;
>> @@ -998,6 +1008,45 @@ static void DisassembleObject(const Obje
>> for (Index = Start; Index < End; Index += Size) {
>> MCInst Inst;
>>
>> + // AArch64 ELF binaries can interleave data and text in the
>> + // same section. We rely on the markers introduced to
>> + // understand what we need to dump.
>> + if (Obj->isELF() && Obj->getArch() == Triple::aarch64) {
>
> You can remove this if, no? If this is not AArch64 DataMappingSymsAddr is empty.
>
> Also, why do you need the extra vectors? Symbols itself contains the
> $d and $x symbols, no?
>
> Cheers,
> Rafael
Updated at http://reviews.llvm.org/D13360
--
Davide
"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare
More information about the llvm-commits
mailing list