[PATCH 48/59] elf: Fix localplt issue with clang
Xi Ruoyao
xry111@xry111.site
Mon Oct 20 12:36:41 GMT 2025
On Fri, 2025-10-17 at 16:13 -0300, Adhemerval Zanella wrote:
> Recent clang version optimizes some loops contructions to strlen [1],
> so adds the symbol on symbol-hacks.h to call the internal __GI_strlen.
>
> [1] https://github.com/llvm/llvm-project/pull/132572/commits/facd7dfc80d655fe49baf4bf27e144a4c890a149
/* snip */
> +#ifdef __clang__
> +/* clang might generate an abort call when cleanup functions (set by
> + __attribute__ ((cleanup)) calls functions not marked as nothrow.
> + We can mitigate by marking some internal functions as __THROW,
> + but it is not possible for functions that issue used-provided
> + callbacks (for instance pthread_once). */
> +asm ("abort = __GI_abort");
> +#endif
> +
It seems not what the commit message describes?
--
Xi Ruoyao <xry111@xry111.site>
More information about the Libc-alpha
mailing list