mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
elf: Fix _dl_debug_vdprintf to work before self-relocation
The strlen might trigger and invalid GOT entry if it used before the process is self-relocated (for instance on dl-tunables if any error occurs). For i386, _dl_writev with PIE requires to use the old 'int $0x80' syscall mode because the calling the TLS register (gs) is not yet initialized. Checked on x86_64-linux-gnu. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
This commit is contained in:
@@ -16,6 +16,11 @@
|
||||
License along with the GNU C Library; if not, see
|
||||
<https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Mark symbols hidden in static PIE for early self relocation to work.
|
||||
Note: string.h may have ifuncs which cannot be hidden on i686. */
|
||||
#if BUILD_PIE_DEFAULT
|
||||
# pragma GCC visibility push(hidden)
|
||||
#endif
|
||||
#include <gmp-mparam.h>
|
||||
#include <gmp.h>
|
||||
#include <limits.h>
|
||||
|
Reference in New Issue
Block a user