mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-10 07:10:06 +00:00
Mon Jun 12 13:15:45 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* Makerules (lib%.so: lib%_pic.a): Moved this rule to after installation rules. * sysdeps/mach/sysdep.h [HAVE_ELF] (ENTRY): Redefine this macro so it uses the `.type' directive, which is necessary for shared libraries to work properly.
This commit is contained in:
parent
f2b0f935d7
commit
1a2df358c8
@ -1,3 +1,12 @@
|
||||
Mon Jun 12 13:15:45 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
* Makerules (lib%.so: lib%_pic.a): Moved this rule to after
|
||||
installation rules.
|
||||
|
||||
* sysdeps/mach/sysdep.h [HAVE_ELF] (ENTRY): Redefine this macro so
|
||||
it uses the `.type' directive, which is necessary for shared
|
||||
libraries to work properly.
|
||||
|
||||
Thu Jun 8 02:50:26 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
|
||||
|
||||
* elf/dl-load.c (_dl_map_object): Add MAP_INHERIT flag in mmap
|
||||
|
39
Makerules
39
Makerules
@ -350,24 +350,6 @@ lib: lib-noranlib $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c))
|
||||
# Pattern rule for libraries: depend on the __.SYMDEF member updated by ranlib.
|
||||
lib%.a: lib%.a(__.SYMDEF) ;
|
||||
|
||||
ifeq (yes,$(build-shared))
|
||||
# Pattern rule to build a shared object from an archive of PIC objects.
|
||||
# $(LDLIBS-%.so) may contain -l switches to generate run-time dependencies
|
||||
# on other shared objects.
|
||||
lib%.so: lib%_pic.a
|
||||
$(LINK.o) -shared -o $@ \
|
||||
$(LDFLAGS.so) $(LDFLAGS-$(notdir $*).so) \
|
||||
-L$(firstword $(objdir) .) -L$(common-objpfx:%/=%) \
|
||||
$(LDLIBS-$(notdir $*).so) -Wl,--whole-archive $< \
|
||||
|
||||
# Don't try to use -lc when making libc.so itself.
|
||||
# Also omits crti.o and crtn.o, which we do not want
|
||||
# since we define our own `.init' section specially.
|
||||
LDFLAGS-c.so = -nostdlib -nostartfiles
|
||||
# Give libc.so an entry point and make it directly runnable itself.
|
||||
LDFLAGS-c.so += -Wl,-dynamic-linker -Wl,/lib/ld.so -e __libc_print_version
|
||||
endif
|
||||
|
||||
libobjs: $(foreach o,$(object-suffixes),\
|
||||
$(common-objpfx)$(patsubst %,$(libtype$o),c)(\
|
||||
$(notdir $(objects:.o=$o))))
|
||||
@ -564,6 +546,27 @@ install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir\
|
||||
install-others-nosubdir install-sbin-nosubdir
|
||||
install: install-no-libc.a-nosubdir
|
||||
|
||||
ifeq (yes,$(build-shared))
|
||||
# Pattern rule to build a shared object from an archive of PIC objects.
|
||||
# This must come after the installation rules so Make doesn't try to
|
||||
# build shared libraries in place from the installed *_pic.a files.
|
||||
# $(LDLIBS-%.so) may contain -l switches to generate run-time dependencies
|
||||
# on other shared objects.
|
||||
lib%.so: lib%_pic.a
|
||||
$(LINK.o) -shared -o $@ \
|
||||
$(LDFLAGS.so) $(LDFLAGS-$(notdir $*).so) \
|
||||
-L$(firstword $(objdir) .) -L$(common-objpfx:%/=%) \
|
||||
$(LDLIBS-$(notdir $*).so) -Wl,--whole-archive $< \
|
||||
|
||||
# Don't try to use -lc when making libc.so itself.
|
||||
# Also omits crti.o and crtn.o, which we do not want
|
||||
# since we define our own `.init' section specially.
|
||||
LDFLAGS-c.so = -nostdlib -nostartfiles
|
||||
# Give libc.so an entry point and make it directly runnable itself.
|
||||
LDFLAGS-c.so += -Wl,-dynamic-linker -Wl,/lib/ld.so -e __libc_print_version
|
||||
endif
|
||||
|
||||
|
||||
# Command to compile $< in $(objdir) using the native libraries.
|
||||
define native-compile
|
||||
cwd=`pwd`; cd $(@D); $(BUILD_CC) $(BUILD_CFLAGS) \
|
||||
|
@ -28,6 +28,17 @@ Cambridge, MA 02139, USA. */
|
||||
#define EXT(x) C_SYMBOL_NAME(x)
|
||||
#define LEXT(x) C_SYMBOL_NAME(x##:)
|
||||
|
||||
#ifdef HAVE_ELF
|
||||
/* For ELF we need to add the `.type' directive to make shared libraries
|
||||
work right. */
|
||||
#undef ENTRY
|
||||
#define ENTRY(name) \
|
||||
ASM_GLOBAL_DIRECTIVE name; \
|
||||
.align ALIGN; \
|
||||
.type name,@function; \
|
||||
name:
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* This is invoked by things run when there is random lossage, before they
|
||||
|
Loading…
Reference in New Issue
Block a user