<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyWasmObjectWriter.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>MCSymbolWasm: Remove classof</title>
<updated>2025-08-04T00:28:33+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-08-04T00:28:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=570e09047c23108d5498326cb259e4b79288ddc4'/>
<id>570e09047c23108d5498326cb259e4b79288ddc4</id>
<content type='text'>
The object file format specific derived classes are used in context
where the type is statically known. We don't use isa/dyn_cast and we
want to eliminate MCSymbol::Kind in the base class.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The object file format specific derived classes are used in context
where the type is statically known. We don't use isa/dyn_cast and we
want to eliminate MCSymbol::Kind in the base class.
</pre>
</div>
</content>
</entry>
<entry>
<title>WebAssembly: Merge MCExpr into MCAsmInfo</title>
<updated>2025-06-27T06:38:39+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-06-27T06:38:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=7726103d1ee1ed0f984d5cc96634742ad9503450'/>
<id>7726103d1ee1ed0f984d5cc96634742ad9503450</id>
<content type='text'>
to align with targets that have made the transition.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
to align with targets that have made the transition.
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Add WebAssembly::Specifier</title>
<updated>2025-04-09T02:44:40+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-04-09T02:44:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=50428fb5e90b8318148abdf67eefe99bf8fd310b'/>
<id>50428fb5e90b8318148abdf67eefe99bf8fd310b</id>
<content type='text'>
Move wasm-specific members outside of MCSymbolRefExpr::VariantKind (a
legacy interface I am eliminating). Most changes are mechanic and
similar to what I've done for many ELF targets (e.g. X86 #132149)

Notes:

* `fixSymbolsInTLSFixups` is replaced with `setTLS` in
  `WebAssemblyWasmObjectWriter::getRelocType`, similar to what I've done
  for many ELF targets.
* `SymA-&gt;setUsedInGOT()` in `recordRelocation` is moved to
  `getRelocType`.

While here, rename "Modifier' to "Specifier":

&gt; "Relocation modifier", though concise, suggests adjustments happen during the linker's relocation step rather than the assembler's expression evaluation. I landed on "relocation specifier" as the winner. It's clear, aligns with Arm and IBM’s usage, and fits the assembler's role seamlessly.

Pull Request: https://github.com/llvm/llvm-project/pull/133116
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move wasm-specific members outside of MCSymbolRefExpr::VariantKind (a
legacy interface I am eliminating). Most changes are mechanic and
similar to what I've done for many ELF targets (e.g. X86 #132149)

Notes:

* `fixSymbolsInTLSFixups` is replaced with `setTLS` in
  `WebAssemblyWasmObjectWriter::getRelocType`, similar to what I've done
  for many ELF targets.
* `SymA-&gt;setUsedInGOT()` in `recordRelocation` is moved to
  `getRelocType`.

While here, rename "Modifier' to "Specifier":

&gt; "Relocation modifier", though concise, suggests adjustments happen during the linker's relocation step rather than the assembler's expression evaluation. I landed on "relocation specifier" as the winner. It's clear, aligns with Arm and IBM’s usage, and fits the assembler's role seamlessly.

Pull Request: https://github.com/llvm/llvm-project/pull/133116
</pre>
</div>
</content>
</entry>
<entry>
<title>MCValue: Replace getSymSpecifier with getSpecifier</title>
<updated>2025-04-06T06:44:57+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-04-06T06:44:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e5923936109ce4ce7be2c8fb3372b14d33c385d9'/>
<id>e5923936109ce4ce7be2c8fb3372b14d33c385d9</id>
<content type='text'>
Commit 52eb11f925ddeba4e1b3840fd636ee87387f3ada temporarily introduced
getSymSpecifier to prepare for "MCValue: Replace MCSymbolRefExpr members
with MCSymbol" (d5893fc2a7e1191afdb4940469ec9371a319b114). The
refactoring is now complete.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 52eb11f925ddeba4e1b3840fd636ee87387f3ada temporarily introduced
getSymSpecifier to prepare for "MCValue: Replace MCSymbolRefExpr members
with MCSymbol" (d5893fc2a7e1191afdb4940469ec9371a319b114). The
refactoring is now complete.
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly,MC] Replace getSymA()-&gt;getSymbol() with getAddSym. NFC</title>
<updated>2025-04-05T21:01:05+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-04-05T21:01:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=acca419685b0a288e0b06786e6e7bc27bb087578'/>
<id>acca419685b0a288e0b06786e6e7bc27bb087578</id>
<content type='text'>
We will replace the MCSymbolRefExpr member in MCValue with MCSymbol.
This change reduces dependence on MCSymbolRefExpr.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We will replace the MCSymbolRefExpr member in MCValue with MCSymbol.
This change reduces dependence on MCSymbolRefExpr.
</pre>
</div>
</content>
</entry>
<entry>
<title>MCValue: Change getAccessVariant to return uint16_t</title>
<updated>2025-04-05T19:12:11+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-04-05T19:12:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ed2b82fb8b066f8c269be9e403ee20d86b5ead8a'/>
<id>ed2b82fb8b066f8c269be9e403ee20d86b5ead8a</id>
<content type='text'>
Some targets encode the relocation specifier within SymA using
MCSymbolRefExpr::SubclassData. They will cast the specifier
to *MCExpr::Specifier.

