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

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 25 04:08:49 PST 2019


peter.smith added a comment.

In D57146#1370968 <https://reviews.llvm.org/D57146#1370968>, @jhenderson wrote:

> 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.


Thanks for the clarification. Makes sense.


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

https://reviews.llvm.org/D57146





More information about the llvm-commits mailing list