diff options
author | Ulrich Drepper <drepper@gmail.com> | 2011-09-10 14:34:15 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-09-10 14:34:15 -0400 |
commit | 3ce1f2959437e952b9db4eaeed2407424f11a4d1 (patch) | |
tree | db47da854c7d3bfc2c3bce4c6fc8381075ac9ec4 /elf | |
parent | 1248c1c41508387ff282b208636737e8cdc9b5b0 (diff) | |
download | glibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.tar.gz glibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.tar.xz glibc-3ce1f2959437e952b9db4eaeed2407424f11a4d1.zip |
Cleanup of configuration options
Make several tool features mandatory and simplify the code.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/tst-audit2.c | 10 | ||||
-rw-r--r-- | elf/tst-tls10.c | 5 | ||||
-rw-r--r-- | elf/tst-tls10.h | 4 | ||||
-rw-r--r-- | elf/tst-tls11.c | 3 | ||||
-rw-r--r-- | elf/tst-tls12.c | 3 | ||||
-rw-r--r-- | elf/tst-tls14.c | 13 | ||||
-rw-r--r-- | elf/tst-tlsmod11.c | 2 | ||||
-rw-r--r-- | elf/tst-tlsmod12.c | 2 | ||||
-rw-r--r-- | elf/tst-tlsmod13.c | 4 | ||||
-rw-r--r-- | elf/tst-tlsmod13a.c | 4 | ||||
-rw-r--r-- | elf/tst-tlsmod14a.c | 12 | ||||
-rw-r--r-- | elf/tst-tlsmod15b.c | 8 | ||||
-rw-r--r-- | elf/tst-tlsmod16a.c | 4 | ||||
-rw-r--r-- | elf/tst-tlsmod16b.c | 4 | ||||
-rw-r--r-- | elf/tst-tlsmod7.c | 2 | ||||
-rw-r--r-- | elf/tst-tlsmod8.c | 2 | ||||
-rw-r--r-- | elf/tst-tlsmod9.c | 2 |
17 files changed, 11 insertions, 73 deletions
diff --git a/elf/tst-audit2.c b/elf/tst-audit2.c index fd089b6f64..b4fa906940 100644 --- a/elf/tst-audit2.c +++ b/elf/tst-audit2.c @@ -4,11 +4,9 @@ #include <stdlib.h> #include <string.h> -#if HAVE___THREAD -# define MAGIC1 0xabcdef72 -# define MAGIC2 0xd8675309 +#define MAGIC1 0xabcdef72 +#define MAGIC2 0xd8675309 static __thread unsigned int magic[] = { MAGIC1, MAGIC2 }; -#endif #undef calloc @@ -18,7 +16,6 @@ static __thread unsigned int magic[] = { MAGIC1, MAGIC2 }; void * calloc (size_t n, size_t m) { -#if HAVE___THREAD if (magic[0] != MAGIC1 || magic[1] != MAGIC2) { printf ("{%x, %x} != {%x, %x}\n", magic[0], magic[1], MAGIC1, MAGIC2); @@ -26,7 +23,6 @@ calloc (size_t n, size_t m) } magic[0] = MAGIC2; magic[1] = MAGIC1; -#endif n *= m; void *ptr = malloc (n); @@ -38,13 +34,11 @@ calloc (size_t n, size_t m) int main (void) { -#if HAVE___THREAD if (magic[1] != MAGIC1 || magic[0] != MAGIC2) { printf ("{%x, %x} != {%x, %x}\n", magic[0], magic[1], MAGIC2, MAGIC1); return 1; } -#endif return 0; } diff --git a/elf/tst-tls10.c b/elf/tst-tls10.c index dbcc69727c..347243f66b 100644 --- a/elf/tst-tls10.c +++ b/elf/tst-tls10.c @@ -1,9 +1,7 @@ #include "tst-tls10.h" -#ifdef USE_TLS__THREAD __thread int dummy __attribute__((visibility ("hidden"))) = 12; __thread struct A local = { 1, 2, 3 }; -#endif #define CHECK(N, S) \ p = f##N##a (); \ @@ -13,7 +11,6 @@ __thread struct A local = { 1, 2, 3 }; int main (void) { -#ifdef USE_TLS__THREAD struct A *p; if (local.a != 1 || local.b != 2 || local.c != 3) abort (); @@ -35,6 +32,6 @@ main (void) abort (); CHECK (9, 28); CHECK (10, 31); -#endif + exit (0); } diff --git a/elf/tst-tls10.h b/elf/tst-tls10.h index bffc332a0a..2b5709af72 100644 --- a/elf/tst-tls10.h +++ b/elf/tst-tls10.h @@ -1,9 +1,6 @@ #include <tls.h> #include <stdlib.h> -#if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE -# define USE_TLS__THREAD - struct A { char a; @@ -34,4 +31,3 @@ extern int f9b (void); extern int f10b (void); extern void check1 (void); extern void check2 (void); -#endif diff --git a/elf/tst-tls11.c b/elf/tst-tls11.c index 816cf5cc2f..8a2fef4a7f 100644 --- a/elf/tst-tls11.c +++ b/elf/tst-tls11.c @@ -8,7 +8,6 @@ int main (void) { -#ifdef USE_TLS__THREAD struct A *p; check1 (); check2 (); @@ -22,6 +21,6 @@ main (void) CHECK (8, 25); CHECK (9, 28); CHECK (10, 31); -#endif + exit (0); } diff --git a/elf/tst-tls12.c b/elf/tst-tls12.c index 84aa7d35ca..9086d17176 100644 --- a/elf/tst-tls12.c +++ b/elf/tst-tls12.c @@ -8,11 +8,10 @@ int main (void) { -#ifdef USE_TLS__THREAD struct A *p; check1 (); CHECK (1, 4); CHECK (2, 7); -#endif + exit (0); } diff --git a/elf/tst-tls14.c b/elf/tst-tls14.c index c1e6ba7e2c..ffd31e97be 100644 --- a/elf/tst-tls14.c +++ b/elf/tst-tls14.c @@ -6,9 +6,7 @@ #include <tls.h> -#if HAVE___THREAD - -# define AL 4096 +#define AL 4096 struct foo { int i; @@ -55,12 +53,5 @@ do_test (void) return result; } -# define TEST_FUNCTION do_test () - -#else - -# define TEST_FUNCTION 0 - -#endif - +#define TEST_FUNCTION do_test () #include "../test-skeleton.c" diff --git a/elf/tst-tlsmod11.c b/elf/tst-tlsmod11.c index 9938b5753a..cffbd68edc 100644 --- a/elf/tst-tlsmod11.c +++ b/elf/tst-tlsmod11.c @@ -1,6 +1,4 @@ #include "tst-tls10.h" -#ifdef USE_TLS__THREAD __thread struct A a1 = { 4, 5, 6 }; __thread struct A a2 = { 7, 8, 9 }; -#endif diff --git a/elf/tst-tlsmod12.c b/elf/tst-tlsmod12.c index 4602709a18..d0be51891a 100644 --- a/elf/tst-tlsmod12.c +++ b/elf/tst-tlsmod12.c @@ -1,6 +1,5 @@ #include "tst-tls10.h" -#ifdef USE_TLS__THREAD extern __thread struct A a2 __attribute__((tls_model("initial-exec"))); void @@ -11,4 +10,3 @@ check1 (void) if (a2.a != 7 || a2.b != 8 || a2.c != 9) abort (); } -#endif diff --git a/elf/tst-tlsmod13.c b/elf/tst-tlsmod13.c index e4e23af2d8..76da630a05 100644 --- a/elf/tst-tlsmod13.c +++ b/elf/tst-tlsmod13.c @@ -1,10 +1,6 @@ #include <tls.h> -#if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE __thread int a[2] __attribute__ ((tls_model ("initial-exec"))); -#else -int a[2]; -#endif int foo (void) diff --git a/elf/tst-tlsmod13a.c b/elf/tst-tlsmod13a.c index 70a02131ee..d5515d4a15 100644 --- a/elf/tst-tlsmod13a.c +++ b/elf/tst-tlsmod13a.c @@ -1,10 +1,6 @@ #include <tls.h> -#if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE __thread int b[2] __attribute__ ((tls_model ("initial-exec"))); -#else -int b[2]; -#endif extern int foo (void); diff --git a/elf/tst-tlsmod14a.c b/elf/tst-tlsmod14a.c index ad1d179aac..6806d3403c 100644 --- a/elf/tst-tlsmod14a.c +++ b/elf/tst-tlsmod14a.c @@ -3,9 +3,7 @@ #include <tls.h> -#if HAVE___THREAD - -# define AL 4096 +#define AL 4096 struct foo { int i; @@ -15,9 +13,9 @@ static __thread struct foo f; static struct foo g; -# ifndef FCT -# define FCT in_dso1 -# endif +#ifndef FCT +# define FCT in_dso1 +#endif int @@ -37,5 +35,3 @@ FCT (void) return result; } - -#endif diff --git a/elf/tst-tlsmod15b.c b/elf/tst-tlsmod15b.c index 4f63eab144..b37283686a 100644 --- a/elf/tst-tlsmod15b.c +++ b/elf/tst-tlsmod15b.c @@ -1,6 +1,5 @@ #include "tst-tls10.h" -#ifdef USE_TLS__THREAD __thread int mod15b_var __attribute__((tls_model("initial-exec"))); int @@ -8,10 +7,3 @@ in_dso (void) { return mod15b_var; } -#else -int -in_dso (void) -{ - return 0; -} -#endif diff --git a/elf/tst-tlsmod16a.c b/elf/tst-tlsmod16a.c index 847c8090f5..c16e603c8b 100644 --- a/elf/tst-tlsmod16a.c +++ b/elf/tst-tlsmod16a.c @@ -1,7 +1,3 @@ #include <tls.h> -#if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE int __thread tlsvar; -#else -int tlsvar; -#endif diff --git a/elf/tst-tlsmod16b.c b/elf/tst-tlsmod16b.c index 308e6bae92..7268c56bcb 100644 --- a/elf/tst-tlsmod16b.c +++ b/elf/tst-tlsmod16b.c @@ -1,10 +1,6 @@ #include <tls.h> -#if defined HAVE___THREAD && defined HAVE_TLS_MODEL_ATTRIBUTE extern __thread int tlsvar __attribute__((tls_model("initial-exec"))); -#else -extern int tlsvar; -#endif void * in_dso (void) diff --git a/elf/tst-tlsmod7.c b/elf/tst-tlsmod7.c index 944b97f9c0..3df7907bcf 100644 --- a/elf/tst-tlsmod7.c +++ b/elf/tst-tlsmod7.c @@ -1,6 +1,5 @@ #include "tst-tls10.h" -#ifdef USE_TLS__THREAD __thread int dummy __attribute__((visibility ("hidden"))) = 12; __thread struct A a1 = { 4, 5, 6 }; __thread struct A a2 = { 7, 8, 9 }; @@ -100,4 +99,3 @@ f6b (void) { return local2.c; } -#endif diff --git a/elf/tst-tlsmod8.c b/elf/tst-tlsmod8.c index c1822fc0cf..89772ac42f 100644 --- a/elf/tst-tlsmod8.c +++ b/elf/tst-tlsmod8.c @@ -1,6 +1,5 @@ #include "tst-tls10.h" -#ifdef USE_TLS__THREAD __thread long long dummy __attribute__((visibility ("hidden"))) = 12; __thread struct A a2 = { 22, 23, 24 }; __thread struct A a4 __attribute__((tls_model("initial-exec"))) @@ -69,4 +68,3 @@ f10b (void) { return local2.c; } -#endif diff --git a/elf/tst-tlsmod9.c b/elf/tst-tlsmod9.c index e124144e47..6b11ed58b8 100644 --- a/elf/tst-tlsmod9.c +++ b/elf/tst-tlsmod9.c @@ -1,6 +1,5 @@ #include "tst-tls10.h" -#ifdef USE_TLS__THREAD __thread int dummy __attribute__((visibility ("hidden"))) = 12; __thread struct A a1 = { 4, 5, 6 }; __thread struct A a3 __attribute__((tls_model("initial-exec"))) @@ -98,4 +97,3 @@ f6b (void) { return local2.c; } -#endif |