aboutsummaryrefslogtreecommitdiff
path: root/Makeconfig
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-07-10 21:59:43 +0000
committerUlrich Drepper <drepper@redhat.com>2006-07-10 21:59:43 +0000
commit871b91589bf4f6dfe19d5987b0a05bd7cf936ecc (patch)
treee50affec0ae060520fbfac19071ee0bfc4348f31 /Makeconfig
parentf3be81a91cdd1b42c47e4d8501dd96d0f1666520 (diff)
downloadglibc-871b91589bf4f6dfe19d5987b0a05bd7cf936ecc.tar
glibc-871b91589bf4f6dfe19d5987b0a05bd7cf936ecc.tar.gz
glibc-871b91589bf4f6dfe19d5987b0a05bd7cf936ecc.tar.bz2
glibc-871b91589bf4f6dfe19d5987b0a05bd7cf936ecc.zip
* elf/dl-lookup.c (dl_new_hash): New functions.cvs/fedora-glibc-20060710T2206
(_dl_lookup_symbol_x): Rename hash to old_hash and don't compute value here. Compute new-style hash value. Pass new hash value and reference to variable with the old value to do_lookup_x. (_dl_setup_hash): If DT_GNU_HASH is defined, use it and not old-style hash table. (_dl_debug_bindings): Pass new hash value and reference to variable with the old value to do_lookup_x. * elf/do-lookup.h (do_lookup_x): Accept additional parameter with new-style hash value and change old-style hash value parameter to be a reference. Reoganize functions to determine whether new-style hash table is available. Only fall back on old-style table. If old-style hash value is needed, compute it here. * elf/dynamic-link.h (elf_get_dynamic_info): Relocate DT_GNU_HASH entry. * elf/elf.h: Define SHT_GNU_HASH, DT_GNU_HASH, DT_TLSDEC_PLT, DT_TLSDEC_GOT. Adjust DT_ADDRNUM. * include/link.h (struct link_map): Add l_gnu_bitmask_idxbits, l_gnu_shift, l_gnu_bitmask, l_gnu_buckets and l_gnu_chain_zero. * Makeconfig: If linker supports --hash-style option add it to all linker command lines to build DSOs. * config.make.in: Define have-hash-style. * configure.in: Test whether linker supports --hash-style option. * elf/dl-misc.c (_dl_name_match_p): Make MAP parameter const. * sysdeps/generic/ldsodefs.h: Adjust prototype.
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig11
1 files changed, 10 insertions, 1 deletions
diff --git a/Makeconfig b/Makeconfig
index 87f8ba7fbe..5a1aebccff 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -413,11 +413,20 @@ LDFLAGS.so += $(relro-LDFLAGS)
LDFLAGS-rtld += $(relro-LDFLAGS)
endif
+ifeq (yes,$(have-hash-style))
+# For the time being we unconditionally use 'both'. At some time we
+# should declare statically linked code as 'out of luck' and compile
+# with --hash-style=gnu only.
+hashstyle-LDFLAGS = -Wl,--hash-style=both
+LDFLAGS.so += $(hashstyle-LDFLAGS)
+LDFLAGS-rtld += $(hashstyle-LDFLAGS)
+endif
+
# Command for linking programs with the C library.
ifndef +link
+link = $(CC) -nostdlib -nostartfiles -o $@ \
$(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \
- $(combreloc-LDFLAGS) $(relro-LDFLAGS) \
+ $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \
$(addprefix $(csu-objpfx),$(start-installed-name)) \
$(+preinit) $(+prector) \
$(filter-out $(addprefix $(csu-objpfx),start.o \