From 1f503475a56b198a86cd7df1a3869aec81baf1eb Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 7 Feb 2003 20:46:55 +0000 Subject: Update. 2003-02-07 Jakub Jelinek * resolv/res_libc.c (_res): Ensure _res is not common symbol, so that it can have aliases. * inet/herrno.c (h_errno): Put it into .bss not .data section. Patch by Lance Larsh . --- resolv/res_libc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'resolv/res_libc.c') 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. */ -- cgit 1.4.1