<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lld/ELF/SyntheticSections.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>ELF: Use index 0 for unversioned undefined symbols (#168189)</title>
<updated>2025-11-22T20:54:50+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-11-22T20:54:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d96a93ff00ac02bc523d36dd2e687d597a068ae1'/>
<id>d96a93ff00ac02bc523d36dd2e687d597a068ae1</id>
<content type='text'>
The GNU documentation is ambiguous about the version index for
unversioned undefined symbols. The current specification at
https://sourceware.org/gnu-gabi/program-loading-and-dynamic-linking.txt
defines VER_NDX_LOCAL (0) as "The symbol is private, and is not
available outside this object."

However, this naming is misleading for undefined symbols. As suggested
in
discussions, VER_NDX_LOCAL should conceptually be VER_NDX_NONE and apply
to unversioned undefined symbols as well.

GNU ld has used index 0 for unversioned undefined symbols both before
version 2.35 (see https://sourceware.org/PR26002) and in the upcoming
2.46 release (see https://sourceware.org/PR33577). This change aligns
with GNU ld's behavior by switching from index 1 to index 0.

While here, add a test to dso-undef-extract-lazy.s that undefined
symbols of index 0 in DSO are treated as unversioned symbols.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The GNU documentation is ambiguous about the version index for
unversioned undefined symbols. The current specification at
https://sourceware.org/gnu-gabi/program-loading-and-dynamic-linking.txt
defines VER_NDX_LOCAL (0) as "The symbol is private, and is not
available outside this object."

However, this naming is misleading for undefined symbols. As suggested
in
discussions, VER_NDX_LOCAL should conceptually be VER_NDX_NONE and apply
to unversioned undefined symbols as well.

GNU ld has used index 0 for unversioned undefined symbols both before
version 2.35 (see https://sourceware.org/PR26002) and in the upcoming
2.46 release (see https://sourceware.org/PR33577). This change aligns
with GNU ld's behavior by switching from index 1 to index 0.

While here, add a test to dso-undef-extract-lazy.s that undefined
symbols of index 0 in DSO are treated as unversioned symbols.</pre>
</div>
</content>
</entry>
<entry>
<title>Remove shadowing "size" field from classes that inherit from SyntheticSection (#166323)</title>
<updated>2025-11-17T16:50:14+00:00</updated>
<author>
<name>Sterling-Augustine</name>
<email>saugustine@google.com</email>
</author>
<published>2025-11-17T16:50:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=83fc85c9547e7e55b326f86e946cff8358cbe0c2'/>
<id>83fc85c9547e7e55b326f86e946cff8358cbe0c2</id>
<content type='text'>
A field-named 'size' already available and perfectly usable via
inheritance from InputSection, and these variables shadow it for no good
reason.

The only interesting change here is in PaddingSection, because a
parent's field cannot be initialized via a constructor initializer list,
setting it needs to be done inside the constructor body.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A field-named 'size' already available and perfectly usable via
inheritance from InputSection, and these variables shadow it for no good
reason.

The only interesting change here is in PaddingSection, because a
parent's field cannot be initialized via a constructor initializer list,
setting it needs to be done inside the constructor body.</pre>
</div>
</content>
</entry>
<entry>
<title>[lld] Remove redundant declarations (NFC) (#166712)</title>
<updated>2025-11-06T14:51:49+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-11-06T14:51:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=753d4bc57147996de81608a55907290351f6dd4b'/>
<id>753d4bc57147996de81608a55907290351f6dd4b</id>
<content type='text'>
In C++17, static constexpr members are implicitly inline, so they no
longer require an out-of-line definition.

Identified with readability-redundant-declaration.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In C++17, static constexpr members are implicitly inline, so they no
longer require an out-of-line definition.

Identified with readability-redundant-declaration.</pre>
</div>
</content>
</entry>
<entry>
<title>ELF: Rename RandomizePaddingSection to PaddingSection.</title>
<updated>2025-10-30T18:28:37+00:00</updated>
<author>
<name>Peter Collingbourne</name>
<email>pcc@google.com</email>
</author>
<published>2025-10-30T18:28:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=87673d3fa7398af1ae581121a1b971808407d778'/>
<id>87673d3fa7398af1ae581121a1b971808407d778</id>
<content type='text'>
This section type is about to be used by #147424 so let's give it a more
generic name.

Reviewers: smithp35, MaskRay

Reviewed By: MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/155540
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This section type is about to be used by #147424 so let's give it a more
generic name.

Reviewers: smithp35, MaskRay

Reviewed By: MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/155540
</pre>
</div>
</content>
</entry>
<entry>
<title>ELF: Store EhInputSection relocations to simplify code. NFC</title>
<updated>2025-09-29T16:15:25+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-09-29T16:15:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3b299af92383cb7558224482ccfa714f0162f772'/>
<id>3b299af92383cb7558224482ccfa714f0162f772</id>
<content type='text'>
Store relocations directly as `SmallVector&lt;Relocation, 0&gt;` within
EhInputSection to avoid processing different relocation formats
(REL/RELA/CREL) throughout the codebase.

Next: Refactor RelocationScanner to utilize EhInputSection::rels

Pull Request: https://github.com/llvm/llvm-project/pull/161041
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Store relocations directly as `SmallVector&lt;Relocation, 0&gt;` within
EhInputSection to avoid processing different relocation formats
(REL/RELA/CREL) throughout the codebase.

Next: Refactor RelocationScanner to utilize EhInputSection::rels

Pull Request: https://github.com/llvm/llvm-project/pull/161041
</pre>
</div>
</content>
</entry>
<entry>
<title>ELF: EhFrameSection: Remove unused template parameters</title>
<updated>2025-09-24T16:58:00+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-09-24T16:58:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5fde3e884beb2b93cbd0455ccd9f22e9e30b1470'/>
<id>5fde3e884beb2b93cbd0455ccd9f22e9e30b1470</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>ELF: Split relocateAlloc to relocateAlloc and relocateEh. NFC</title>
<updated>2025-09-22T16:08:12+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-09-22T16:08:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=fd5d7c5048501c3cf2f71ab7b1544ebe5c6816b7'/>
<id>fd5d7c5048501c3cf2f71ab7b1544ebe5c6816b7</id>
<content type='text'>
relocateAlloc can be called with either InputSection (including
SyntheticSection like GotSection) or EhInputSection.

Introduce relocateEh so that we can remove some boilerplate and replace
relocateAlloc's parameter type with `InputSection`.

Pull Request: https://github.com/llvm/llvm-project/pull/160031
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
relocateAlloc can be called with either InputSection (including
SyntheticSection like GotSection) or EhInputSection.

Introduce relocateEh so that we can remove some boilerplate and replace
relocateAlloc's parameter type with `InputSection`.

Pull Request: https://github.com/llvm/llvm-project/pull/160031
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFC][ELF] Replace DynamicReloc::Kind with the equivalent bool in APIs</title>
<updated>2025-07-30T16:08:36+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@jrtc27.com</email>
</author>
<published>2025-07-30T16:08:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=52ddcfd8d6c078b3e5ae3c230eea67a466d64f0f'/>
<id>52ddcfd8d6c078b3e5ae3c230eea67a466d64f0f</id>
<content type='text'>
DynamicReloc::AgainstSymbol is now true and DynamicReloc::AddendOnly is
now false; uses of the constants were replaced mechanically.

Reviewers: rnk, MaskRay

Reviewed By: MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/150813
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
DynamicReloc::AgainstSymbol is now true and DynamicReloc::AddendOnly is
now false; uses of the constants were replaced mechanically.

Reviewers: rnk, MaskRay

Reviewed By: MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/150813
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFCI][ELF] Store DynamicReloc Kind as two bools</title>
<updated>2025-07-30T16:08:14+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@jrtc27.com</email>
</author>
<published>2025-07-30T16:08:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=ab12b43047fb3cb1fd80a508299c4a553065b023'/>
<id>ab12b43047fb3cb1fd80a508299c4a553065b023</id>
<content type='text'>
Aside from Computed, Kind is now just AddendOnly and AgainstSymbol, so
it's really just a bool reflecting whether the resulting ELF relocation
should reference the symbol or not. Refactor DynamicReloc's storage to
reflect this, splitting Computed out into its own orthogonal isFinal
bool. As part of this, rename computeRaw to finalize to reflect that
it's side-effecting.

This also allows needsDynSymIndex() to work even after finalize(), so
drop the existing assertion.

A future commit will refact the DynamicReloc API to take isAgainstSymbol
directly now the enum serves little purpose, as a more invasive,
mechanical change. For this commit we keep DynamicReloc::Kind as the
external API.

Reviewers: MaskRay, arichardson

Reviewed By: MaskRay, arichardson

Pull Request: https://github.com/llvm/llvm-project/pull/150812
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Aside from Computed, Kind is now just AddendOnly and AgainstSymbol, so
it's really just a bool reflecting whether the resulting ELF relocation
should reference the symbol or not. Refactor DynamicReloc's storage to
reflect this, splitting Computed out into its own orthogonal isFinal
bool. As part of this, rename computeRaw to finalize to reflect that
it's side-effecting.

This also allows needsDynSymIndex() to work even after finalize(), so
drop the existing assertion.

A future commit will refact the DynamicReloc API to take isAgainstSymbol
directly now the enum serves little purpose, as a more invasive,
mechanical change. For this commit we keep DynamicReloc::Kind as the
external API.

Reviewers: MaskRay, arichardson

Reviewed By: MaskRay, arichardson

Pull Request: https://github.com/llvm/llvm-project/pull/150812
</pre>
</div>
</content>
</entry>
<entry>
<title>[NFCI][ELF][Mips] Replace MipsMultiGotPage with new RE_MIPS_OSEC_LOCAL_PAGE</title>
<updated>2025-07-30T16:07:22+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@jrtc27.com</email>
</author>
<published>2025-07-30T16:07:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=06d5e87e659a19e7acfa6d7ff6545fb2361ff012'/>
<id>06d5e87e659a19e7acfa6d7ff6545fb2361ff012</id>
<content type='text'>
Instead of having a special DynamicReloc::Kind, we can just use a new
RelExpr for the calculation needed. The only odd thing we do that allows
this is to keep a representative symbol for the OutputSection in
question (the first we see for it) around to use in this relocation for
the addend calculation.

This reduces DynamicReloc to just AddendOnly vs AgainstSymbol, plus the
internal Computed.

Reviewers: MaskRay, arichardson

Reviewed By: MaskRay, arichardson

Pull Request: https://github.com/llvm/llvm-project/pull/150810
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of having a special DynamicReloc::Kind, we can just use a new
RelExpr for the calculation needed. The only odd thing we do that allows
this is to keep a representative symbol for the OutputSection in
question (the first we see for it) around to use in this relocation for
the addend calculation.

This reduces DynamicReloc to just AddendOnly vs AgainstSymbol, plus the
internal Computed.

Reviewers: MaskRay, arichardson

Reviewed By: MaskRay, arichardson

Pull Request: https://github.com/llvm/llvm-project/pull/150810
</pre>
</div>
</content>
</entry>
</feed>
