Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/include Need to emit PLT magic for PIC ELF files.



details:   https://anonhg.NetBSD.org/src/rev/242615011e78
branches:  trunk
changeset: 512757:242615011e78
user:      matt <matt%NetBSD.org@localhost>
date:      Mon Jul 16 05:42:50 2001 +0000

description:
Need to emit PLT magic for PIC ELF files.

diffstat:

 sys/arch/arm/include/profile.h |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (36 lines):

diff -r f5ea0f92f853 -r 242615011e78 sys/arch/arm/include/profile.h
--- a/sys/arch/arm/include/profile.h    Mon Jul 16 05:40:53 2001 +0000
+++ b/sys/arch/arm/include/profile.h    Mon Jul 16 05:42:50 2001 +0000
@@ -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            \
         */                                                             \



Home | Main Index | Thread Index | Old Index