From 6c021fdc2f9defa902ae6e74a8ee44c402acf421 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 2 Jun 2000 01:19:56 +0000 Subject: Update. * sysdeps/generic/initfini.c (_init): One less relocation. Don't have extra call to __gmon_start__, use the pointer we already have. --- ChangeLog | 3 +++ sysdeps/generic/initfini.c | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d24f09dec..4100b0ceba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2000-06-01 Ulrich Drepper + * sysdeps/generic/initfini.c (_init): One less relocation. Don't + have extra call to __gmon_start__, use the pointer we already have. + * elf/elf.h (ELF64_R_INFO): Cast sym value to Elf64_Xword before shifting. diff --git a/sysdeps/generic/initfini.c b/sysdeps/generic/initfini.c index c68a5cff00..72f8c08574 100644 --- a/sysdeps/generic/initfini.c +++ b/sysdeps/generic/initfini.c @@ -1,5 +1,5 @@ /* Special .init and .fini section support. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it @@ -72,12 +72,13 @@ _init (void) module which has a constructor; but then user code's constructors would come first, and not be profiled. */ extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ - #ifndef WEAK_GMON_START __gmon_start__ (); #else - if (__gmon_start__) - __gmon_start__ (); + void (*gmon_start) (void) = __gmon_start__; + + if (gmon_start) + gmon_start (); #endif asm ("ALIGN"); -- cgit 1.4.1