1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

Support _r_debug for static binaries.

We initialize _r_debug for static binaries to allows debug
agents to treat static binaries a little more like dyanmic
ones. This simplifies the work a debug agent has to do to
access TLS in a static binary via libthread_db.

Tested on x86_64.

See:
https://sourceware.org/ml/libc-alpha/2014-04/msg00183.html

	[BZ #16831]
	* csu/libc-start.c (LIBC_START_MAIN) [!SHARED]: Call
	_dl_debug_initialize.
This commit is contained in:
Carlos O'Donell
2014-04-11 12:43:58 -04:00
parent 0699f766b1
commit f737dfd071
3 changed files with 10 additions and 1 deletions

View File

@@ -264,6 +264,9 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]);
#endif
#ifndef SHARED
_dl_debug_initialize (0, LM_ID_BASE);
#endif
#ifdef HAVE_CLEANUP_JMP_BUF
/* Memory for the cancellation buffer. */
struct pthread_unwind_buf unwind_buf;