[PATCH] D158001: [lld][WebAssembly] Add support for -soname

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 17:26:01 PDT 2023


sbc100 added a comment.

In D158001#4590476 <https://reviews.llvm.org/D158001#4590476>, @dschuff wrote:

> Do we really want to always write a module name even if the output is not a DSO?
> For DSOs it makes sense since they would usually have symbols and names, but for final linked modules it seems to me that we should write one if there are any other debug names in the module, but maybe not otherwise. I don't know why someone would want a module name if it were the only name in the binary?

The entire name section is skipped if you link with `--strip-all`.. otherwise we generate a name section.  I don't really think we would ever create a module without a name section unless `--strip-all` is passed since any function that has a name will be in the name section (so your module would have to have no exported symbols at all to avoid a name section in the absence of `--strip-all`).

In other words, I think there is little risk that this change will add a name section where there was not one previously.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158001



More information about the llvm-commits mailing list