Skip to content
Snippets Groups Projects
Commit f543847f authored by nbd's avatar nbd
Browse files

kexec-tools: reduce size


Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37072 3c298f89-4303-0410-b956-a3cf2f4a3e73
parent 27cbb7d2
No related branches found
No related tags found
No related merge requests found
......@@ -56,6 +56,9 @@ CONFIGURE_ARGS = \
--sysconfdir=/etc \
$(if $(CONFIG_KEXEC_ZLIB),--with,--without)-zlib
TARGET_CFLAGS += -ffunction-sections -fdata-sections
TARGET_LDFLAGS += -Wl,--gc-sections
CONFIGURE_VARS += \
BUILD_CC="$(HOSTCC)" \
TARGET_CC="$(TARGET_CC)"
......
--- a/kexec/crashdump-xen.c
+++ b/kexec/crashdump-xen.c
@@ -111,6 +111,7 @@ static int xen_detect_pv_guest(void)
* This includes dom0, which is the only PV guest where kexec/kdump works.
* HVM guests have to be handled as native hardware.
*/
+#if defined(__i386__) || defined(__x86_64__)
int xen_present(void)
{
if (!is_dom0) {
@@ -121,6 +122,7 @@ int xen_present(void)
}
return is_dom0 > 0;
}
+#endif
unsigned long xen_architecture(struct crash_elf_info *elf_info)
{
--- a/kexec/crashdump.h
+++ b/kexec/crashdump.h
@@ -56,7 +56,15 @@ unsigned long crash_architecture(struct
unsigned long phys_to_virt(struct crash_elf_info *elf_info,
unsigned long paddr);
+#if defined(__i386__) || defined(__x86_64__)
int xen_present(void);
+#else
+static inline int xen_present(void)
+{
+ return 0;
+}
+#endif
+
unsigned long xen_architecture(struct crash_elf_info *elf_info);
int xen_get_nr_phys_cpus(void);
int xen_get_note(int cpu, uint64_t *addr, uint64_t *len);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment