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
Update.
2001-09-29 Jes Sorensen <jes@trained-monkey.org> * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h (struct sigcontext): Add sc_loadrs and sc_rbs_bas to match current kernel. 2001-09-27 Jakub Jelinek <jakub@redhat.com> * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update. * sysdeps/ieee754/ldbl-128/s_erfl.c (__erfcl): Fix erfc(-inf). 2001-09-27 Jakub Jelinek <jakub@redhat.com> * elf/dl-open.c (dl_open_worker): If l_opencount of freshly loaded object has been bumped because of relocation dependency, avoid duplicates in l_scope. (show_scope): Fix typos. * elf/Makefile: Add rules to build and run reldep6. * elf/reldep6.c: New file. * elf/reldep6mod0.c: New file. * elf/reldep6mod1.c: New file. * elf/reldep6mod2.c: New file. * elf/reldep6mod3.c: New file. * elf/reldep6mod4.c: New file. 2001-09-26 Jakub Jelinek <jakub@redhat.com> * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_fixup_plt): Call sparc64_fixup_plt. (sparc64_fixup_plt): Moved from elf_machine_fixup_plt. Optimize near jumps and 0xfffff800XXXXXXXX target addresses, no thread safety for non-lazy binding. Fix .plt[32768+] handling. (elf_machine_plt_value): Don't add addend. (elf_machine_rela): Call sparc64_fixup_plt instead of elf_machine_fixup_plt. (elf_machine_runtime_setup, TRAMPOLINE_TEMPLATE): Optimize for dynamic linker at 0xfffff800XXXXXXXX. * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update.
- Loading branch information
Ulrich Drepper
committed
Oct 1, 2001
1 parent
ddb96b7
commit c47e78b
Showing
17 changed files
with
332 additions
and
56 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,97 @@ | ||
#include <dlfcn.h> | ||
#include <mcheck.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
typedef int (*fn)(void); | ||
#define CHUNKS 1024 | ||
#define REPEAT 64 | ||
|
||
int | ||
main (void) | ||
{ | ||
void *h1; | ||
void *h2; | ||
fn **foopp; | ||
fn bar, baz; | ||
int i, j; | ||
int n; | ||
void *allocs[REPEAT][CHUNKS]; | ||
|
||
mtrace (); | ||
|
||
/* Open the two objects. */ | ||
h1 = dlopen ("reldep6mod3.so", RTLD_LAZY); | ||
if (h1 == NULL) | ||
{ | ||
printf ("cannot open reldep6mod3.so: %s\n", dlerror ()); | ||
exit (1); | ||
} | ||
|
||
foopp = dlsym (h1, "foopp"); | ||
if (foopp == NULL) | ||
{ | ||
printf ("cannot get address of \"foopp\": %s\n", dlerror ()); | ||
exit (1); | ||
} | ||
n = (**foopp) (); | ||
if (n != 20) | ||
{ | ||
printf ("(**foopp)() return %d, not return 20\n", n); | ||
exit (1); | ||
} | ||
|
||
h2 = dlopen ("reldep6mod4.so", RTLD_LAZY); | ||
if (h2 == NULL) | ||
{ | ||
printf ("cannot open reldep6mod4.so: %s\n", dlerror ()); | ||
exit (1); | ||
} | ||
|
||
if (dlclose (h1) != 0) | ||
{ | ||
printf ("closing h1 failed: %s\n", dlerror ()); | ||
exit (1); | ||
} | ||
|
||
/* Clobber memory. */ | ||
for (i = 0; i < REPEAT; ++i) | ||
for (j = 0; j < CHUNKS; ++j) | ||
allocs[i][j] = calloc (1, j + 1); | ||
|
||
bar = dlsym (h2, "bar"); | ||
if (bar == NULL) | ||
{ | ||
printf ("cannot get address of \"bar\": %s\n", dlerror ()); | ||
exit (1); | ||
} | ||
if (bar () != 40) | ||
{ | ||
printf ("bar() did not return 40\n"); | ||
exit (1); | ||
} | ||
|
||
baz = dlsym (h2, "baz"); | ||
if (baz == NULL) | ||
{ | ||
printf ("cannot get address of \"baz\": %s\n", dlerror ()); | ||
exit (1); | ||
} | ||
if (baz () != 31) | ||
{ | ||
printf ("baz() did not return 31\n"); | ||
exit (1); | ||
} | ||
|
||
for (i = 0; i < REPEAT; ++i) | ||
for (j = 0; j < CHUNKS; ++j) | ||
free (allocs[i][j]); | ||
|
||
if (dlclose (h2) != 0) | ||
{ | ||
printf ("closing h2 failed: %s\n", dlerror ()); | ||
exit (1); | ||
} | ||
|
||
return 0; | ||
} |
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,8 @@ | ||
int bar (void); | ||
extern void free (void *); | ||
|
||
int bar (void) | ||
{ | ||
free (0); | ||
return 40; | ||
} |
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,14 @@ | ||
int foo (void); | ||
int baz (void); | ||
extern int weak (void); | ||
asm (".weak weak"); | ||
|
||
int foo (void) | ||
{ | ||
return 20; | ||
} | ||
|
||
int baz (void) | ||
{ | ||
return weak () + 1; | ||
} |
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,3 @@ | ||
extern int foo (void); | ||
|
||
void *foop = (void *) foo; |
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,3 @@ | ||
extern void *foop; | ||
|
||
void **foopp = &foop; |
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,12 @@ | ||
int foo (void); | ||
int weak (void); | ||
|
||
int foo (void) | ||
{ | ||
return 10; | ||
} | ||
|
||
int weak (void) | ||
{ | ||
return 30; | ||
} |
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
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
Oops, something went wrong.