diff options
author | Wilco Dijkstra <wilco.dijkstra@arm.com> | 2022-05-25 14:29:03 +0100 |
---|---|---|
committer | Wilco Dijkstra <wdijkstr@arm.com> | 2022-05-25 15:53:30 +0100 |
commit | 75c4e4909ae2667f56487434f99c2915b4570794 (patch) | |
tree | 91dccdd40b2e15eb2721f2615f54b1706c3e216f /libgcc | |
parent | 761cc32e5a1c762f91904d2a86980f106a5bc441 (diff) | |
download | gcc-75c4e4909ae2667f56487434f99c2915b4570794.zip gcc-75c4e4909ae2667f56487434f99c2915b4570794.tar.gz gcc-75c4e4909ae2667f56487434f99c2915b4570794.tar.bz2 |
AArch64: Prioritise init_have_lse_atomics constructor [PR 105708]
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.
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/config/aarch64/lse-init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libgcc/config/aarch64/lse-init.c b/libgcc/config/aarch64/lse-init.c index fc875b7..33b97c8 100644 --- a/libgcc/config/aarch64/lse-init.c +++ b/libgcc/config/aarch64/lse-init.c @@ -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); |