Skip to content

Commit 71fb765

Browse files
committed
Add warnings about modifying the GNU C Library for LSI.
1 parent f2b7707 commit 71fb765

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

content/learning-paths/servers-and-cloud-computing/glibc-with-lse/build_glibc_with_lse.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ weight: 2 # (intro is 1), 2 is first, 3 is second, etc.
88
layout: "learningpathall"
99
---
1010

11-
1211
## Overview
12+
1313
"Glibc with LSE" refers to the version of [the GNU C Library (glibc)](https://www.gnu.org/software/libc/) that includes support for [LSE (Large Systems Extensions)](https://learn.arm.com/learning-paths/servers-and-cloud-computing/lse/). LSE is an extension to the ARMv8-A architecture that provides enhanced atomic operations and memory model features.
1414

1515
LSE introduces additional atomic instructions and operations, such as Load-Acquire, Store-Release, and Atomic Compare-and-Swap (CAS). These operations allow for more efficient synchronization and concurrent access to shared memory in multi-threaded applications running on ARMv8-A processors.
1616

1717
When glibc is compiled with LSE support, it can take advantage of these enhanced atomic operations provided by the LSE extension. This can potentially improve the performance of multi-threaded applications that heavily rely on atomic operations and synchronization primitives.
1818

19-
{{% notice Note %}}
19+
{{% notice Warning %}}
20+
If you have a recent version of Linux, you probably do not need to change your GNU C Library.
21+
2022
Your version of the GNU C Library may already have support for LSE. Before you build a new version check if LSE is already included by running:
2123

2224
```console
@@ -25,6 +27,8 @@ objdump -d /lib/aarch64-linux-gnu/libc.so.6 | grep -i 'cas\|casp\|swp\|ldadd\|st
2527

2628
If a non-zero number is printed your GNU C Library already has LSE.
2729

30+
Most recent Linux distributions, including Ubuntu 22.04 and Ubuntu 24.04, already have LSE included in the GNU C Library.
31+
2832
{{% /notice %}}
2933

3034
## Before you begin
@@ -39,6 +43,12 @@ sudo apt install -y gcc-10 g++-10 gawk bison make
3943
```
4044

4145
## Build and Install Glibc
46+
47+
48+
{{% notice Danger %}}
49+
Incorrectly modifying the GNU C Library on your system may result in failing applications or complete system failure. You should use a temporary virtual machine which can be deleted if problems occur.
50+
{{% /notice %}}
51+
4252
You can now checkout the glibc source package and create a build directory:
4353

4454
```bash

0 commit comments

Comments
 (0)