Skip to content

Commit

Permalink
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
Show file tree
Hide file tree
Showing 17 changed files with 332 additions and 56 deletions.
40 changes: 40 additions & 0 deletions ChangeLog
@@ -1,3 +1,43 @@
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.

2001-09-28 Ulrich Drepper <drepper@redhat.com>

* elf/elf.h: Define SHF_GROUP and SHF_TLS.
Expand Down
12 changes: 10 additions & 2 deletions elf/Makefile
Expand Up @@ -107,7 +107,7 @@ tests = loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
reldep reldep2 reldep3 reldep4 $(tests-nodelete-$(have-z-nodelete)) \
$(tests-nodlopen-$(have-z-nodlopen)) neededtest neededtest2 \
neededtest3 neededtest4 unload2 lateglobal initfirst global \
restest2 next dblload dblunload reldep5
restest2 next dblload dblunload reldep5 reldep6
test-srcs = tst-pathopt
tests-vis-yes = vismain
tests-nodelete-yes = nodelete
Expand All @@ -123,7 +123,8 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
neededobj1 neededobj2 neededobj3 neededobj4 \
neededobj5 neededobj6 firstobj globalmod1 \
unload2mod unload2dep ltglobmod1 ltglobmod2 pathoptobj \
dblloadmod1 dblloadmod2 dblloadmod3 reldepmod5 reldepmod6
dblloadmod1 dblloadmod2 dblloadmod3 reldepmod5 reldepmod6 \
reldep6mod0 reldep6mod1 reldep6mod2 reldep6mod3 reldep6mod4
modules-vis-yes = vismod1 vismod2 vismod3
modules-nodelete-yes = nodelmod1 nodelmod2 nodelmod3 nodelmod4
modules-nodlopen-yes = nodlopenmod
Expand Down Expand Up @@ -288,6 +289,10 @@ $(objpfx)dblloadmod1.so: $(objpfx)dblloadmod3.so
$(objpfx)dblloadmod2.so: $(objpfx)dblloadmod3.so
$(objpfx)reldepmod5.so: $(objpfx)reldepmod2.so
$(objpfx)reldepmod6.so: $(objpfx)reldepmod2.so
$(objpfx)reldep6mod1.so: $(objpfx)reldep6mod0.so
$(objpfx)reldep6mod2.so: $(objpfx)reldep6mod1.so
$(objpfx)reldep6mod3.so: $(objpfx)reldep6mod2.so
$(objpfx)reldep6mod4.so: $(objpfx)reldep6mod1.so

# filtmod1.so has a special rule
$(filter-out $(objpfx)filtmod1.so, $(test-modules)): $(objpfx)%.so: $(objpfx)%.os
Expand Down Expand Up @@ -429,3 +434,6 @@ $(objpfx)dblunload.out: $(objpfx)dblloadmod1.so $(objpfx)dblloadmod2.so

$(objpfx)reldep5: $(libdl)
$(objpfx)reldep5.out: $(objpfx)reldepmod5.so $(objpfx)reldepmod5.so

$(objpfx)reldep6: $(libdl)
$(objpfx)reldep6.out: $(objpfx)reldep6mod3.so $(objpfx)reldep6mod4.so
16 changes: 13 additions & 3 deletions elf/dl-open.c
Expand Up @@ -312,10 +312,20 @@ dl_open_worker (void *a)

while (*runp != NULL)
{
/* This can happen if imap was just loaded, but during
relocation had l_opencount bumped because of relocation
dependency. Avoid duplicates in l_scope. */
if (__builtin_expect (*runp == &new->l_searchlist, 0))
break;

++cnt;
++runp;
}

if (*runp != NULL)
/* Avoid duplicates. */
continue;

