Skip to content

Commit

Permalink
Link libresolv.so with ld.so for __stack_chk_guard.
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Myers authored and Roland McGrath committed Sep 21, 2011
1 parent ecb1482 commit e057a1b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2011-09-21 Chung-Lin Tang <cltang@codesourcery.com>
Maxim Kuvyrkov <maxim@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>

* resolv/Makefile (LDLIBS-resolv.so): Link in $(elfobjdir)/ld.so
if needed for __stack_chk_guard.

2011-09-19 Roland McGrath <roland@hack.frob.com>

* sysdeps/posix/spawni.c (script_execute): Always define it.
Expand Down
8 changes: 7 additions & 1 deletion resolv/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright (C) 1994-2001,2003,2004,2007,2008 Free Software Foundation, Inc.
# Copyright (C) 1994-2001,2003,2004,2007,2008,2011
# 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
Expand Down Expand Up @@ -88,6 +89,11 @@ CFLAGS-res_hconf.c = -fexceptions
# This ensures they will load libc.so for needed symbols if loaded by
# a statically-linked program that hasn't already loaded it.
$(objpfx)libresolv.so: $(common-objpfx)libc.so $(common-objpfx)libc_nonshared.a
# Some hosts need '__stack_chk_guard', so pull in the definition from
# ld.so if required.
ifeq (yesyes,$(have-ssp)$(elf))
LDLIBS-resolv.so += $(as-needed) $(elfobjdir)/ld.so $(no-as-needed)
endif

# The DNS NSS modules needs the resolver.
$(objpfx)libnss_dns.so: $(objpfx)libresolv.so $(common-objpfx)libc.so \
Expand Down

0 comments on commit e057a1b

Please sign in to comment.