From 4b800ec9870e6f7e99f7b7b1f2891ecce69151d4 Mon Sep 17 00:00:00 2001 From: yamt Date: Fri, 2 May 2003 18:05:46 +0000 Subject: [PATCH] set symbol to be a function using .type directive in IDTVEC macro so that ddb backtrace can pick them up after recent ksyms changes. suggested by Matt Thomas on tech-kern. ok'ed by Frank van der Linden. --- sys/arch/amd64/include/asm.h | 8 +++++--- sys/arch/i386/include/asm.h | 14 +++++++++----- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/sys/arch/amd64/include/asm.h b/sys/arch/amd64/include/asm.h index 878c49024472..134c2b69183a 100644 --- a/sys/arch/amd64/include/asm.h +++ b/sys/arch/amd64/include/asm.h @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.1 2003/04/26 18:39:37 fvdl Exp $ */ +/* $NetBSD: asm.h,v 1.2 2003/05/02 18:05:47 yamt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -73,9 +73,11 @@ #ifdef _KERNEL /* XXX Can't use __CONCAT() here, as it would be evaluated incorrectly. */ #ifdef __STDC__ -#define IDTVEC(name) ALIGN_TEXT; .globl X ## name; X ## name: +#define IDTVEC(name) \ + ALIGN_TEXT; .globl X ## name; .type X ## name,@function; X ## name: #else -#define IDTVEC(name) ALIGN_TEXT; .globl X/**/name; X/**/name: +#define IDTVEC(name) \ + ALIGN_TEXT; .globl X/**/name; .type X/**/name,@function; X/**/name: #endif /* __STDC__ */ #endif /* _KERNEL */ diff --git a/sys/arch/i386/include/asm.h b/sys/arch/i386/include/asm.h index a786983e107d..247177000ebe 100644 --- a/sys/arch/i386/include/asm.h +++ b/sys/arch/i386/include/asm.h @@ -1,4 +1,4 @@ -/* $NetBSD: asm.h,v 1.24 2003/03/03 22:12:22 fvdl Exp $ */ +/* $NetBSD: asm.h,v 1.25 2003/05/02 18:05:46 yamt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -109,15 +109,19 @@ /* XXX Can't use __CONCAT() here, as it would be evaluated incorrectly. */ #ifdef __ELF__ #ifdef __STDC__ -#define IDTVEC(name) ALIGN_TEXT; .globl X ## name; X ## name: +#define IDTVEC(name) \ + ALIGN_TEXT; .globl X ## name; .type X ## name,@function; X ## name: #else -#define IDTVEC(name) ALIGN_TEXT; .globl X/**/name; X/**/name: +#define IDTVEC(name) \ + ALIGN_TEXT; .globl X/**/name; .type X/**/name,@function; X/**/name: #endif /* __STDC__ */ #else #ifdef __STDC__ -#define IDTVEC(name) ALIGN_TEXT; .globl _X ## name; _X ## name: +#define IDTVEC(name) \ + ALIGN_TEXT; .globl _X ## name; .type _X ## name,@function; _X ## name: #else -#define IDTVEC(name) ALIGN_TEXT; .globl _X/**/name; _X/**/name: +#define IDTVEC(name) \ + ALIGN_TEXT; .globl _X/**/name; .type _X/**/name,@function; _X/**/name: #endif /* __STDC__ */ #endif /* __ELF__ */