<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libc/startup, 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>[libc] Add support for MVE to Arm startup code (#167338)</title>
<updated>2025-11-12T15:33:41+00:00</updated>
<author>
<name>Victor Campos</name>
<email>victor.campos@arm.com</email>
</author>
<published>2025-11-12T15:33:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5932477af4948d01ee317e8326954b371d0f0a4f'/>
<id>5932477af4948d01ee317e8326954b371d0f0a4f</id>
<content type='text'>
In order to have MVE support, the same bits of the CPACR register that
enable the floating-point extension must be set.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In order to have MVE support, the same bits of the CPACR register that
enable the floating-point extension must be set.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Enable the FPU in Arm startup code (#166349)</title>
<updated>2025-11-06T10:45:45+00:00</updated>
<author>
<name>Victor Campos</name>
<email>victor.campos@arm.com</email>
</author>
<published>2025-11-06T10:45:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=22b6c491d69e916d9af8221a543570535c923764'/>
<id>22b6c491d69e916d9af8221a543570535c923764</id>
<content type='text'>
This patch enables the FPU in Arm startup code, which is required to run
tests on Arm configurations with hardware floating-point support.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch enables the FPU in Arm startup code, which is required to run
tests on Arm configurations with hardware floating-point support.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] fix sysconf test for rv32 (#162685)</title>
<updated>2025-10-09T18:26:07+00:00</updated>
<author>
<name>Schrodinger ZHU Yifan</name>
<email>yifanzhu@rochester.edu</email>
</author>
<published>2025-10-09T18:26:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e07914b56325e2b614ae070250847ac8cee581e3'/>
<id>e07914b56325e2b614ae070250847ac8cee581e3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Ensure the RPC server is alwaus used</title>
<updated>2025-10-08T22:25:16+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2025-10-08T22:24:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=72ebda2ba50fbcff44b77076cee06d256835a74a'/>
<id>72ebda2ba50fbcff44b77076cee06d256835a74a</id>
<content type='text'>
Summary:
Previous change made us no longer link `exit` by default which implied
the RPC server. This is a required symbol for the loader. This will be
fixed later when I port the loader to LLVMOffload. For now just work
around it to fix the bots.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Previous change made us no longer link `exit` by default which implied
the RPC server. This is a required symbol for the loader. This will be
fixed later when I port the loader to LLVMOffload. For now just work
around it to fix the bots.
</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Make GPU `_end` kernel only call exit callbacks (#162371)</title>
<updated>2025-10-08T15:50:19+00:00</updated>
<author>
<name>Joseph Huber</name>
<email>huberjn@outlook.com</email>
</author>
<published>2025-10-08T15:50:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=8c9c91f3918087a1a84e60ac807434d01a41d4c1'/>
<id>8c9c91f3918087a1a84e60ac807434d01a41d4c1</id>
<content type='text'>
Summary:
We use the infrastructure to stand up a pretend hosted environment on
the GPU. Part of that is calling exit codes and handling the callback.
Exiting from inside a GPU region is problematic as it actually relies on
a lot of GPU magic behind the scenes. This is at least *correct* now as
we use `quick_exit` on the CPU when the GPU calls `exit`. However,
calling `quick_exit` will interfere with instrumentation or benchmarking
that expects a nice teardown order. For normal execution we should do
the friendly option and let the loader utility clean everything up
manually.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
We use the infrastructure to stand up a pretend hosted environment on
the GPU. Part of that is calling exit codes and handling the callback.
Exiting from inside a GPU region is problematic as it actually relies on
a lot of GPU magic behind the scenes. This is at least *correct* now as
we use `quick_exit` on the CPU when the GPU calls `exit`. However,
calling `quick_exit` will interfere with instrumentation or benchmarking
that expects a nice teardown order. For normal execution we should do
the friendly option and let the loader utility clean everything up
manually.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Refactor AUXV handling with new auxv.h header library (#162326)</title>
<updated>2025-10-08T14:00:05+00:00</updated>
<author>
<name>Schrodinger ZHU Yifan</name>
<email>yifanzhu@rochester.edu</email>
</author>
<published>2025-10-08T14:00:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0db5ba0ce6c36c78f93ebfe992c0f9ed807328bb'/>
<id>0db5ba0ce6c36c78f93ebfe992c0f9ed807328bb</id>
<content type='text'>
Closes https://github.com/llvm/llvm-project/issues/153666

This patch introduces a new centralized AUXV (auxiliary vector) handling
mechanism for LLVM libc on Linux, replacing the previous scattered
implementation across multiple files.

## Key Changes:

### New Files:
- **libc/src/__support/OSUtil/linux/auxv.h**: New header library
providing
  a clean interface for AUXV access with:
  - `auxv::Entry` struct for AUXV entries (type and value)
  - `auxv::Vector` class with iterator support for traversing AUXV
  - `auxv::get()` function for retrieving specific AUXV values
- Thread-safe initialization with fallback mechanisms (prctl and
/proc/self/auxv)

### Modified Files:

1. **libc/src/__support/OSUtil/linux/CMakeLists.txt**:
   - Added `auxv` header library declaration with proper dependencies:
     - libc.hdr.fcntl_macros
     - libc.src.__support.OSUtil.osutil
     - libc.src.__support.common
     - libc.src.__support.CPP.optional
     - libc.src.__support.threads.callonce

2. **libc/config/linux/app.h**:
   - Removed `AuxEntry` struct (moved to auxv.h as `auxv::Entry`)
   - Removed `auxv_ptr` from `AppProperties` struct
   - Simplified application properties structure

3. **libc/src/sys/auxv/linux/getauxval.cpp**:
   - Completely refactored to use new auxv.h interface
   - Removed ~200 lines of complex initialization code
   - Simplified to just call `auxv::get()` function
- Removed dependencies to external symbols (mman, prctl, fcntl, read,
close, open)

4. **libc/src/sys/auxv/linux/CMakeLists.txt**:
   - Updated dependencies to use new auxv header library
- Removed dependencies to external symbols (prctl, mman, fcntl, unistd,
etc.)

5. **libc/startup/linux/do_start.cpp**:
   - Updated to use new `auxv::Vector` interface
   - Changed from pointer-based to iterator-based AUXV traversal
- Updated field names (`aux_entry-&gt;id` → `aux_entry.type`,
`aux_entry-&gt;value` → `aux_entry.val`)
- Added call to `auxv::Vector::initialize_unsafe()` for early AUXV setup

6. **libc/startup/linux/CMakeLists.txt**:
   - Added dependency on `libc.src.__support.OSUtil.linux.auxv`</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes https://github.com/llvm/llvm-project/issues/153666

This patch introduces a new centralized AUXV (auxiliary vector) handling
mechanism for LLVM libc on Linux, replacing the previous scattered
implementation across multiple files.

## Key Changes:

### New Files:
- **libc/src/__support/OSUtil/linux/auxv.h**: New header library
providing
  a clean interface for AUXV access with:
  - `auxv::Entry` struct for AUXV entries (type and value)
  - `auxv::Vector` class with iterator support for traversing AUXV
  - `auxv::get()` function for retrieving specific AUXV values
- Thread-safe initialization with fallback mechanisms (prctl and
/proc/self/auxv)

### Modified Files:

1. **libc/src/__support/OSUtil/linux/CMakeLists.txt**:
   - Added `auxv` header library declaration with proper dependencies:
     - libc.hdr.fcntl_macros
     - libc.src.__support.OSUtil.osutil
     - libc.src.__support.common
     - libc.src.__support.CPP.optional
     - libc.src.__support.threads.callonce

2. **libc/config/linux/app.h**:
   - Removed `AuxEntry` struct (moved to auxv.h as `auxv::Entry`)
   - Removed `auxv_ptr` from `AppProperties` struct
   - Simplified application properties structure

3. **libc/src/sys/auxv/linux/getauxval.cpp**:
   - Completely refactored to use new auxv.h interface
   - Removed ~200 lines of complex initialization code
   - Simplified to just call `auxv::get()` function
- Removed dependencies to external symbols (mman, prctl, fcntl, read,
close, open)

4. **libc/src/sys/auxv/linux/CMakeLists.txt**:
   - Updated dependencies to use new auxv header library
- Removed dependencies to external symbols (prctl, mman, fcntl, unistd,
etc.)

5. **libc/startup/linux/do_start.cpp**:
   - Updated to use new `auxv::Vector` interface
   - Changed from pointer-based to iterator-based AUXV traversal
- Updated field names (`aux_entry-&gt;id` → `aux_entry.type`,
`aux_entry-&gt;value` → `aux_entry.val`)
- Added call to `auxv::Vector::initialize_unsafe()` for early AUXV setup

6. **libc/startup/linux/CMakeLists.txt**:
   - Added dependency on `libc.src.__support.OSUtil.linux.auxv`</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Move preinit/init/fini arrays to namespace (#158746)</title>
<updated>2025-09-16T06:48:38+00:00</updated>
<author>
<name>Petr Hosek</name>
<email>phosek@google.com</email>
</author>
<published>2025-09-16T06:48:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5bf399ba957e015e510210e0354cdc72ea1bf88d'/>
<id>5bf399ba957e015e510210e0354cdc72ea1bf88d</id>
<content type='text'>
In change #146863 we moved definitions of preinit/init/fini arrays to
header but unintentionally moved outside of the namespace. Since the
namespace also controls the visibility (through LIBC_NAMESPACE_DECL), as
a consequence these symbols no longer have the hidden visibility which
changes the codegen from:

```
 4: 4c11          ldr     r4, [pc, #0x44]         @ 0x4c &lt;__libc_init_array+0x4c&gt;
 6: 4812          ldr     r0, [pc, #0x48]         @ 0x50 &lt;__libc_init_array+0x50&gt;
 8: 447c          add     r4, pc
 a: 4478          add     r0, pc
 c: 1b00          subs    r0, r0, r4
```

to:

```
 4: 4813          ldr     r0, [pc, #0x4c]         @ 0x54 &lt;__libc_init_array+0x54&gt;
 6: 4914          ldr     r1, [pc, #0x50]         @ 0x58 &lt;__libc_init_array+0x58&gt;
 8: 4478          add     r0, pc
 a: 4479          add     r1, pc
 c: 6804          ldr     r4, [r0]
 e: 6808          ldr     r0, [r1]
10: 1b00          subs    r0, r0, r4
```

The `ldr` will trigger a fault in case where these symbols aren't
pointing to a valid memory location which is sometimes the case when the
array is empty.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In change #146863 we moved definitions of preinit/init/fini arrays to
header but unintentionally moved outside of the namespace. Since the
namespace also controls the visibility (through LIBC_NAMESPACE_DECL), as
a consequence these symbols no longer have the hidden visibility which
changes the codegen from:

```
 4: 4c11          ldr     r4, [pc, #0x44]         @ 0x4c &lt;__libc_init_array+0x4c&gt;
 6: 4812          ldr     r0, [pc, #0x48]         @ 0x50 &lt;__libc_init_array+0x50&gt;
 8: 447c          add     r4, pc
 a: 4478          add     r0, pc
 c: 1b00          subs    r0, r0, r4
```

to:

```
 4: 4813          ldr     r0, [pc, #0x4c]         @ 0x54 &lt;__libc_init_array+0x54&gt;
 6: 4914          ldr     r1, [pc, #0x50]         @ 0x58 &lt;__libc_init_array+0x58&gt;
 8: 4478          add     r0, pc
 a: 4479          add     r1, pc
 c: 6804          ldr     r4, [r0]
 e: 6808          ldr     r0, [r1]
10: 1b00          subs    r0, r0, r4
```

The `ldr` will trigger a fault in case where these symbols aren't
pointing to a valid memory location which is sometimes the case when the
array is empty.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Add boot code for AArch64 (#154789)</title>
<updated>2025-08-21T18:47:34+00:00</updated>
<author>
<name>William Huynh</name>
<email>William.Huynh@arm.com</email>
</author>
<published>2025-08-21T18:47:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=1b9e9e29e2dbbd6f65919c536f93aab787201dd3'/>
<id>1b9e9e29e2dbbd6f65919c536f93aab787201dd3</id>
<content type='text'>
This is required in hermetic testing downstream. It is not complete, and
will not work on hardware, however it runs on QEMU, and can report a
pass/fail on our tests.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is required in hermetic testing downstream. It is not complete, and
will not work on hardware, however it runs on QEMU, and can report a
pass/fail on our tests.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Add startup code for ARM v7-A, ARM v7-R variants (#153576)</title>
<updated>2025-08-15T09:17:50+00:00</updated>
<author>
<name>William Huynh</name>
<email>William.Huynh@arm.com</email>
</author>
<published>2025-08-15T09:17:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=6b16a276ef8fe6b68330ecb57f7c1ee985880967'/>
<id>6b16a276ef8fe6b68330ecb57f7c1ee985880967</id>
<content type='text'>
These variants require a different exception table that requires a bit
of initialisation.

This allows us to enable testing for these variants downstream.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These variants require a different exception table that requires a bit
of initialisation.

This allows us to enable testing for these variants downstream.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc] Cleanup startup/baremetal/arm/start.cpp (#151532)</title>
<updated>2025-08-11T14:11:36+00:00</updated>
<author>
<name>William Huynh</name>
<email>William.Huynh@arm.com</email>
</author>
<published>2025-08-11T14:11:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=372d86dcf1adf90f994be60bb017d92455abb879'/>
<id>372d86dcf1adf90f994be60bb017d92455abb879</id>
<content type='text'>
Post-commit review changes as suggested by @petrhosek in #146863</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Post-commit review changes as suggested by @petrhosek in #146863</pre>
</div>
</content>
</entry>
</feed>
