| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc] fix sysconf test for rv32 (#162685) | 9 个月前 | |
[libc] fix sysconf test for rv32 (#162685) | 9 个月前 | |
[libc] fix sysconf test for rv32 (#162685) | 9 个月前 | |
[libc] Refactor AUXV handling with new auxv.h header library (#162326) 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->id → aux_entry.type, aux_entry->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 | 9 个月前 | |
[libc][NFC] Rename "loader" to "startup". Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D140049 | 3 年前 | |
[libc][NFC] Rename "loader" to "startup". Reviewed By: lntue Differential Revision: https://reviews.llvm.org/D140049 | 3 年前 | |
[libc] Refactor AUXV handling with new auxv.h header library (#162326) 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->id → aux_entry.type, aux_entry->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 | 9 个月前 | |
[libc] Implement 'getenv' on the GPU target (#102376) Summary: This patch implements 'getenv'. I was torn on how to implement this, since realistically we only have access to this environment pointer in the "loader" interface. An alternative would be to use an RPC call every time, but I think that's overkill for what this will be used for. A better solution is just to emit a common DataEnvironment that contains all of the host visible resources to initialize. Right now this is the env_ptr, clock_freq, and rpc_client. I did this by making the app.h interface that Linux uses more general, could possibly move that into a separate patch, but I figured it's easier to see with the usage. | 1 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 9 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 9 个月前 | ||
| 3 年前 | ||
| 3 年前 | ||
| 9 个月前 | ||
| 1 年前 |