diff options
author | Fangrui Song <maskray@google.com> | 2021-09-13 12:39:20 -0700 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2021-09-13 12:39:20 -0700 |
commit | 5f07d47e4b3d137edfbe3ea6c4eeba1ea6cfa54d (patch) | |
tree | 9e0b40d482c03388e69acbb4f1028fd1fc0542ca /configure.ac | |
parent | 43cea6d5652b6b9e61ac6ecc69419c909b504f47 (diff) | |
download | glibc-5f07d47e4b3d137edfbe3ea6c4eeba1ea6cfa54d.tar glibc-5f07d47e4b3d137edfbe3ea6c4eeba1ea6cfa54d.tar.gz glibc-5f07d47e4b3d137edfbe3ea6c4eeba1ea6cfa54d.tar.bz2 glibc-5f07d47e4b3d137edfbe3ea6c4eeba1ea6cfa54d.zip |
configure: Fix check for INSERT in linker script
GCC/Clang use local access when referencing a const variable,
so the conftest.so may have no dynamic relocation.
LLD reports `error: unable to insert .foo after .rela.dyn` when the
destination section does not exist.
Use a non-const int to ensure that .rela.dyn exists.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index d9232418de..00f49f09f7 100644 --- a/configure.ac +++ b/configure.ac @@ -1217,7 +1217,7 @@ AC_SUBST(libc_cv_protected_data) AC_CACHE_CHECK(linker support for INSERT in linker script, libc_cv_insert, [cat > conftest.c <<EOF - const int __attribute__ ((section(".bar"))) bar = 0x12345678; + int __attribute__ ((section(".bar"))) bar = 0x12345678; int test (void) { return bar; } EOF cat > conftest.t <<EOF |