Need to emit PLT magic for PIC ELF files.
This commit is contained in:
parent
ee534ba09d
commit
59ce75e3e7
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: profile.h,v 1.2 2001/05/04 00:11:15 bjh21 Exp $ */
|
||||
/* $NetBSD: profile.h,v 1.3 2001/07/16 05:42:50 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Ben Harris
|
||||
|
@ -40,10 +40,17 @@
|
|||
|
||||
#ifdef __ELF__
|
||||
#define MCOUNT_ASM_NAME "__mcount"
|
||||
#ifdef PIC
|
||||
#define PLTSYM "(PLT)"
|
||||
#endif
|
||||
#else
|
||||
#define MCOUNT_ASM_NAME "mcount"
|
||||
#endif
|
||||
|
||||
#ifndef PLTSYM
|
||||
#define PLTSYM
|
||||
#endif
|
||||
|
||||
#define MCOUNT \
|
||||
__asm__(".text"); \
|
||||
__asm__(".align 0"); \
|
||||
|
@ -73,7 +80,7 @@
|
|||
/* \
|
||||
* Call the real mcount code \
|
||||
*/ \
|
||||
__asm__("bl " ___STRING(_C_LABEL(_mcount))); \
|
||||
__asm__("bl " ___STRING(_C_LABEL(_mcount)) PLTSYM); \
|
||||
/* \
|
||||
* Restore registers that were trashed during mcount \
|
||||
*/ \
|
||||
|
|
Loading…
Reference in New Issue