提交 4aec0fb1 编写于 作者: I Ian Wienand 提交者: Tony Luck

[IA64] Simulator bootloader fails with gcc 4

After building a fresh tree with gcc 4 I can't boot the simulator as
the bootloader loader dies with 

loading /home/ianw/kerntest/kerncomp//build/sim_defconfig/vmlinux...
failed to read phdr

After some investigation I believe this is do with differences between
the alignment of variables on the stack between gcc 3 and 4 and the
ski simulator.  If you trace through with the simulator you can see
that the disk_stat structure value returned from the SSC_WAIT_COMPLETION
call seems to be only half loaded.  I guess it doesn't like the alignment
of the input.
Signed-off-by: NIan Wienand <ianw@gelato.unsw.edu.au>
Signed-off-by: NTony Luck <tony.luck@intel.com>
上级 75e8727f
...@@ -30,10 +30,14 @@ struct disk_req { ...@@ -30,10 +30,14 @@ struct disk_req {
unsigned len; unsigned len;
}; };
/* SSC_WAIT_COMPLETION appears to want this large alignment. gcc < 4
* seems to give it by default, however gcc > 4 is smarter and may
* not.
*/
struct disk_stat { struct disk_stat {
int fd; int fd;
unsigned count; unsigned count;
}; } __attribute__ ((aligned (16)));
extern void jmp_to_kernel (unsigned long bp, unsigned long e_entry); extern void jmp_to_kernel (unsigned long bp, unsigned long e_entry);
extern struct ia64_boot_param *sys_fw_init (const char *args, int arglen); extern struct ia64_boot_param *sys_fw_init (const char *args, int arglen);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册