[PATCH] D13298: Fix PR23871: Passing a string literal to .byte directive crashes the assembler

Renato Golin via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 7 09:09:03 PDT 2015


rengolin added a subscriber: rengolin.
rengolin added a comment.

Hi Gabor,

Can you explain the relation between the "a" parameter and the relocation FK_Dtata_1?

Can you correlate that enum type to the ARM ABI name?

Also, why do we need a special unsupported message for that relocation type only? The design of that switch clearly states that unsupported types are to break the compilation. If we start treating special relocation types with different behaviour, the code will become harder to maintain.

A better approach would be to either fail earlier (if that syntax is incorrect) in the assembler parser. Or, if the syntax *is* correct, to implement support for that relocation type (or use the correct relocation, if that's also wrong).

cheers,
--renato


Repository:
  rL LLVM

http://reviews.llvm.org/D13298





More information about the llvm-commits mailing list