Skip to content

Commit

Permalink
AArch64: Prioritise init_have_lse_atomics constructor [PR 105708]
Browse files Browse the repository at this point in the history
Increase the priority of the init_have_lse_atomics constructor so it runs
before other constructors. This improves chances that rr works when LSE
atomics are supported.

libgcc/
	PR libgcc/105708
	* config/aarch64/lse-init.c: Increase constructor priority.
  • Loading branch information
Wilco1 authored and Wilco Dijkstra committed May 25, 2022
1 parent 761cc32 commit 75c4e49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libgcc/config/aarch64/lse-init.c
Expand Up @@ -38,7 +38,9 @@ _Bool __aarch64_have_lse_atomics

unsigned long int __getauxval (unsigned long int);

static void __attribute__((constructor))
/* Use a higher priority to ensure it runs before user constructors
and library constructors with priority 100. */
static void __attribute__((constructor (90)))
init_have_lse_atomics (void)
{
unsigned long hwcap = __getauxval (AT_HWCAP);
Expand Down

0 comments on commit 75c4e49

Please sign in to comment.