summaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorDenis Vlasenko2008-05-09 11:36:17 +0000
committerDenis Vlasenko2008-05-09 11:36:17 +0000
commitf3aa4a8ec5c86ceef9a82647a47f6ebec2766747 (patch)
tree22c9e52d2a6631999106602f18f12a7ac2ea8e2f /modutils
parent4579e9c1c89d844615e800b6c23f7558c366154f (diff)
downloadbusybox-f3aa4a8ec5c86ceef9a82647a47f6ebec2766747.zip
busybox-f3aa4a8ec5c86ceef9a82647a47f6ebec2766747.tar.gz
insmod: fix build warnings. By Cristian Ionescu-Idbohrn
Diffstat (limited to 'modutils')
-rw-r--r--modutils/insmod.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 6274a8d..f6dcbe8 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -840,14 +840,23 @@ arch_apply_relocation(struct obj_file *f,
struct obj_symbol *sym,
ElfW(RelM) *rel, ElfW(Addr) v)
{
+#if defined(__arm__) || defined(__i386__) || defined(__mc68000__) \
+ || defined(__sh__) || defined(__s390__)
struct arch_file *ifile = (struct arch_file *) f;
+#endif
enum obj_reloc ret = obj_reloc_ok;
ElfW(Addr) *loc = (ElfW(Addr) *) (targsec->contents + rel->r_offset);
+#if defined(__arm__) || defined(__H8300H__) || defined(__H8300S__) \
+ || defined(__i386__) || defined(__mc68000__) || defined(__microblaze__) \
+ || defined(__mips__) || defined(__nios2__) || defined(__powerpc__) \
+ || defined(__s390__) || defined(__sh__) || defined(__x86_64__)
ElfW(Addr) dot = targsec->header.sh_addr + rel->r_offset;
+#endif
#if defined(USE_GOT_ENTRIES) || defined(USE_PLT_ENTRIES)
struct arch_symbol *isym = (struct arch_symbol *) sym;
#endif
-#if defined(__arm__) || defined(__i386__) || defined(__mc68000__) || defined(__sh__) || defined(__s390__)
+#if defined(__arm__) || defined(__i386__) || defined(__mc68000__) \
+ || defined(__sh__) || defined(__s390__)
#if defined(USE_GOT_ENTRIES)
ElfW(Addr) got = ifile->got ? ifile->got->header.sh_addr : 0;
#endif