Date: Tue, 04 Dec 2018 19:08:16 +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-4zuXR1rP7x@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 Dimitry Andric <dim@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dim@FreeBSD.org, | |emaste@freebsd.org --- Comment #1 from Dimitry Andric <dim@FreeBSD.org> --- Indeed. Output from ld.lld 7.0.1 rc2: $ ld.lld --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style= =3Dboth --enable-new-dtags -o bug233707 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib -z nocopyreloc bug233707.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o ld.lld: error: unresolvable relocation R_X86_64_PC32 against symbol '__stack_chk_guard'; recompile with -fPIC or remove '-z nocopyreloc' >>> defined in /lib/libc.so.7 >>> referenced by bug233707.c >>> bug233707.o:(main) Output from ld.bfd 2.17.50 (in base): $ /usr/bin/ld.bfd --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=3Dboth --enable-new-dtags -o bug233707 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib -z nocopyreloc bug233707.o -= lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-ne= eded /usr/lib/crtend.o /usr/lib/crtn.o <zilch> Output from ld.bfd 2.30 (from ports): $ ld.bfd --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style= =3Dboth --enable-new-dtags -o bug233707 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib -z nocopyreloc bug233707.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o ld.bfd: bug233707.o: relocation R_X86_64_PC32 against symbol `__stack_chk_guard@@FBSD_1.0' can not be used when making a PDE object; recompile with -fPIC ld.bfd: final link failed: Bad value It's interesting how ld.bfd is talking about a "PDE object" here. I guess = that means a Position Dependent Executable... Maybe a workaround is to compile firefox with -fPIE? :) --=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-4zuXR1rP7x>