[PATCH] D94461: [llvm-ifs] Add option to use InterfaceStub library

Haowei Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 8 18:07:55 PST 2021


haowei added a comment.

In D94461#2534861 <https://reviews.llvm.org/D94461#2534861>, @plotfi wrote:

> Ping? Haven't seen any chatter in a while. Anything new here? I don't want to hold you folks up.

Sorry I was on call for past week and thing got a bit busy.

For this single patch, I don't see there is anything blocking it from landing, since it it just adding an optional backend for ELF generation. So could you give me a LGTM so I can land it please?

In D94461#2494710 <https://reviews.llvm.org/D94461#2494710>, @compnerd wrote:

> You mean use `armv7---elf` as a triple?  While that is possible, keep in mind that it might change the ABI of the generated interfaces.  While it is unlikely to matter as the ifso cannot be used at runtime, if the linker attempts to do something like symbolic resolution of ABI dependent specialization (e.g. `strcmp.eabi` vs `strcmp` where the latter is generic), that could matter.  However, adding support to explicitly override the encoded triple based on the user's input is reasonable (though might deserve a warning that the triple is being overridden).

Could you explain the use case a little bit more please? I am not an expert on ELF and have very little knowledge on ARM specifics so please correct me if I said something wrong. I think putting some triple like data in the Text file and use command line options as a override is a reasonable solution. But it looks like the current `writeElfStub` function only use the triple to write `e_ident[EI_CLASS]`, `e_ident[EI_DATA]` and `e_machine`. If that the case, would `e_ident` and `e_machine` just be sufficient? Do we really need a whole triple here? For the case of `strcmp.eabi` vs `strcmp`, how do these 2 encoded in the ELF file? It looks like both ifs and elfabi put a 0 in `e_ident[EI_OSABI]`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D94461



More information about the llvm-commits mailing list