[PATCH] D57146: [llvm-objdump] - Print LMAs when dumping section headers.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 25 02:58:21 PST 2019


jhenderson added a comment.

In D57146#1370886 <https://reviews.llvm.org/D57146#1370886>, @grimar wrote:

> In D57146#1369377 <https://reviews.llvm.org/D57146#1369377>, @peter.smith wrote:
>
> > - If there is a command line option to print the LMA, then there is a risk that a good portion of people won't read far into the help to discover it exists. For that reason I quite like the idea of printing the column only when there are program headers that have different VMA and LMA.
>
>
> I think James idea is to have both: (1) print the column when there are program headers that have different VMA and LMA and (2) have an option to force always printing the LMA. Having such an option which is an addition to (1) makes sense if you want to have a way to produce consistent output for parsers.


Yes, exactly. The switch means that those reliant on the output format can specify it, or to print LMA where for some specific instance the LMA and VMA happen to be the same, but that doesn't always mean it will be. Finally, having a single switch whose default can be toggled in downstream ports is easier to maintain than a private patch in the middle of the formatting code.

One further suggestion for 1) might be to change the header to VMA/LMA for the address column, to make it clearer. It might be less confusing to those used to GNU output?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57146/new/

https://reviews.llvm.org/D57146





More information about the llvm-commits mailing list