if (__builtin_expect (cnt + 1 >= imap->l_scope_max, 0))
{
/* The 'r_scope' array is too small. Allocate a new one
Expand Down Expand Up @@ -478,11 +488,11 @@ show_scope (struct link_map *new)

for (cnt = 0; cnt < new->l_scope[scope_cnt]->r_nlist; ++cnt)
if (*new->l_scope[scope_cnt]->r_list[cnt]->l_name)
_dl_printf (" %s", new->l_scope[scope_cnt]->r_list[cnt]->l_name)
_dl_printf (" %s", new->l_scope[scope_cnt]->r_list[cnt]->l_name);
else
_dl_printf (" <main>", NULL);
_dl_printf (" <main>");

_dl_printf ("\n", NULL);
_dl_printf ("\n");
}
}
#endif
97 changes: 97 additions & 0 deletions elf/reldep6.c
@@ -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;
}
8 changes: 8 additions & 0 deletions elf/reldep6mod0.c
@@ -0,0 +1,8 @@
int bar (void);
extern void free (void *);

int bar (void)
{
free (0);
return 40;
}
14 changes: 14 additions & 0 deletions elf/reldep6mod1.c
@@ -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;
}
3 changes: 3 additions & 0 deletions elf/reldep6mod2.c
@@ -0,0 +1,3 @@
extern int foo (void);

void *foop = (void *) foo;
3 changes: 3 additions & 0 deletions elf/reldep6mod3.c
@@ -0,0 +1,3 @@
extern void *foop;

void **foopp = &foop;
12 changes: 12 additions & 0 deletions elf/reldep6mod4.c
@@ -0,0 +1,12 @@
int foo (void);
int weak (void);

int foo (void)
{
return 10;
}

int weak (void)
{
return 30;
}
5 changes: 5 additions & 0 deletions localedata/ChangeLog
@@ -1,3 +1,8 @@
2001-09-30 Ulrich Drepper <drepper@redhat.com>

* charmaps/SAMI-WS2: Add Euro sign.
Patch by Petter Reinholdtsen <pere@hungry.com>.

2001-08-17 Ulrich Drepper <drepper@redhat.com>

* Makefile: Add rules to build and run tst-xlocale2.
Expand Down
1 change: 1 addition & 0 deletions localedata/charmaps/SAMI-WS2
Expand Up @@ -139,6 +139,7 @@ CHARMAP
<U007D> /x7d RIGHT CURLY BRACKET
<U007E> /x7e TILDE
<U007F> /x7f DELETE (DEL)
<U20AC> /x80 EURO SIGN
<U010C> /x82 LATIN CAPITAL LETTER C WITH CARON
<U0192> /x83 LATIN SMALL LETTER F WITH HOOK
<U010D> /x84 LATIN SMALL LETTER C WITH CARON
Expand Down
12 changes: 6 additions & 6 deletions manual/charset.texi
Expand Up @@ -218,8 +218,7 @@ the environment and for the texts to be handled. There exist a variety
of different character sets which can be used for this external
encoding. Information which will not be exhaustively presented
here--instead, a description of the major groups will suffice. All of
the ASCII-based character sets [_bkoz_: do you mean Roman character
sets? If not, what do you mean here?] fulfill one requirement: they are
the ASCII-based character sets fulfill one requirement: they are
"filesystem safe". This means that the character @code{'/'} is used in
the encoding @emph{only} to represent itself. Things are a bit
different for character sets like EBCDIC (Extended Binary Coded Decimal
Expand All @@ -229,11 +228,12 @@ system calls have to be converted first anyhow.

@itemize @bullet
@item
The simplest character sets are single-byte character sets. There can be
only up to 256 characters (for @w{8 bit} character sets) which is not
The simplest character sets are single-byte character sets. There can
be only up to 256 characters (for @w{8 bit} character sets) which is not
sufficient to cover all languages but might be sufficient to handle a
specific text. Another reason to choose this is because of constraints
from interaction with other programs (which might not be 8-bit clean).
specific text. Handling of @w{8 bit} character sets is simple. This is
not true for the other kinds presented later and therefore the
application one uses might require the use of @w{8 bit} character sets.

@cindex ISO 2022
@item
Expand Down
2 changes: 1 addition & 1 deletion sysdeps/ieee754/ldbl-128/s_erfl.c
Expand Up @@ -816,7 +816,7 @@ weak_alias (__erf, erfl)
if (ix >= 0x7fff0000)
{ /* erfc(nan)=nan */
/* erfc(+-inf)=0,2 */
return (long double) (((sign & 0xffff) >> 15) << 1) + one / x;
return (long double) (((u_int32_t) sign >> 31) << 1) + one / x;
}

if (ix < 0x3ffd0000) /* |x| <1/4 */
Expand Down
10 changes: 10 additions & 0 deletions sysdeps/sparc/sparc32/fpu/libm-test-ulps
Expand Up @@ -451,6 +451,16 @@ ifloat: 1
Test "j0 (2.0) == 0.22389077914123566805":
float: 2
ifloat: 2
Test "j0 (4.0) == -3.9714980986384737228659076845169804197562E-1"
double: 1
idouble: 1
float: 1
ifloat: 1
Test "j0 (-4.0) == -3.9714980986384737228659076845169804197562E-1"
double: 1
idouble: 1
float: 1
ifloat: 1
Test "j0 (8.0) == 0.17165080713755390609":
float: 1
ifloat: 1
Expand Down

0 comments on commit c47e78b

Please sign in to comment.