Skip to content

Commit

Permalink
* debug/chk_fail.c (__chk_fail): Add a while (1) loop around
Browse files Browse the repository at this point in the history
	__libc_message to kill GCC warning about noreturn function returning.

	* elf/rtld.c (dlmain): If LD_TRACE_PRELINKING, clear l_relocated flag
	before relocating ld.so again.

	* elf/rtld.c (_dl_start): Set bootstrap_map.l_relocated even
	for already prelinked ld.so.
  • Loading branch information
Ulrich Drepper committed Feb 12, 2005
1 parent f85f356 commit e38c954
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
2005-02-11 Jakub Jelinek <jakub@redhat.com>

* debug/chk_fail.c (__chk_fail): Add a while (1) loop around
__libc_message to kill GCC warning about noreturn function returning.

* elf/rtld.c (dlmain): If LD_TRACE_PRELINKING, clear l_relocated flag
before relocating ld.so again.

* elf/rtld.c (_dl_start): Set bootstrap_map.l_relocated even
for already prelinked ld.so.

2005-02-11 Roland McGrath <roland@redhat.com>

[BZ #715]
Expand Down
6 changes: 4 additions & 2 deletions debug/chk_fail.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ void
__attribute__ ((noreturn))
__chk_fail (void)
{
__libc_message (1, "*** buffer overflow detected ***: %s terminated\n",
__libc_argv[0] ?: "<unknown>");
/* The loop is added only to keep gcc happy. */
while (1)
__libc_message (1, "*** buffer overflow detected ***: %s terminated\n",
__libc_argv[0] ?: "<unknown>");
}
libc_hidden_def (__chk_fail)
11 changes: 7 additions & 4 deletions elf/rtld.c
Original file line number Diff line number Diff line change
Expand Up @@ -1919,10 +1919,13 @@ ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n",

if ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)
&& GL(dl_rtld_map).l_opencount > 1)
_dl_relocate_object (&GL(dl_rtld_map), main_map->l_scope,
0, 0);
}

{
/* Mark the link map as not yet relocated again. */
GL(dl_rtld_map).l_relocated = 0;
_dl_relocate_object (&GL(dl_rtld_map), main_map->l_scope,
0, 0);
}
}
#define VERNEEDTAG (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (DT_VERNEED))
if (version_info)
{
Expand Down

0 comments on commit e38c954

Please sign in to comment.