Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Dec 2018 15:04:26 +0000
From:      bugzilla-noreply@freebsd.org
To:        toolchain@FreeBSD.org
Subject:   [Bug 233707] www/firefox: fails to build with -fstack-protector-{strong,all} + -Wl,-z,nocopyreloc
Message-ID:  <bug-233707-29464-TyNPlPaJmc@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-233707-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-233707-29464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233707

--- Comment #8 from Tijl Coosemans <tijl@FreeBSD.org> ---
(In reply to Shawn Webb from comment #7)
Firefox is already compiled with -fPIE on FreeBSD and this works fine even =
with
-Wl,-z,nocopyreloc and -fstack-protector-strong.  The problem is only in the
configure test for clock_gettime which is *not* compiled with -fPIE but *is*
compiled with -Wl,-z,nocopyreloc and -fstack-protector-strong which enables
stack protection in this test program while -fstack-protector is a no-op.=20
Stack protection uses a variable named __stack_chk_guard which is defined in
libc on FreeBSD.  When compiled without -fPIE, variables in dynamic librari=
es
accessed by the executable are copied to the executable's data segment so it
can be accessed directly (without GOT lookup).  This is called a
copy-relocation, which is why compiling with -Wl,-z,nocopyreloc gives an er=
ror.
 So either Firefox should compile configure tests with -fPIE or FreeBSD sho=
uld
do what Linux does and make __stack_chk_guard a thread local variable (or
both).

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-233707-29464-TyNPlPaJmc>