glibc/elf/Makefile
Ulrich Drepper 3996f34b46 Update.
1997-07-28 23:35  Ulrich Drepper  <drepper@cygnus.com>

	* csu/gmon-start.c (__gmon_start__): Call __monstartup not
	monstartup.
	* gmon/gmon.c: Rename moncontrol to __moncontrol and monstartup
	to __monstartup.
	* gmon/sys/gmon.h: Fix prototypes.
	* gmon/sys/gmon_out.h: Pretty print.

	* gmon/bb_exit_func.c (__bb_exit_func): Use memcpy instead of bcopy.
	* gmon/gmon.c (__monstartup): Likewise.
	(write_hist): Remove dependency on 32 int.
	(_mcleanup): Don't call perror, use fprintf.

	* elf/dl-load.c: Fix handling of current directory in search path.

	* elf/Makefile (dl-routines): Add dl-profile.
	* elf/dl-profile.c: New file.
	* elf/dl-runtime.c (fixup): Add new parameter with address to store
	relocation result in to elf_machine_relplt.
	(profile_fixup): New function.
	* elf/do-rel.h (elf_dynamic_do_rel): Add new parameter with address
	to store relocation result in to elf_machine_relplt.
	* elf/dl-support.c: Define _dl_profile and _dl_profile_map.
	* elf/dynamic-link.h (ELF_DYNAMIC_RELOCATE): Add new parameter and
	call elf_machine_runtime_setup with extra argument.
	* elf/dl-reloc.c (_dl_relocate_object): Add new argument to
	ELF_DYNAMIC_RELOCATE.
	* elf/link.h: Add prototypes for new functions and variables.
	* elf/rtld.c: Parse LD_PROFILE and LD_PROFILE_OUTPUT environment
	variables and call _dl_start_profile if necessary.
	* include/sys/gmon_out.h: New file.
	* sysdeps/alpha/dl-machine.h (elf_machine_runtime_setup): Add
	new parameter to enable profiling.
	(elf_machine_rela): Add new parameter to specify place to store
	result in.
	* sysdeps/m68k/dl-machine.h: Likewise.
	* sysdeps/mips/dl-machine.h: Likewise.
	* sysdeps/mips/mips64/dl-machine.h: Likewise.
	* sysdeps/powerpc/dl-machine.h: Likewise.
	* sysdeps/sparc/dl-machine.h: Likewise.
	* sysdeps/sparc64/dl-machine.h: Likewise.
	* sysdeps/i386/dl-machine.h: Likewise.
	(elf_machine_runtime_setup): Setup got[2] to _dl_runtime_resolve if
	we do profiling.
	(ELF_MACHINE_RUNTIME_TRAMPOLINE): Add code for _dl_runtime_profile.

	* nis/nss_compat/compat-grp.c (internal_setgrent): Set FD_CLOEXEC
	for stream on input file.
	* nis/nss_compat/compat-pwd.c (internal_setpwent): Likewise.
	* nis/nss_compat/compat-spwd.c (internal_setspent): Likewise.
	* nss/nss_db/db-XXX.c (internal_setent): Likewise.
	* nss/nss_db/db-alias.c (internal_setent): Likewise.
	* nss/nss_db/db-netgrp.c (internal_setent): Likewise.
	* nss/nss_files/files-XXX.c (internal_setent): Likewise.
	* nss/nss_files/files-alias.c (internal_setent): Likewise.
	* nss/nss_files/files-netgrp.c (internal_setent): Likewise.

	* string/string.h: Pretty print.

	* sysdeps/i386/fpu/bits/mathinline.h: Major update by John Bowman.
	Add float and long double versions.

1997-07-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* elf/rtld.c (print_unresolved): Replace empty object name by main
	program name.

1997-07-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/generic/htons.c (htons): Renamed from __htons.

1997-07-27  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

	* sysdeps/m68k/bits/byteswap.h: New file.

1997-07-27 23:50  Philip Blundell  <Philip.Blundell@pobox.com>

	* inet/netinet/icmp6.h: Update for new drafts of POSIX.1g and IPv6
	advanced API.
	* inet/netinet/in.h: Likewise.
	* inet/netinet/ip6.h: Likewise.
	* sysdeps/unix/sysv/linux/bits/socket.h: Likewise.
	* posix/sys/types.h: Add socklen_t.

	* manual/socket.texi: Document some more IPv6 things.
	* manual/libc.texinfo: Likewise.

