Comments
Patch
===================================================================
@@ -28,3 +28,15 @@ unsigned long ulzma(unsigned char *src,
/* Defined in src/arch/i386/boot/gdt.c */
void move_gdt(void);
+/* Defined in src/lib/gcc.c */
+#define WRAP_LIBGCC_CALL(type, name) \
+ type __wrap_##name(type a, type b) { return __real_##name(a, b); }
+
+#define PROTO_WRAP_LIBGCC_CALL(type, name) \
+ type __real_##name(type a, type b) __attribute__((regparm(0))); \
+ type __wrap_##name(type a, type b);
+
+PROTO_WRAP_LIBGCC_CALL(long long, __divdi3)
+PROTO_WRAP_LIBGCC_CALL(unsigned long long, __udivdi3)
+PROTO_WRAP_LIBGCC_CALL(long long, __moddi3)
+PROTO_WRAP_LIBGCC_CALL(unsigned long long, __umoddi3)
===================================================================
@@ -22,10 +22,7 @@
* compiler call specifies. Therefore we need a wrapper around those
* functions. See gcc bug PR41055 for more information.
*/
-
-#define WRAP_LIBGCC_CALL(type, name) \
- type __real_##name(type a, type b) __attribute__((regparm(0))); \
- type __wrap_##name(type a, type b) { return __real_##name(a, b); }
+#include <lib.h>
WRAP_LIBGCC_CALL(long long, __divdi3)
WRAP_LIBGCC_CALL(unsigned long long, __udivdi3)
Signed-off-by: Myles Watson <mylesgw@gmail.com> Thanks, Myles