X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=second%2Fyaboot.c;h=edb11c19dd02e981000a899467aedf000d3a56d3;hp=ac63c462c36d5cd4af3dda15e93714cc8f80e6bb;hb=ada23a5a94474a1bc0b6f72fb81aa5d2a5fa9e7f;hpb=fbff125463559d88ce2e2c9cf09b97ede9c59b3d;ds=sidebyside diff --git a/second/yaboot.c b/second/yaboot.c index ac63c46..edb11c1 100644 --- a/second/yaboot.c +++ b/second/yaboot.c @@ -1013,8 +1013,6 @@ int get_params(struct boot_param_t* params) void yaboot_text_ui(void) { -#define MAX_HEADERS 32 - struct boot_file_t file; int result; static struct boot_param_t params; @@ -1211,11 +1209,6 @@ load_elf32(struct boot_file_t *file, loadinfo_t *loadinfo) loadinfo->entry = e->e_entry; - if (e->e_phnum > MAX_HEADERS) { - prom_printf ("Can only load kernels with one program header\n"); - goto bail; - } - ph = (Elf32_Phdr *)malloc(sizeof(Elf32_Phdr) * e->e_phnum); if (!ph) { prom_printf ("Malloc error\n"); @@ -1349,11 +1342,6 @@ load_elf64(struct boot_file_t *file, loadinfo_t *loadinfo) loadinfo->entry = e->e_entry; - if (e->e_phnum > MAX_HEADERS) { - prom_printf ("Can only load kernels with one program header\n"); - goto bail; - } - ph = (Elf64_Phdr *)malloc(sizeof(Elf64_Phdr) * e->e_phnum); if (!ph) { prom_printf ("Malloc error\n");