<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/llvm/lib/MC/ELFObjectWriter.cpp, branch users/nico/python-2</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>MCAssembler: Optimize PCRel fixups</title>
<updated>2025-07-03T07:01:53+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-07-03T07:01:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9234d077522ea3718e9486a28df49e7cfb4c336a'/>
<id>9234d077522ea3718e9486a28df49e7cfb4c336a</id>
<content type='text'>
* MCAssembler::evaluateFixup sets MCFixup::PCRel.
* ELFObjectWriter retrieves the bit from the MCFixup argument.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* MCAssembler::evaluateFixup sets MCFixup::PCRel.
* ELFObjectWriter retrieves the bit from the MCFixup argument.
</pre>
</div>
</content>
</entry>
<entry>
<title>ELFObjectWriter: Optimize isInSymtab</title>
<updated>2025-07-03T02:35:18+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-07-03T02:35:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=a25887077bd52754d66d837da4778339eff4f764'/>
<id>a25887077bd52754d66d837da4778339eff4f764</id>
<content type='text'>
Drop `OWriter.Renames.count(&amp;Symbol)` from the fast path
(Used||Signature).
Place the two equated symbol (isVariable()) conditions together.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Drop `OWriter.Renames.count(&amp;Symbol)` from the fast path
(Used||Signature).
Place the two equated symbol (isVariable()) conditions together.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "ELFObjectWriter: Optimize isInSymtab"</title>
<updated>2025-07-02T07:08:42+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-07-02T07:08:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9262ac3ee4d570f1f4a7300c1d723900cb7bc9bd'/>
<id>9262ac3ee4d570f1f4a7300c1d723900cb7bc9bd</id>
<content type='text'>
This reverts commit 1108cf64196a056aa350baba98e3fab6d7529a59.

Caused a regression for a weird but interesting case (STT_SECTION symbol
as group signature). We no longer define `sec`
```
.section sec,"ax"
.section .foo,"axG",@progbits,sec
nop
```

Fix #146581
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 1108cf64196a056aa350baba98e3fab6d7529a59.

Caused a regression for a weird but interesting case (STT_SECTION symbol
as group signature). We no longer define `sec`
```
.section sec,"ax"
.section .foo,"axG",@progbits,sec
nop
```

Fix #146581
</pre>
</div>
</content>
</entry>
<entry>
<title>MC: Merge MCFragment.h into MCSection.h</title>
<updated>2025-06-30T16:41:53+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-06-30T16:41:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=04395be630781451682060548ea8b94abec2947e'/>
<id>04395be630781451682060548ea8b94abec2947e</id>
<content type='text'>
... due to their close relationship. MCSection's inline functions (e.g.
iterator) access MCFragment, and we want MCFragment's inline functions
to access MCSection similarly (#146307).

Pull Request: https://github.com/llvm/llvm-project/pull/146315
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... due to their close relationship. MCSection's inline functions (e.g.
iterator) access MCFragment, and we want MCFragment's inline functions
to access MCSection similarly (#146307).

Pull Request: https://github.com/llvm/llvm-project/pull/146315
</pre>
</div>
</content>
</entry>
<entry>
<title>ELFObjectWriter: Optimize isInSymtab</title>
<updated>2025-06-29T00:36:14+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-06-29T00:36:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1108cf64196a056aa350baba98e3fab6d7529a59'/>
<id>1108cf64196a056aa350baba98e3fab6d7529a59</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MC: Reduce MCSymbolRefExpr::VK_None uses</title>
<updated>2025-06-28T04:46:36+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-06-28T04:46:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5aa3e6baa0b07951112cb8782a421c968b39dfb3'/>
<id>5aa3e6baa0b07951112cb8782a421c968b39dfb3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MC: Clear some members in reset</title>
<updated>2025-06-02T04:20:25+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-06-02T04:20:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2a673078b237e77f49b7c49143fc1b928314ac85'/>
<id>2a673078b237e77f49b7c49143fc1b928314ac85</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MC: Allow .set to reassign non-MCConstantExpr expressions</title>
<updated>2025-05-27T04:58:18+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-05-27T04:58:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e015626f189dc76f8df9fdc25a47638c6a2f3feb'/>
<id>e015626f189dc76f8df9fdc25a47638c6a2f3feb</id>
<content type='text'>
GNU Assembler supports symbol reassignment via .set, .equ, or =.
However, LLVM's integrated assembler only allows reassignment for
MCConstantExpr cases, as it struggles with scenarios like:

```
.data
.set x, 0
.long x         // reference the first instance
x = .-.data
.long x         // reference the second instance
.set x,.-.data
.long x         // reference the third instance
```

Between two assignments binds, we cannot ensure that a reference binds
to the earlier assignment. We use MCSymbol::IsUsed and other conditions
to reject potentially unsafe reassignments, but certain MCConstantExpr
uses could be unsafe as well.

This patch enables reassignment by cloning the symbol upon reassignment
and updating the symbol table. Existing references to the original
symbol remain unchanged, and the original symbol is excluded from the
emitted symbol table.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GNU Assembler supports symbol reassignment via .set, .equ, or =.
However, LLVM's integrated assembler only allows reassignment for
MCConstantExpr cases, as it struggles with scenarios like:

```
.data
.set x, 0
.long x         // reference the first instance
x = .-.data
.long x         // reference the second instance
.set x,.-.data
.long x         // reference the third instance
```

Between two assignments binds, we cannot ensure that a reference binds
to the earlier assignment. We use MCSymbol::IsUsed and other conditions
to reject potentially unsafe reassignments, but certain MCConstantExpr
uses could be unsafe as well.

This patch enables reassignment by cloning the symbol upon reassignment
and updating the symbol table. Existing references to the original
symbol remain unchanged, and the original symbol is excluded from the
emitted symbol table.
</pre>
</div>
</content>
</entry>
<entry>
<title>ELFObjectWriter: Simplify STT_SECTION adjustment</title>
<updated>2025-05-26T04:41:02+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-05-26T04:41:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fe518e77d3e363ea14ac21dd8fd4ae7b2807e88f'/>
<id>fe518e77d3e363ea14ac21dd8fd4ae7b2807e88f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>MC: Rework .weakref</title>
<updated>2025-05-26T04:09:55+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-05-26T04:09:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=95756e67c230c231c616a9aeabc2eea1e2831829'/>
<id>95756e67c230c231c616a9aeabc2eea1e2831829</id>
<content type='text'>
Use a variable symbol without any specifier instead of VK_WEAKREF.
Add code in ELFObjectWriter::executePostLayoutBinding to check
whether the target should be made an undefined weak symbol.

This change fixes several issues:

* Unreferenced `.weakref alias, target` no longer creates an undefined `target`.
* When `alias` is already defined, report an error instead of crashing.

.weakref is specific to ELF. llvm-ml has reused the VK_WEAKREF name for
a different concept. wasm incorrectly copied the ELF implementation.
Remove it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use a variable symbol without any specifier instead of VK_WEAKREF.
Add code in ELFObjectWriter::executePostLayoutBinding to check
whether the target should be made an undefined weak symbol.

This change fixes several issues:

* Unreferenced `.weakref alias, target` no longer creates an undefined `target`.
* When `alias` is already defined, report an error instead of crashing.

.weakref is specific to ELF. llvm-ml has reused the VK_WEAKREF name for
a different concept. wasm incorrectly copied the ELF implementation.
Remove it.
</pre>
</div>
</content>
</entry>
</feed>
