mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 14:00:30 +00:00
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>
This commit is contained in:
parent
43cea6d565
commit
5f07d47e4b
2
configure
vendored
2
configure
vendored
@ -5793,7 +5793,7 @@ if ${libc_cv_insert+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user