From unknown Fri Aug 08 22:15:25 2025 X-Loop: help-debbugs@gnu.org Subject: bug#20215: 25.0.50; Support compilation as PIE Resent-From: Philipp Stephani
> Currently when trying to compile as = a position-independent executable,
> e.g.
> ./configure CFLAGS=3D-fPIE LDFLAGS=3D-pie && make
> Emacs segfaults when dumping.
I have no idea why it would crash during the dumping process, but
I wouldn't be surprised if after a successful dump of `temacs', the=
resulting `emacs' crashes early on, since the dump will be writing
a heap which will probably contain pointers back into the code.
Emacs 24.3 (gnu/linux, x86_64)
Question1: Why emacs do n=
ot have fPIE(Position Independent Executable)?
Question2: I try to compile as a positon-indepen=
dent executable, modify
src/Makefile with adding
CFLAGS=3D-fPIE LDFLAGS=3D-pie
=
Then I make an=
d get
Emacs segfaults when dumping.
someone has the same problem in
bug-gnu-emacs , but no one reply. https://lists=
.gnu.org/archive/html/bug-gnu-emacs/2015-03/msg01061.html
Regards,
Patrick