Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[BZ #786]
2005-03-15 Jakub Jelinek <jakub@redhat.com> [BZ #786] * sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Handle GL(dl_tls_static_nelem) == GL(dl_tls_max_dtv_idx). * elf/Makefile: Add rules to build and run tst-tls15. * elf/tst-tls15.c: New test. * elf/tst-tlsmod15a.c: New file. * elf/tst-tlsmod15b.c: New file. 2005-03-20 Ulrich Drepper <drepper@redhat.com> * elf/rtld.c (dl_main): Always call init_tls if we have audit modules.
- Loading branch information
Ulrich Drepper
committed
Mar 20, 2005
1 parent
8622e95
commit 167d5ac
Showing
7 changed files
with
96 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include <dlfcn.h> | ||
#include <stdio.h> | ||
|
||
static int | ||
do_test (void) | ||
{ | ||
void *h = dlopen ("tst-tlsmod15a.so", RTLD_NOW); | ||
if (h != NULL) | ||
{ | ||
puts ("unexpectedly succeeded to open tst-tlsmod15a.so"); | ||
exit (1); | ||
} | ||
|
||
h = dlopen ("tst-tlsmod15b.so", RTLD_NOW); | ||
if (h == NULL) | ||
{ | ||
puts ("failed to open tst-tlsmod15b.so"); | ||
exit (1); | ||
} | ||
|
||
int (*fp) (void) = (int (*) (void)) dlsym (h, "in_dso"); | ||
if (fp == NULL) | ||
{ | ||
puts ("cannot find in_dso"); | ||
exit (1); | ||
} | ||
|
||
return fp (); | ||
} | ||
|
||
#define TEST_FUNCTION do_test () | ||
#include "../test-skeleton.c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
extern int nonexistent_dummy_var; | ||
int * | ||
foo (void) | ||
{ | ||
return &nonexistent_dummy_var; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "tst-tls10.h" | ||
|
||
#ifdef USE_TLS__THREAD | ||
__thread int mod15b_var __attribute__((tls_model("initial-exec"))); | ||
|
||
int | ||
in_dso (void) | ||
{ | ||
return mod15b_var; | ||
} | ||
#else | ||
int | ||
in_dso (void) | ||
{ | ||
return 0; | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters