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

Haowei Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 11 17:35:29 PST 2021


haowei created this revision.
haowei added reviewers: phosek, mcgrathr, plotfi.
Herald added a subscriber: mgorny.
haowei requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This change add an option to allow llvm-ifs to use InterfaceStub library (introduced in llvm-elfabi) when generate stub ELF file. This is the first step trying to unify llvm-ifs and llvm-elfabi tools.

There are a few questions I would like to ask before I make further unification changes:

1. I think for unification, the first thing would be unifying the text abi file format. Currently, the YAML format used by ifs is very similar to the one used in InterfaceStub(elfabi), however there are not compatible. One thing is that ifs embeds llvm triples in the text ifs file while elfabi does not do that. Elfabi get platform and endianness information from command line instead of getting them from the text stub file. We did that because there are use cases that we generate ELF stubs for multiple platforms using a single set of text abi files. Is there a specific reason why ifs text files require llvm triples? Is it feasible to make llvm-ifs to get the platform information from the command line options?

2. One of the design goal of InterfaceStub is to generate minimal ELF stub that is OK for linking. So it strips away sections like `.data`, `.text`, `.rodata` , which are present (but empty) in the ELF stub generated from yaml2obj . Is there any use cases that require these sections?

Thanks.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94461

Files:
  llvm/test/tools/llvm-ifs/func.ifs
  llvm/tools/llvm-ifs/CMakeLists.txt
  llvm/tools/llvm-ifs/llvm-ifs.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94461.315954.patch
Type: text/x-patch
Size: 4055 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210112/2341e2a6/attachment.bin>


More information about the llvm-commits mailing list