[llvm-branch-commits] [libc] Drop elf.h include from dl_phdr_info header (PR #193653)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Apr 22 20:53:40 PDT 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Aiden Grossman (boomanaiden154)

<details>
<summary>Changes</summary>

This is a public header which can cause problems in some build
configurations (e.g., clang fails to find elf.h in my build
configuration given it is hermetic). All the types that are actually
needed in the file are also included properly through the internal
headers through link-macros.h.


---
Full diff: https://github.com/llvm/llvm-project/pull/193653.diff


1 Files Affected:

- (modified) libc/include/llvm-libc-types/struct_dl_phdr_info.h (-1) 


``````````diff
diff --git a/libc/include/llvm-libc-types/struct_dl_phdr_info.h b/libc/include/llvm-libc-types/struct_dl_phdr_info.h
index 2b9a5d21b4a13..e336c010f4321 100644
--- a/libc/include/llvm-libc-types/struct_dl_phdr_info.h
+++ b/libc/include/llvm-libc-types/struct_dl_phdr_info.h
@@ -11,7 +11,6 @@
 
 #include "../llvm-libc-macros/link-macros.h"
 #include "size_t.h"
-#include <elf.h>
 #include <stdint.h>
 
 struct dl_phdr_info {

``````````

</details>


https://github.com/llvm/llvm-project/pull/193653


More information about the llvm-branch-commits mailing list