From 59ce75e3e76f94fc59f6fe334ce55522a795b1f9 Mon Sep 17 00:00:00 2001 From: matt Date: Mon, 16 Jul 2001 05:42:50 +0000 Subject: [PATCH] Need to emit PLT magic for PIC ELF files. --- sys/arch/arm/include/profile.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/arch/arm/include/profile.h b/sys/arch/arm/include/profile.h index 1cddd362c978..8571c6fa4084 100644 --- a/sys/arch/arm/include/profile.h +++ b/sys/arch/arm/include/profile.h @@ -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 \ */ \