瀏覽代碼

- if ssp is enabled then make sure that __stack_chk_fail resolves

Bernhard Reutner-Fischer 15 年之前
父節點
當前提交
035ac813b4
共有 2 個文件被更改,包括 10 次插入0 次删除
  1. 5 0
      libnsl/Makefile.in
  2. 5 0
      libresolv/Makefile.in

+ 5 - 0
libnsl/Makefile.in

@@ -8,6 +8,11 @@
 CFLAGS-libnsl := -DNOT_IN_libc -DIS_IN_libnsl $(SSP_ALL_CFLAGS)
 
 LDFLAGS-libnsl.so := $(LDFLAGS)
+ifdef ASNEEDED
+ifeq ($(UCLIBC_HAS_SSP),y)
+LDFLAGS-libnsl.so += -Wl,--no-as-needed -lc -Wl,--as-needed
+endif
+endif
 
 LIBS-libnsl.so := $(LIBS)
 

+ 5 - 0
libresolv/Makefile.in

@@ -8,6 +8,11 @@
 CFLAGS-libresolv := -DNOT_IN_libc -DIS_IN_libresolv $(SSP_ALL_CFLAGS)
 
 LDFLAGS-libresolv.so := $(LDFLAGS)
+ifdef ASNEEDED
+ifeq ($(UCLIBC_HAS_SSP),y)
+LDFLAGS-libresolv.so += -Wl,--no-as-needed -lc -Wl,--as-needed
+endif
+endif
 
 LIBS-libresolv.so := $(LIBS)