[PATCH] D30724: Dont emit Mapping symbols for sections that contain only data.

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 08:08:18 PDT 2017


Hi Peter,

On 29 March 2017 at 06:36, Peter Smith via Phabricator
<reviews at reviews.llvm.org> wrote:
> I don't see any problem with fixing the lld test to match the new llvm-objdump output.

I agree in this particular case, but I'm starting to think there is a
nasty edge-case here that would be best solved by emitting these extra
symbols.

According to the ABI, llvm-objdump should be printing .text as data in
the absence of mapping symbols, but the strip command removes all
mapping symbols and we can't distinguish between a stripped file and
one where every section really contains only data.

So it seems reasonable for llvm-objdump to continue to apply a
heuristic based on section kind when symbols are absent. But then
we're in a situation where we emit an object file that we know
llvm-objdump will misrepresent, and it's not against the ABI to fix
that (just an extra, redundant $d).

Which leads us to the patch Shankar uploaded yesterday (though the
name "UseCodeAlign" would have to change, it's no longer accurate).

What do armasm and fromelf do, and what do you think is most reasonable?

Tim.


More information about the llvm-commits mailing list