aboutsummaryrefslogtreecommitdiff
path: root/ltrace-elf.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-10-18 19:57:49 +0200
committerPetr Machata <pmachata@redhat.com>2012-10-24 17:23:02 +0200
commitb024ca33e3734592a67e41414c2dc02978218501 (patch)
tree10f22a56a99bc8d05ca028854efaefc2ac516bfd /ltrace-elf.c
parentbe0db9f510bcb1cb520f683c70bc18e86af94c28 (diff)
downloadltrace-b024ca33e3734592a67e41414c2dc02978218501.tar.gz
Fix compilation on i386
Diffstat (limited to 'ltrace-elf.c')
-rw-r--r--ltrace-elf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ltrace-elf.c b/ltrace-elf.c
index 2bfe819..89ddc3a 100644
--- a/ltrace-elf.c
+++ b/ltrace-elf.c
@@ -823,8 +823,10 @@ read_module(struct library *lib, struct Process *proc,
filename);
return -1;
}
- lte.entry_addr = (GElf_Addr)entry;
- lte.bias = (GElf_Addr)entry - lte.ehdr.e_entry;
+ /* XXX The double cast should be removed when
+ * arch_addr_t becomes integral type. */
+ lte.entry_addr = (GElf_Addr)(uintptr_t)entry;
+ lte.bias = (GElf_Addr)(uintptr_t)entry - lte.ehdr.e_entry;
} else {
GElf_Phdr phdr;