<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lld/ELF/Target.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] Refactor RelocScan::scan to be target-specific (#163138)</title>
<updated>2025-10-14T06:32:34+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2025-10-14T06:32:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=22bf331933c2b072bc2b2fd00c70b2b3b1c21a98'/>
<id>22bf331933c2b072bc2b2fd00c70b2b3b1c21a98</id>
<content type='text'>
- Extract RelocScan to RelocScan.h. The file includes Target.h, and
cannot be merged with Relocations.h
- Add MIPS and PPC64 specific relocation scanners, removing runtime
checks for other targets.

This refactoring prepares the codebase for better target-specific
optimizations and easier addition of target-specific behavior.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Extract RelocScan to RelocScan.h. The file includes Target.h, and
cannot be merged with Relocations.h
- Add MIPS and PPC64 specific relocation scanners, removing runtime
checks for other targets.

This refactoring prepares the codebase for better target-specific
optimizations and easier addition of target-specific behavior.</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>[ELF] Add a dummySym member to Ctx</title>
<updated>2025-07-30T16:03:34+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@jrtc27.com</email>
</author>
<published>2025-07-30T16:03:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=58e6bc87b7af81a87376f389cd6a107105ba4dcd'/>
<id>58e6bc87b7af81a87376f389cd6a107105ba4dcd</id>
<content type='text'>
This ensures subsequent calls to elf::postScanRelocations with a new Ctx
will correctly use an instance with the right internalFile (with the old
one presumably deleted, even). It also avoids having to create a new
instance in elf::getErrorPlace, and will allow more uses of such a dummy
symbol in future commits.

Reviewers: MaskRay

Reviewed By: MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/150796
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This ensures subsequent calls to elf::postScanRelocations with a new Ctx
will correctly use an instance with the right internalFile (with the old
one presumably deleted, even). It also avoids having to create a new
instance in elf::getErrorPlace, and will allow more uses of such a dummy
symbol in future commits.

Reviewers: MaskRay

Reviewed By: MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/150796
</pre>
</div>
</content>
</entry>
<entry>
<title>[lld] Remove unused includes (NFC) (#141421)</title>
<updated>2025-05-25T17:55:39+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2025-05-25T17:55:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=19f00c0570582e93140642cbb62e5b820722c8f1'/>
<id>19f00c0570582e93140642cbb62e5b820722c8f1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] Change getSrcMsg to use ELFSyncStream. NFC</title>
<updated>2024-11-30T01:18:22+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2024-11-30T01:18:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1f13713dbb323d678c37efd5aa98a69e8f633b26'/>
<id>1f13713dbb323d678c37efd5aa98a69e8f633b26</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] Remove unneeded Twine in ELFSyncStream</title>
<updated>2024-11-24T20:13:02+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2024-11-24T20:13:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1cd627562b8b66b5f9b0797fc45afcfa054daedd'/>
<id>1cd627562b8b66b5f9b0797fc45afcfa054daedd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] Replace internalLinkerError(getErrorLoc(ctx, buf) + ...) with InternalErr(ctx, buf)</title>
<updated>2024-11-16T21:07:17+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2024-11-16T21:07:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=be5dad012eb75d61935f6c76034a8867f7443731'/>
<id>be5dad012eb75d61935f6c76034a8867f7443731</id>
<content type='text'>
and simplify `+ toStr(ctx, x)` to `&lt;&lt; x`.
The trailing '\n' &lt;&lt; llvm::getBugReportMsg() is not very useful and
therefore removed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and simplify `+ toStr(ctx, x)` to `&lt;&lt; x`.
The trailing '\n' &lt;&lt; llvm::getBugReportMsg() is not very useful and
therefore removed.
</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] Replace contex-less toString(x) with toStr(ctx, x)</title>
<updated>2024-11-16T19:58:10+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2024-11-16T19:58:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=58a971f42f1f2b2e25995c8cad439f4aa07c024d'/>
<id>58a971f42f1f2b2e25995c8cad439f4aa07c024d</id>
<content type='text'>
so that we can remove the global `ctx` from toString implementations.
Rename lld::toString (to lld::elf::toStr) to simplify name lookup (we
have many llvm::toString and another lld::toString(const llvm::opt::Arg
&amp;)).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
so that we can remove the global `ctx` from toString implementations.
Rename lld::toString (to lld::elf::toStr) to simplify name lookup (we
have many llvm::toString and another lld::toString(const llvm::opt::Arg
&amp;)).
</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] Replace fatal(...) with Fatal or Err</title>
<updated>2024-11-07T05:17:26+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2024-11-07T05:17:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=63c6fe4a0b18d5eaa50c002185cd270f20cf131b'/>
<id>63c6fe4a0b18d5eaa50c002185cd270f20cf131b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[ELF] Add context-aware diagnostic functions (#112319)</title>
<updated>2024-11-06T16:25:58+00:00</updated>
<author>
<name>Fangrui Song</name>
<email>i@maskray.me</email>
</author>
<published>2024-11-06T16:25:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=201d7607f87afff999b1257d27569a3053b85143'/>
<id>201d7607f87afff999b1257d27569a3053b85143</id>
<content type='text'>
The current diagnostic functions log/warn/error/fatal lack a context
argument and call the global `lld::errorHandler()`, which prevents
multiple lld instances in one process.

This patch introduces context-aware replacements:

* log =&gt; Log(ctx)
* warn =&gt; Warn(ctx)
* errorOrWarn =&gt; Err(ctx)
* error =&gt; ErrAlways(ctx)
* fatal =&gt; Fatal(ctx)

Example: `errorOrWarn(toString(f) + "xxx")` =&gt; `Err(ctx) &lt;&lt; f &lt;&lt; "xxx"`.
(`toString(f)` is shortened to `f` as a bonus and may access `ctx`
without accessing the global variable (see `Target.cpp`)).

`ctx.e = &amp;context-&gt;e;` can be replaced with a non-global Errorhandler
when `ctx` becomes a local variable.

(For the ELF port, the long term goal is to eliminate `error`. Most can
be straightforwardly converted to `Err(ctx)`.)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current diagnostic functions log/warn/error/fatal lack a context
argument and call the global `lld::errorHandler()`, which prevents
multiple lld instances in one process.

This patch introduces context-aware replacements:

* log =&gt; Log(ctx)
* warn =&gt; Warn(ctx)
* errorOrWarn =&gt; Err(ctx)
* error =&gt; ErrAlways(ctx)
* fatal =&gt; Fatal(ctx)

Example: `errorOrWarn(toString(f) + "xxx")` =&gt; `Err(ctx) &lt;&lt; f &lt;&lt; "xxx"`.
(`toString(f)` is shortened to `f` as a bonus and may access `ctx`
without accessing the global variable (see `Target.cpp`)).

`ctx.e = &amp;context-&gt;e;` can be replaced with a non-global Errorhandler
when `ctx` becomes a local variable.

(For the ELF port, the long term goal is to eliminate `error`. Most can
be straightforwardly converted to `Err(ctx)`.)</pre>
</div>
</content>
</entry>
</feed>
