[libc-commits] [libc] [libc] support PIE relocations (PR #78993)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Mon Jan 22 07:35:13 PST 2024


================
@@ -29,6 +29,9 @@ extern uintptr_t __init_array_start[];
 extern uintptr_t __init_array_end[];
 extern uintptr_t __fini_array_start[];
 extern uintptr_t __fini_array_end[];
+// https://refspecs.linuxbase.org/elf/gabi4+/ch5.dynamic.html#dynamic_section
+[[gnu::weak,
----------------
jhuber6 wrote:

This is `extern_weak` because we expect it to be undefined and thus null with a PIC executable, right?

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


More information about the libc-commits mailing list