[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/18801] PIE binary with STT_GNU_IFUNC symbol and TEXTREL segfault
From: |
hjl.tools at gmail dot com |
Subject: |
[Bug ld/18801] PIE binary with STT_GNU_IFUNC symbol and TEXTREL segfaults on x86_64 |
Date: |
Wed, 12 Aug 2015 21:14:49 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=18801
--- Comment #12 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Sriraman Tallam from comment #10)
>
> Isnt this similar to execstack in some sense? I presume SELinux
> disallows that too but that we do not completely ban that on
> non-secure OS.
Since ld.so isn't changed, there is no run-time behavior change.
> I dont understand this as much as you do but I like Paul's idea here:
>
> "I think it would be nice to have behavior other than what's currently
> happening. Either ld.so should support TEXTREL binaries with IFUNCs,
> or it should refuse to run them.
ld.so isn't responsible for user errors.
> I guess it could also try to make W+E page, and IF that fails, issue a
> warning and change to current behavior. That way, a TEXTREL+IFUNC
> binary will run correctly outside SELinux, will warn, then crash under
> SELinux. A TEXTREL without IFUNC will also run correctly outside
> SELinux, and will warn but still work under SELinux (i.e. almost same
> as current behavior)."
My ld patch issues an error:
./ld: read-only segment has dynamic IFUNC relocations; recompile with -fPIC or
link with -z execstack
Take your pick for workaround.
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/18801] PIE binary with STT_GNU_IFUNC symbol and TEXTREL segfaults on x86_64, hjl.tools at gmail dot com, 2015/08/12
- [Bug ld/18801] PIE binary with STT_GNU_IFUNC symbol and TEXTREL segfaults on x86_64, hjl.tools at gmail dot com, 2015/08/12
- [Bug ld/18801] PIE binary with STT_GNU_IFUNC symbol and TEXTREL segfaults on x86_64, tmsriram at google dot com, 2015/08/12
- [Bug ld/18801] PIE binary with STT_GNU_IFUNC symbol and TEXTREL segfaults on x86_64, hjl.tools at gmail dot com, 2015/08/12
- [Bug ld/18801] PIE binary with STT_GNU_IFUNC symbol and TEXTREL segfaults on x86_64,
hjl.tools at gmail dot com <=
- [Bug ld/18801] PIE binary with STT_GNU_IFUNC symbol and TEXTREL segfaults on x86_64, cvs-commit at gcc dot gnu.org, 2015/08/13
- [Bug ld/18801] PIE binary with STT_GNU_IFUNC symbol and TEXTREL segfaults on x86_64, hjl.tools at gmail dot com, 2015/08/13
- [Bug ld/18801] PIE binary with STT_GNU_IFUNC symbol and TEXTREL segfaults on x86_64, ppluzhnikov at google dot com, 2015/08/13
- [Bug ld/18801] PIE binary with STT_GNU_IFUNC symbol and TEXTREL segfaults on x86_64, tmsriram at google dot com, 2015/08/13