Migrate away from the confusing MCSymbolRefExpr::VariantKind.

Note: getAccessVariant is a deprecated method to get the relocation
specifier.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some targets encode the relocation specifier within SymA using
MCSymbolRefExpr::SubclassData. They will cast the specifier
to *MCExpr::Specifier.

Migrate away from the confusing MCSymbolRefExpr::VariantKind.

Note: getAccessVariant is a deprecated method to get the relocation
specifier.
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Remove unused includes (NFC) (#116318)</title>
<updated>2024-11-15T15:26:37+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-11-15T15:26:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=43570a2841e2a8f1efd00503beee751cc1e72513'/>
<id>43570a2841e2a8f1efd00503beee751cc1e72513</id>
<content type='text'>
Identified with misc-include-cleaner.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Identified with misc-include-cleaner.</pre>
</div>
</content>
</entry>
<entry>
<title>[MC] Remove SectionKind from MCSection (#96067)</title>
<updated>2024-06-20T08:52:49+00:00</updated>
<author>
<name>aengelke</name>
<email>engelke@in.tum.de</email>
</author>
<published>2024-06-20T08:52:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=46beeaa3940ef8380ee99b9f666cd27b884f63e4'/>
<id>46beeaa3940ef8380ee99b9f666cd27b884f63e4</id>
<content type='text'>
There are only three actual uses of the section kind in MCSection:
isText(), XCOFF, and WebAssembly. Store isText() in the MCSection, and
store other info in the actual section variants where required.

ELF and COFF flags also encode all relevant information, so for these
two section variants, remove the SectionKind parameter entirely.

This allows to remove the string switch (which is unnecessary and
inaccurate) from createELFSectionImpl. This was introduced in
[D133456](https://reviews.llvm.org/D133456), but apparently, it was
never hit for non-writable sections anyway and the resulting kind was
never used.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are only three actual uses of the section kind in MCSection:
isText(), XCOFF, and WebAssembly. Store isText() in the MCSection, and
store other info in the actual section variants where required.

ELF and COFF flags also encode all relevant information, so for these
two section variants, remove the SectionKind parameter entirely.

This allows to remove the string switch (which is unnecessary and
inaccurate) from createELFSectionImpl. This was introduced in
[D133456](https://reviews.llvm.org/D133456), but apparently, it was
never hit for non-writable sections anyway and the resulting kind was
never used.
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Support `annotate` clang attributes for marking functions.</title>
<updated>2023-07-11T22:17:26+00:00</updated>
<author>
<name>Brendan Dahl</name>
<email>brendan.dahl@gmail.com</email>
</author>
<published>2023-07-11T22:12:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=220fe00a7c0f73164711f0d6cdefacef264b85dc'/>
<id>220fe00a7c0f73164711f0d6cdefacef264b85dc</id>
<content type='text'>
Annotation attributes may be attached to a function to mark it with
custom data that will be contained in the final Wasm file. The
annotation causes a custom section named
"func_attr.annotate.&lt;name&gt;.&lt;arg0&gt;.&lt;arg1&gt;..." to be created that will
contain each function's index value that was marked with the annotation.

A new patchable relocation type for function indexes had to be created so
the custom section could be updated during linking.

Reviewed By: sbc100

Differential Revision: https://reviews.llvm.org/D150803
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Annotation attributes may be attached to a function to mark it with
custom data that will be contained in the final Wasm file. The
annotation causes a custom section named
"func_attr.annotate.&lt;name&gt;.&lt;arg0&gt;.&lt;arg1&gt;..." to be created that will
contain each function's index value that was marked with the annotation.

A new patchable relocation type for function indexes had to be created so
the custom section could be updated during linking.

Reviewed By: sbc100

Differential Revision: https://reviews.llvm.org/D150803
</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Allow import and export of TLS symbols between DSOs</title>
<updated>2021-09-14T13:47:37+00:00</updated>
<author>
<name>Sam Clegg</name>
<email>sbc@chromium.org</email>
</author>
<published>2021-08-26T19:29:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ef8c9135efcb3847fc0e5bbdb55eae18751090df'/>
<id>ef8c9135efcb3847fc0e5bbdb55eae18751090df</id>
<content type='text'>
We previously had a limitation that TLS variables could not
be exported (and therefore could also not be imported).  This
change removed that limitation.

Differential Revision: https://reviews.llvm.org/D108877
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We previously had a limitation that TLS variables could not
be exported (and therefore could also not be imported).  This
change removed that limitation.

Differential Revision: https://reviews.llvm.org/D108877
</pre>
</div>
</content>
</entry>
</feed>
