This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Place $(elf-objpfx)sofini.os the last [BZ #22051]

Since sofini.os terminates .eh_frame section, it should be placed the

Tested on x86-64.  OK for master?

	[BZ #22051]
	* Makerules (build-module-helper-objlist): Filter out
	(build-shlib-objlist): Append $(elf-objpfx)sofini.os if it is
 Makerules | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Makerules b/Makerules
index 8f1324d8e9..76f3c84ad4 100644
--- a/Makerules
+++ b/Makerules
@@ -686,14 +686,17 @@ $(build-module-helper) -o $@ $(shlib-lds-flags) \
 $(call after-link,$@)
+# sofini.os must be the last since it terminates .eh_frame section.
 build-module-helper-objlist = \
 	$(patsubst %_pic.a,$(whole-archive) %_pic.a $(no-whole-archive),\
 		   $(filter-out $(map-file) $(+preinit) $(+postinit) \
+				$(elf-objpfx)sofini.os \
 build-module-objlist = $(build-module-helper-objlist) $(LDLIBS-$(
 build-shlib-objlist = $(build-module-helper-objlist) \
-		      $(LDLIBS-$(
+		      $(LDLIBS-$( \
+		      $(filter $(elf-objpfx)sofini.os,$^)
 # Don't try to use -lc when making itself.
 # Also omits crti.o and crtn.o, which we do not want

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]