1997-07-26  Andreas Jaeger  <aj@arthur.rhein-neckar.de>

	* libc.map: Define missing symbol.

1997-07-27 14:31  Thorsten Kukuk  <kukuk@vt.uni-paderborn.de>

	* nis/Makefile: Add nis_findserv.
	* nis/lckcache.c: Fix typo.
	* nis/nis_call.c: Fix problems with multihomed servers.
	* nis/nis_findserv.c: New file.
	* nis/nis_intern.h: Add more prototypes.
	* nis/nis_lookup.c (nis_lookup): Don't try the next server if network
	is unreachable.
	* nis/nis_table.c (nis_list): Likewise.
	* nis/nis_ping.c (nis_ping): Use MASTER_ONLY, don't call abort()
	in error case.
	* nis/nis_util.c (__nis_finddirectory): Give the right error code
	back.
	* nis/ypclnt.c: Make sure, that all sockets are closed.
1997-07-28 22:35:20 +00:00

190 lines
6.5 KiB
Makefile
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Makefile for elf subdirectory of GNU C Library.
# Copyright (C) 1995, 1996, 1997 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 Library General Public License as
# published by the Free Software Foundation; either version 2 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
# Library General Public License for more details.
# You should have received a copy of the GNU Library General Public
# License along with the GNU C Library; see the file COPYING.LIB. If not,
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
subdir := elf
headers = elf.h bits/elfclass.h bits/dlfcn.h link.h dlfcn.h
routines = $(dl-routines) dl-open dl-close dl-symbol dl-support \
dl-version enbl-secure
# The core dynamic linking functions are in libc for the static and
# profiled libraries.
dl-routines = $(addprefix dl-,load cache lookup object reloc deps \
runtime error init fini debug misc \
profile)
# But they are absent from the shared libc, because that code is in ld.so.
elide-routines.so = $(dl-routines) dl-support enbl-secure
# ld.so uses those routines, plus some special stuff for being the program
# interpreter and operating independent of libc.
rtld-routines := rtld $(dl-routines) dl-sysdep dl-minimal
distribute = $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
dl-hash.h soinit.c sofini.c ldd.sh.in ldd.bash.in eval.c \
genrtldtbl.awk
extra-libs = libdl
extra-libs-others = $(extra-libs)
libdl-routines := dlopen dlclose dlsym dlvsym dlerror dladdr
libdl-map := libdl.map
before-compile = $(objpfx)trusted-dirs.h $(objpfx)rtldtbl.h
# We need GNU awk for the genrtldtbl.awk script.
GAWK = gawk
all: # Make this the default target; it will be defined in Rules.
include ../Makeconfig
ifeq (yes,$(build-shared))
extra-objs = $(rtld-routines:=.so) soinit.so sofini.so eval.so
generated = librtld.so dl-allobjs.so trusted-dirs.h rtldtbl.h
install-others = $(inst_slibdir)/$(rtld-installed-name)
install-bin = ldd
endif
ifeq (yes,$(has-ldconfig))
extra-objs += ldconfig.o
install-rootsbin = ldconfig
$(objpfx)ldconfig: $(objpfx)ldconfig.o
$(CC) -nostdlib -nostartfiles -o $@ $(sysdep-LDFLAGS) -static \
$(addprefix $(csu-objpfx),start.o) $(+preinit) \
$(filter-out $(addprefix $(csu-objpfx),start.o) $(+preinit) \
$(link-extra-libs) $(common-objpfx)libc% $(+postinit),$^) \
$(link-extra-libs) $(common-objpfx)libc.a $(gnulib) $(+postinit)
endif
include ../Rules
ifeq (yes,$(build-shared))
# Make sure these things are built in the `make lib' pass so they can be used
# to run programs during the `make others' pass.
lib-noranlib: $(objpfx)$(rtld-installed-name) \
$(addprefix $(objpfx),$(extra-objs))
endif
# Command to link into a larger single relocatable object.
reloc-link = $(LINK.o) -nostdlib -nostartfiles -r -o $@
$(objpfx)dl-allobjs.so: $(rtld-routines:%=$(objpfx)%.so)
$(reloc-link) $^
# Link together the dynamic linker into a single relocatable object.
$(objpfx)librtld.so: $(objpfx)dl-allobjs.so $(common-objpfx)libc_pic.a
$(reloc-link) '-Wl,-(' $^ -lgcc '-Wl,-)'
# Do we need a linker script?
rtld-ldscript-in := $(firstword $(wildcard $(+sysdep_dirs:%=%/rtld-ldscript.in)))
ifneq (,$(rtld-ldscript-in))
LDFLAGS-rtld = -T $(objpfx)rtld-ldscript
before-compile += $(objpfx)rtld-ldscript
rtld-parms = $(wildcard $(+sysdep_dirs:%=%/rtld-parms))
include $(rtld-parms)
generated += rtld-ldscript
$(objpfx)rtld-ldscript: $(rtld-ldscript-in) $(rtld-parms)
sed -e 's#@@rtld-oformat@@#$(rtld-oformat)#' \
-e 's#@@rtld-arch@@#$(rtld-arch)#' \
-e 's#@@rtld-entry@@#$(rtld-entry)#' \
-e 's#@@rtld-base@@#$(rtld-base)#' $< >$@
$(objpfx)ld.so: $(objpfx)librtld.so $(objpfx)rtld-ldscript
$(rtld-link) -Wl,-soname=$(rtld-installed-name)
define rtld-link
$(LINK.o) -nostdlib -nostartfiles -shared -o $@ \
-Wl,-rpath=$(default-rpath) $(LDFLAGS-rtld) \
$(filter-out $(objpfx)rtld-ldscript,$^)
endef
else
$(objpfx)ld.so: $(objpfx)librtld.so
$(rtld-link) -Wl,-soname=$(rtld-installed-name)
define rtld-link
$(LINK.o) -nostdlib -nostartfiles -shared -o $@ \
-Wl,-rpath=$(default-rpath) $^
endef
endif
# The dl code in the static libc needs a default library path.
CFLAGS-dl-support.c = -D'DEFAULT_RPATH="$(default-rpath)"'
ifneq (ld.so,$(rtld-installed-name))
# Make sure ld.so.1 exists in the build directory so we can link
# against it.
$(objpfx)$(rtld-installed-name): $(objpfx)ld.so
rm -f $@
ln -s $(<F) $@
endif
# Build a file mentioning all trustworthy directories to look for shared
# libraries when using LD_LIBRARY_PATH in a setuid program. The user can
# add directories to the list by defining $(user-defined-trusted-dirs)
# before starting make.
$(objpfx)trusted-dirs.h: Makefile
$(make-target-directory)
(for dir in `echo "$(default-rpath) $(user-defined-trusted-dirs)" | \
sed 's/:/ /g'`; do \
echo " \"$$dir\","; \
done;) > $@T
mv -f $@T $@
$(objpfx)rtldtbl.h: Makefile
$(make-target-directory)
echo "$(default-rpath)" | $(GAWK) -f genrtldtbl.awk > $@T
mv -f $@T $@
CPPFLAGS-dl-load.c = -I$(objdir)/$(subdir)
CFLAGS-dl-load.c += -Wno-uninitialized
# Specify the dependencies of libdl.so; its commands come from the generic
# rule to build a shared library.
$(objpfx)libdl.so: $(objpfx)libdl_pic.a $(common-objpfx)libc.so $(objpfx)ld.so
$(inst_slibdir)/$(rtld-version-installed-name): $(objpfx)ld.so
$(do-install-program)
$(inst_slibdir)/$(rtld-installed-name): \
$(inst_slibdir)/$(rtld-version-installed-name)
$(make-shlib-link)
ifneq ($(have-bash2),yes)
$(objpfx)ldd: ldd.sh.in $(common-objpfx)version.mk \
$(common-objpfx)soversions.mk $(common-objpfx)config.make
sed -e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
-e 's%@VERSION@%$(version)%g' < $< > $@.new
chmod 555 $@.new
mv -f $@.new $@
else
$(objpfx)ldd: ldd.bash.in $(common-objpfx)version.mk \
$(common-objpfx)soversions.mk $(common-objpfx)config.make
sed -e 's%@BASH@%$(BASH)%g' \
-e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
-e 's%@VERSION@%$(version)%g' \
-e 's%@TEXTDOMAINDIR@%$(localedir)%g' < $< > $@.new
chmod 555 $@.new
mv -f $@.new $@
endif
# muwahaha
LDFLAGS-dl.so = -Wl,-dynamic-linker,$(slibdir)/$(rtld-installed-name)
$(objpfx)libdl.so: $(objpfx)eval.so