This is the mail archive of the libc-alpha@sourceware.org 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]

Re: [PATCH] Document and fix --enable-bind-now [BZ #21015]


On 01/02/2017 07:46 PM, Florian Weimer wrote:
2017-01-02  Florian Weimer  <fweimer@redhat.com>

	[BZ #21015]
	* manual/install.texi (Configuring and compiling): Document
	--enable-bind-now.
	* Makeconfig [bind-now] (LDFLAGS-lib.so): Set.
	(build-shlib-helper): Use $(LDFLAGS-lib.so).
	(format.lds): Likewise.
	[bind-now] (LDFLAGS-c.so): Remove.
	* sysdeps/x86_64/localplt.data (libm.so): matherr relocation can
	be R_X86_64_GLOB_DAT.
	* sysdeps/unix/sysv/linux/i386/localplt.data (libm.so): matherr
	relocation can be R_386_GLOB_DAT.
	* sysdeps/unix/sysv/linux/alpha/localplt.data (libm.so): matherr
	relocaiton can be R_ALPHA_GLOB_DAT.

The patch is incomplete because it does not cover gconv modules, which are compiled as, well, modules (just like the test DSOs in elf/).

This patch on top fixes that omission (hopefully it's not garbled too much):

diff --git a/iconvdata/Makefile b/iconvdata/Makefile
index 04157b2..eb744da 100644
--- a/iconvdata/Makefile
+++ b/iconvdata/Makefile
@@ -63,6 +63,10 @@ modules := ISO8859-1 ISO8859-2 ISO8859-3 ISO8859-4 ISO8859-5 \
           MAC-CENTRALEUROPE KOI8-RU ISO8859-9E                          \
           CP770 CP771 CP772 CP773 CP774

+ifeq ($(bind-now),yes)
+LDFLAGS.so += -Wl,-z,now
+endif
+
 modules.so := $(addsuffix .so, $(modules))

 ifeq (yes,$(build-shared))

But I wonder if it's the right approach. I don't think it's worth adding another kind of module just for this feature.

Thanks,
Florian


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