<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/lld/MachO/InputFiles.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>[lld][macho] Fix segfault while processing malformed object file. (#167025)</title>
<updated>2025-11-11T22:27:03+00:00</updated>
<author>
<name>Prabhu Rajasekaran</name>
<email>prabhukr@google.com</email>
</author>
<published>2025-11-11T22:27:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=abb8c4ba60f6512b63eba1cfc5723248a2e8d635'/>
<id>abb8c4ba60f6512b63eba1cfc5723248a2e8d635</id>
<content type='text'>
Ran into a use case where we had a MachO object file with a section
symbol which did not have a section associated with it segfaults during
linking. This patch aims to handle such cases gracefully and avoid the
linker from crashing.

---------

Co-authored-by: Ellis Hoag &lt;ellis.sparky.hoag@gmail.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ran into a use case where we had a MachO object file with a section
symbol which did not have a section associated with it segfaults during
linking. This patch aims to handle such cases gracefully and avoid the
linker from crashing.

---------

Co-authored-by: Ellis Hoag &lt;ellis.sparky.hoag@gmail.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>[lld][macho] Support 1-byte branch relocs for x86_64 (#164439)</title>
<updated>2025-10-27T15:55:05+00:00</updated>
<author>
<name>Jez Ng</name>
<email>jezng@fb.com</email>
</author>
<published>2025-10-27T15:55:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=eb7386033ad7c51ec6de610f3266c58de6b25e8c'/>
<id>eb7386033ad7c51ec6de610f3266c58de6b25e8c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[lld-macho] Avoid infinite recursion when parsing corrupted export tries (#152569)</title>
<updated>2025-08-30T00:08:35+00:00</updated>
<author>
<name>Daniel Rodríguez Troitiño</name>
<email>danielrodriguez@meta.com</email>
</author>
<published>2025-08-30T00:08:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cbf10bcbb3f43ec035d6ba9cb2f23d7ea7c34c1f'/>
<id>cbf10bcbb3f43ec035d6ba9cb2f23d7ea7c34c1f</id>
<content type='text'>
If an export trie is encoded incorrectly, and one of the children
offsets points back to one of the nodes earlier in the serialization,
the current code will end up in an infinite recursion, and eventually
fail exhausting the available memory.

The failure can be avoided if, before recursing, one checks that the
offset is valid, that is, that the offset is beyond the current
position. This is similar to a check done by llvm-objdump which reports
the trie being corrupted.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If an export trie is encoded incorrectly, and one of the children
offsets points back to one of the nodes earlier in the serialization,
the current code will end up in an infinite recursion, and eventually
fail exhausting the available memory.

The failure can be avoided if, before recursing, one checks that the
offset is valid, that is, that the offset is beyond the current
position. This is similar to a check done by llvm-objdump which reports
the trie being corrupted.</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>[lld] handle re-exports for full framework paths (#137989)</title>
<updated>2025-05-02T16:15:53+00:00</updated>
<author>
<name>Richard Howell</name>
<email>rmaz@users.noreply.github.com</email>
</author>
<published>2025-05-02T16:15:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=58addfbbcc520d925e93f33b2c68dcf657496828'/>
<id>58addfbbcc520d925e93f33b2c68dcf657496828</id>
<content type='text'>
Framework load paths can be either the top level framework name, or
subpaths of the framework bundle pointing to specific framework binary
versions. Extend the framework lookup logic to handle the latter case.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Framework load paths can be either the top level framework name, or
subpaths of the framework bundle pointing to specific framework binary
versions. Extend the framework lookup logic to handle the latter case.</pre>
</div>
</content>
</entry>
<entry>
<title>[lld-macho]Fix bug in finding "chained" re-exported libs. (#135241)</title>
<updated>2025-04-28T17:16:07+00:00</updated>
<author>
<name>Vy Nguyen</name>
<email>vyng@google.com</email>
</author>
<published>2025-04-28T17:16:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c5f61908a75142491143c68fb09caacba8502ae2'/>
<id>c5f61908a75142491143c68fb09caacba8502ae2</id>
<content type='text'>
Details:
When we have the following scenario:

- lib_a re-exports lib_b
- lib_b re-exports @rpath/lib_c
  + lib_b contains LC_RPATH

Previously, lld-macho cannot find lib_c because it was attempting to
resolve the '@rpath' from lib_b (which had no LC_RPATH defined). The
change here is to also consider all the LC_RPATH rom lib_b when trying
to find lib_c.

Inspired by real-life example when linking with
libXCTestSwiftSupport.dylib (which re-exports XCTest, which re-exports
XCTestCore)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Details:
When we have the following scenario:

- lib_a re-exports lib_b
- lib_b re-exports @rpath/lib_c
  + lib_b contains LC_RPATH

Previously, lld-macho cannot find lib_c because it was attempting to
resolve the '@rpath' from lib_b (which had no LC_RPATH defined). The
change here is to also consider all the LC_RPATH rom lib_b when trying
to find lib_c.

Inspired by real-life example when linking with
libXCTestSwiftSupport.dylib (which re-exports XCTest, which re-exports
XCTestCore)</pre>
</div>
</content>
</entry>
<entry>
<title>[lld-macho] Support archives without index (#132942)</title>
<updated>2025-04-10T18:33:56+00:00</updated>
<author>
<name>Leonard Grey</name>
<email>lgrey@chromium.org</email>
</author>
<published>2025-04-10T18:33:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8bea91f677be4a05b1256a8052ab84dcd7ccb050'/>
<id>8bea91f677be4a05b1256a8052ab84dcd7ccb050</id>
<content type='text'>
This is a ~port of https://reviews.llvm.org/D117284. Like in that
change, archives without indices are treated as a collection of lazy
object files (as in `--start-lib/--end-lib`)

Porting the ELF follow-up to convert *all* archives to the lazy object
code path (https://reviews.llvm.org/D119074) is a natural next step, but
we would need to ensure the assertions about memory use hold for Mach-O.

NB: without an index, we can't do the part of the `-ObjC` scan where we
check for Objective-C symbols directly. We *can* still check for
`__obcj` sections so I wonder how much of a problem this actually is,
since I'm not sure how the "symbols but no sections" case can appear in
the wild.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a ~port of https://reviews.llvm.org/D117284. Like in that
change, archives without indices are treated as a collection of lazy
object files (as in `--start-lib/--end-lib`)

Porting the ELF follow-up to convert *all* archives to the lazy object
code path (https://reviews.llvm.org/D119074) is a natural next step, but
we would need to ensure the assertions about memory use hold for Mach-O.

NB: without an index, we can't do the part of the `-ObjC` scan where we
check for Objective-C symbols directly. We *can* still check for
`__obcj` sections so I wonder how much of a problem this actually is,
since I'm not sure how the "symbols but no sections" case can appear in
the wild.</pre>
</div>
</content>
</entry>
<entry>
<title>[lld] load rpaths from tbd files (#134925)</title>
<updated>2025-04-10T14:34:20+00:00</updated>
<author>
<name>Richard Howell</name>
<email>rmaz@users.noreply.github.com</email>
</author>
<published>2025-04-10T14:34:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4b267bb7c2f1f84e10d3d47d17e0a19de6559de2'/>
<id>4b267bb7c2f1f84e10d3d47d17e0a19de6559de2</id>
<content type='text'>
TBD files can contain rpaths, add support for setting them in DylibFile
during construction.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
TBD files can contain rpaths, add support for setting them in DylibFile
during construction.</pre>
</div>
</content>
</entry>
<entry>
<title>[lld] Migrate away from PointerUnion::{is,get} (NFC) (#119993)</title>
<updated>2024-12-15T04:07:08+00:00</updated>
<author>
<name>Kazu Hirata</name>
<email>kazu@google.com</email>
</author>
<published>2024-12-15T04:07:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e04fde193bc2acbaf3ece851479fbd9928c1e280'/>
<id>e04fde193bc2acbaf3ece851479fbd9928c1e280</id>
<content type='text'>
Note that PointerUnion::{is,get} have been soft deprecated in
PointerUnion.h:

  // FIXME: Replace the uses of is(), get() and dyn_cast() with
  //        isa&lt;T&gt;, cast&lt;T&gt; and the llvm::dyn_cast&lt;T&gt;

I'm not touching PointerUnion::dyn_cast for now because it's a bit
complicated; we could blindly migrate it to dyn_cast_if_present, but
we should probably use dyn_cast when the operand is known to be
non-null.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Note that PointerUnion::{is,get} have been soft deprecated in
PointerUnion.h:

  // FIXME: Replace the uses of is(), get() and dyn_cast() with
  //        isa&lt;T&gt;, cast&lt;T&gt; and the llvm::dyn_cast&lt;T&gt;

I'm not touching PointerUnion::dyn_cast for now because it's a bit
complicated; we could blindly migrate it to dyn_cast_if_present, but
we should probably use dyn_cast when the operand is known to be
non-null.</pre>
</div>
</content>
</entry>
<entry>
<title>[lld][MachO] Respect dylibs linked with `-allowable_client` (#114638)</title>
<updated>2024-11-21T01:02:17+00:00</updated>
<author>
<name>Carlo Cabrera</name>
<email>github@carlo.cab</email>
</author>
<published>2024-11-21T01:02:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1de9bc1a27137a7559a247b73c14cfab3be81b54'/>
<id>1de9bc1a27137a7559a247b73c14cfab3be81b54</id>
<content type='text'>
ld64.lld would previously allow you to link against dylibs linked with
`-allowable_client`, even if the client's name does not match any
allowed client.

This change fixes that. See #114146 for related discussion. 

The test binary `liballowable_client.dylib` was created on macOS with:

echo | clang -xc - -dynamiclib -mmacosx-version-min=10.11 -arch x86_64
-Wl,-allowable_client,allowed -o lib/liballowable_client.dylib</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ld64.lld would previously allow you to link against dylibs linked with
`-allowable_client`, even if the client's name does not match any
allowed client.

This change fixes that. See #114146 for related discussion. 

The test binary `liballowable_client.dylib` was created on macOS with:

echo | clang -xc - -dynamiclib -mmacosx-version-min=10.11 -arch x86_64
-Wl,-allowable_client,allowed -o lib/liballowable_client.dylib</pre>
</div>
</content>
</entry>
</feed>
