[OpenBIOS] [commit] r976 - in trunk/openbios-devel: arch/ppc/qemu include/arch/ppc
repository service
svn at openbios.org
Sun Nov 28 12:40:43 CET 2010
Author: afaerber
Date: Sun Nov 28 12:40:42 2010
New Revision: 976
URL: http://tracker.coreboot.org/trac/openbios/changeset/976
Log:
ppc: Create function descriptors for global functions on ppc64
This should also fix linker errors observed by Blue.
v2:
* __divide_error is called from C code, too. Spotted by Blue.
Cc: Blue Swirl <blauwirbel at gmail.com>
Cc: Alexander Graf <agraf at suse.de>
Signed-off-by: Andreas Färber <andreas.faerber at web.de>
Modified:
trunk/openbios-devel/arch/ppc/qemu/start.S
trunk/openbios-devel/include/arch/ppc/asmdefs.h
Modified: trunk/openbios-devel/arch/ppc/qemu/start.S
==============================================================================
--- trunk/openbios-devel/arch/ppc/qemu/start.S Sat Nov 27 23:37:46 2010 (r975)
+++ trunk/openbios-devel/arch/ppc/qemu/start.S Sun Nov 28 12:40:42 2010 (r976)
@@ -285,8 +285,7 @@
exception_return:
EXCEPTION_EPILOGUE
- .globl __divide_error
-__divide_error:
+_GLOBAL(__divide_error):
trap_error:
mflr r3
b BRANCH_LABEL(unexpected_excep)
@@ -473,7 +472,7 @@
.long 0
.previous
/* void call_elf( arg1, arg2, entry ) */
-GLOBL(call_elf):
+_GLOBAL(call_elf):
mflr r0
stwu r1,-16(r1)
stw r0,20(r1)
@@ -633,7 +632,7 @@
#define LG_CACHE_LINE_SIZE 5
/* flush_icache_range( unsigned long start, unsigned long stop) */
-GLOBL(flush_icache_range):
+_GLOBAL(flush_icache_range):
li r5,CACHE_LINE_SIZE-1
andc r3,r3,r5
subf r4,r3,r4
Modified: trunk/openbios-devel/include/arch/ppc/asmdefs.h
==============================================================================
--- trunk/openbios-devel/include/arch/ppc/asmdefs.h Sat Nov 27 23:37:46 2010 (r975)
+++ trunk/openbios-devel/include/arch/ppc/asmdefs.h Sun Nov 28 12:40:42 2010 (r976)
@@ -118,6 +118,24 @@
#define EXTERN( name ) _##name
#endif
+#if defined(__powerpc64__) && !defined(__darwin__)
+#define _GLOBAL(name) \
+ .align 2 ; \
+ .section ".opd", "aw" ; \
+ .globl name ; \
+ .globl .##name ; \
+ name: \
+ .quad .##name ; \
+ .quad .TOC. at tocbase ; \
+ .quad 0 ; \
+ .previous ; \
+ .type .##name, @function ; \
+ .##name
+#else
+#define _GLOBAL(name) \
+ GLOBL(name)
+#endif
+
#define BIT(n) (1<<(31-(n)))
#endif /* _H_ASMDEFS */
More information about the OpenBIOS
mailing list