mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 12:30:06 +00:00
Update.
2004-03-08 Ulrich Drepper <drepper@redhat.com> * Makerules: Use extra-modules.mk if modules-names is defined. * extra-modules.mk: New file. * dlfcn/Makefile (CPPFLAGS-modcxaatexit.c): Removed. * elf/Makefile (CFLAGS-interp.c): Add -DNOT_IN_libc=1. * csu/Makefile ($(objpfx)version-info.h): Pass -DNOT_IN_libc=1 to compiler. * Makefile (distribute): Add symbol-hacks.h. * sysdeps/generic/symbol-hacks.h: New file. * sysdeps/wordsize-32/symbol-hacks.h: New file. * sysdeps/wordsize-32/divdi3.c: Define *_internal aliases for __divdi3, __moddi3, __udivdi3, and __umoddi3. * include/libc-symbols.h: Include <symbol-hacks.h>.
This commit is contained in:
parent
f79c3f28a6
commit
b30542fb71
15
ChangeLog
15
ChangeLog
@ -1,3 +1,18 @@
|
||||
2004-03-08 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* Makerules: Use extra-modules.mk if modules-names is defined.
|
||||
* extra-modules.mk: New file.
|
||||
* dlfcn/Makefile (CPPFLAGS-modcxaatexit.c): Removed.
|
||||
* elf/Makefile (CFLAGS-interp.c): Add -DNOT_IN_libc=1.
|
||||
* csu/Makefile ($(objpfx)version-info.h): Pass -DNOT_IN_libc=1 to
|
||||
compiler.
|
||||
* Makefile (distribute): Add symbol-hacks.h.
|
||||
* sysdeps/generic/symbol-hacks.h: New file.
|
||||
* sysdeps/wordsize-32/symbol-hacks.h: New file.
|
||||
* sysdeps/wordsize-32/divdi3.c: Define *_internal aliases for __divdi3,
|
||||
__moddi3, __udivdi3, and __umoddi3.
|
||||
* include/libc-symbols.h: Include <symbol-hacks.h>.
|
||||
|
||||
2004-03-08 Jeroen Dekkers <jeroen@dekkers.cx>
|
||||
|
||||
* elf/rtld.c (_rtld_global_ro) [MAP_COPY]: Don't set _dl_unload_cache.
|
||||
|
2
Makefile
2
Makefile
@ -285,7 +285,7 @@ distribute := README README.libm INSTALL FAQ FAQ.in NOTES NEWS BUGS \
|
||||
include/shlib-compat.h include/pthread.h Versions.def \
|
||||
cppflags-iterator.mk tls.make.c \
|
||||
include/stubs-prologue.h include/gnu/stubs.h \
|
||||
include/atomic.h bits/atomic.h \
|
||||
include/atomic.h bits/atomic.h symbol-hacks.h \
|
||||
INTERFACE CONFORMANCE NAMESPACE LICENSES \
|
||||
$(addprefix scripts/, \
|
||||
rellns-sh config.sub config.guess \
|
||||
|
11
Makerules
11
Makerules
@ -661,6 +661,17 @@ ifdef extra-libs
|
||||
extra-libs-left := $(extra-libs)
|
||||
include $(patsubst %,$(..)extra-lib.mk,$(extra-libs))
|
||||
endif
|
||||
|
||||
|
||||
# The makefile may define $(modules-names) # to build additional
|
||||
# modules.
|
||||
ifdef modules-names
|
||||
# extra-lib.mk is included once for each extra lib to define rules
|
||||
# to build it, and to add its objects to the various variables.
|
||||
# During its evaluation, $(lib) is set to the name of the library.
|
||||
extra-modules-left := $(modules-names)
|
||||
include $(patsubst %,$(..)extra-modules.mk,$(modules-names))
|
||||
endif
|
||||
|
||||
+depfiles := $(sources:.c=.d) \
|
||||
$(patsubst %.o,%.d,$(filter %.o,$(extra-objs:.os=.o))) \
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Makefile for csu code for GNU C library.
|
||||
# Copyright (C) 1995,96,97,98,99,2000,01,02,2003 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995-2003, 2004 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -217,7 +217,7 @@ $(objpfx)version-info.h: $(common-objpfx)config.make $(all-Banner-files)
|
||||
$(make-target-directory)
|
||||
(case $(config-os) in \
|
||||
linux*) version=`(echo -e "#include <linux/version.h>\nUTS_RELEASE"\
|
||||
| $(CC) $(CPPFLAGS) -E -P - | \
|
||||
| $(CC) $(CPPFLAGS) -E -P - -DNOT_IN_libc=1 | \
|
||||
sed -e 's/"\([^"]*\)".*/\1/p' -e d) 2>/dev/null`;\
|
||||
if [ -z "$$version" ]; then \
|
||||
if [ -r /proc/version ]; then \
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
# This file is part of the GNU C Library.
|
||||
|
||||
# The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -99,7 +99,6 @@ $(objpfx)errmsg1.out: $(objpfx)errmsg1 $(objpfx)errmsg1mod.so
|
||||
$(objpfx)tstatexit: $(libdl)
|
||||
$(objpfx)tstatexit.out: $(objpfx)tstatexit $(objpfx)modatexit.so
|
||||
|
||||
CPPFLAGS-modcxaatexit.c = -DNOT_IN_libc
|
||||
$(objpfx)tstcxaatexit: $(libdl)
|
||||
$(objpfx)tstcxaatexit.out: $(objpfx)tstcxaatexit $(objpfx)modcxaatexit.so
|
||||
|
||||
|
@ -273,7 +273,8 @@ $(objpfx)ld.so: $(objpfx)librtld.os $(ld-map)
|
||||
rm -f $@.lds
|
||||
|
||||
# interp.c exists just to get this string into the libraries.
|
||||
CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"'
|
||||
CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"' \
|
||||
-DNOT_IN_libc=1
|
||||
$(objpfx)interp.os: $(common-objpfx)config.make
|
||||
|
||||
ifneq (ld.so,$(rtld-installed-name))
|
||||
|
9
extra-modules.mk
Normal file
9
extra-modules.mk
Normal file
@ -0,0 +1,9 @@
|
||||
# This file is included several times in a row, once
|
||||
# for each element of $(modules-names). $(extra-modules-left)
|
||||
# is initialized first to $(modules-names) so that with each
|
||||
# inclusion, we advance $(module) to the next name.
|
||||
|
||||
module := $(firstword $(extra-modules-left))
|
||||
extra-modules-left := $(filter-out $(module),$(extra-modules-left))
|
||||
|
||||
CPPFLAGS-$(module).c += -DNOT_IN_libc
|
@ -756,4 +756,7 @@ for linking")
|
||||
# define libc_hidden_builtin_ver(local, name)
|
||||
#endif
|
||||
|
||||
/* Get some dirty hacks. */
|
||||
#include <symbol-hacks.h>
|
||||
|
||||
#endif /* libc-symbols.h */
|
||||
|
1
sysdeps/generic/symbol-hacks.h
Normal file
1
sysdeps/generic/symbol-hacks.h
Normal file
@ -0,0 +1 @@
|
||||
/* Fortunately nothing to do. */
|
@ -1,5 +1,5 @@
|
||||
/* 64-bit multiplication and division
|
||||
Copyright (C) 1989, 1992-1999, 2000, 2001, 2002, 2003
|
||||
Copyright (C) 1989, 1992-1999, 2000, 2001, 2002, 2003, 2004
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -294,6 +294,7 @@ __divdi3 (DWtype u, DWtype v)
|
||||
w = -w;
|
||||
return w;
|
||||
}
|
||||
strong_alias (__divdi3, __divdi3_internal)
|
||||
|
||||
DWtype
|
||||
__moddi3 (DWtype u, DWtype v)
|
||||
@ -313,12 +314,14 @@ __moddi3 (DWtype u, DWtype v)
|
||||
w = -w;
|
||||
return w;
|
||||
}
|
||||
strong_alias (__moddi3, __moddi3_internal)
|
||||
|
||||
UDWtype
|
||||
__udivdi3 (UDWtype u, UDWtype v)
|
||||
{
|
||||
return __udivmoddi4 (u, v, NULL);
|
||||
}
|
||||
strong_alias (__udivdi3, __udivdi3_internal)
|
||||
|
||||
UDWtype
|
||||
__umoddi3 (UDWtype u, UDWtype v)
|
||||
@ -328,6 +331,7 @@ __umoddi3 (UDWtype u, UDWtype v)
|
||||
__udivmoddi4 (u, v, &w);
|
||||
return w;
|
||||
}
|
||||
strong_alias (__umoddi3, __umoddi3_internal)
|
||||
|
||||
/* We declare these with compat_symbol so that they are not visible at
|
||||
link time. Programs must use the functions from libgcc. */
|
||||
|
30
sysdeps/wordsize-32/symbol-hacks.h
Normal file
30
sysdeps/wordsize-32/symbol-hacks.h
Normal file
@ -0,0 +1,30 @@
|
||||
/* Hacks needed for symbol manipulation.
|
||||
Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
The GNU C Library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with the GNU C Library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||
02111-1307 USA. */
|
||||
|
||||
/* A very dirty trick: gcc emits references to __divdi3, __udivdi3,
|
||||
__moddi3, and __umoddi3. These functions are exported and
|
||||
therefore we get PLTs. Unnecessarily so. Changing gcc is a big
|
||||
task which might not be worth it so we play tricks with the
|
||||
assembler. */
|
||||
#if !defined __ASSEMBLER__ && !defined NOT_IN_libc && defined SHARED
|
||||
asm ("__divdi3 = __divdi3_internal");
|
||||
asm ("__udivdi3 = __udivdi3_internal");
|
||||
asm ("__moddi3 = __moddi3_internal");
|
||||
asm ("__umoddi3 = __umoddi3_internal");
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user