diff --git a/Makeconfig b/Makeconfig index bf50406656..a2ea4f6a33 100644 --- a/Makeconfig +++ b/Makeconfig @@ -442,7 +442,8 @@ ifndef +link-pie $(filter-out $(addprefix $(csu-objpfx),start.o \ S$(start-installed-name))\ $(+preinit) $(link-extra-libs) \ - $(common-objpfx)libc% $(+postinit),$^) \ + $(common-objpfx)libc% $(+postinit) \ + $(+nolink-deps),$^) \ $(link-extra-libs) +link-pie-after-libc = $(+postctorS) $(+postinit) define +link-pie @@ -473,7 +474,8 @@ ifndef +link-static $(filter-out $(addprefix $(csu-objpfx),start.o \ $(start-installed-name))\ $(+preinit) $(link-extra-libs-static) \ - $(common-objpfx)libc% $(+postinit),$^) \ + $(common-objpfx)libc% $(+postinit) \ + $(+nolink-deps), $^) \ $(link-extra-libs-static) +link-static-after-libc = $(+postctorT) $(+postinit) define +link-static @@ -509,7 +511,8 @@ else # not build-pie-default $(filter-out $(addprefix $(csu-objpfx),start.o \ $(start-installed-name))\ $(+preinit) $(link-extra-libs) \ - $(common-objpfx)libc% $(+postinit),$^) \ + $(common-objpfx)libc% $(+postinit) \ + $(+nolink-deps),$^) \ $(link-extra-libs) +link-after-libc = $(+postctor) $(+postinit) define +link @@ -549,7 +552,8 @@ endif # +link $(filter-out $(addprefix $(csu-objpfx),start.o \ $(start-name-2.0))\ $(+preinit) $(link-extra-libs) \ - $(common-objpfx)libc% $(+postinit),$^) \ + $(common-objpfx)libc% $(+postinit) \ + $(+nolink-deps),$^) \ $(link-extra-libs) +link-after-libc = $(+postctor) $(+postinit) define +link-2.0-tests diff --git a/Makerules b/Makerules index ada616891e..9dc60cc3ce 100644 --- a/Makerules +++ b/Makerules @@ -587,7 +587,7 @@ endef build-module-helper-objlist = \ $(patsubst %_pic.a,$(whole-archive) %_pic.a $(no-whole-archive),\ $(filter-out %.lds $(map-file) $(+preinit) $(+postinit) \ - $(elf-objpfx)sofini.os \ + $(elf-objpfx)sofini.os $(+nolink-deps) \ $(link-libc-deps),$^)) build-module-objlist = $(build-module-helper-objlist) $(LDLIBS-$(@F:%.so=%).so)