ARM mapping symbols

Hi there,

I've created a bug on llvm:

Basically, ARM, Thumb and data mapping symbols should have been
exported in the ELF file, so the linker can work correctly.

I can do the change and create some test cases, but I haven't been
paying much attention to recent MC developments. Is ArmAsmPrinter the
place to change for that, or is there an MC equivalent that would be a
better fit?


The increasingly misnamed ARMAsmPrinter.cpp is the MC lowering pass. There is no non-MC based printer anymore, so you'll only have to change one place.

In particular, have a look at ARMAsmPrinter::EmitInstruction(). There's a big switch statement there for instructions that need any sorts of special handling. From the sounds of things, you'll be interested in the ARM::*_JT (jump table branch) instructions and ARM::CONSTPOOL_ENTRY.

These mapping symbols sound very similar to special-purpose assembler directives. Off the cuff, it makes sense to me to do something similar to the MCStreamer::EmitAssemblerFlag() routine.


Ok, pretty much what I was thinking… :wink: