Page MenuHomeFreeBSD

D19370.id54474.diff
No OneTemporary

D19370.id54474.diff

Index: head/usr.sbin/kldxref/Makefile
===================================================================
--- head/usr.sbin/kldxref/Makefile
+++ head/usr.sbin/kldxref/Makefile
@@ -6,7 +6,7 @@
WARNS?= 2
-.if exists(ef_${MACHINE_CPUARCH}.c) && ${MACHINE_ARCH} != "powerpc64"
+.if exists(ef_${MACHINE_CPUARCH}.c)
SRCS+= ef_${MACHINE_CPUARCH}.c
.else
SRCS+= ef_nop.c
Index: head/usr.sbin/kldxref/ef_powerpc.c
===================================================================
--- head/usr.sbin/kldxref/ef_powerpc.c
+++ head/usr.sbin/kldxref/ef_powerpc.c
@@ -34,10 +34,17 @@
#include <err.h>
#include <errno.h>
+#include <inttypes.h>
#include <string.h>
#include "ef.h"
+#ifdef __powerpc64__
+#define PRI_ELF_SIZE PRIu64
+#else
+#define PRI_ELF_SIZE PRIu32
+#endif
+
/*
* Apply relocations to the values obtained from the file. `relbase' is the
* target relocation address of the section, and `dataoff/len' is the region
@@ -63,11 +70,11 @@
return (0);
switch (rtype) {
- case R_PPC_RELATIVE: /* word32 B + A */
+ case R_PPC_RELATIVE: /* word32|doubleword64 B + A */
*where = relbase + addend;
break;
default:
- warnx("unhandled relocation type %u", rtype);
+ warnx("unhandled relocation type %" PRI_ELF_SIZE, rtype);
}
return (0);
}

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 7, 9:44 AM (20 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31009895
Default Alt Text
D19370.id54474.diff (1 KB)

Event Timeline