about summary refs log tree commit diff
path: root/resolv
diff options
context:
space:
mode:
Diffstat (limited to 'resolv')
-rw-r--r--resolv/res_libc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/resolv/res_libc.c b/resolv/res_libc.c
index 9bd4e5c747..763a88725a 100644
--- a/resolv/res_libc.c
+++ b/resolv/res_libc.c
@@ -77,8 +77,11 @@ extern __thread struct __res_state __libc_res __attribute__ ((alias ("_res")))
   attribute_hidden;
 # define _res __libc_res
 #else
-/* The resolver state for use by single-threaded programs.  */
-struct __res_state _res;
+/* The resolver state for use by single-threaded programs.
+   This differs from plain `struct __res_state _res;' in that it doesn't
+   create a common definition, but a plain symbol that resides in .bss,
+   which can have an alias.  */
+struct __res_state _res __attribute__((section (".bss")));
 
 /* We declare this with compat_symbol so that it's not
    visible at link time.  Programs must use the accessor functions.  */