===================================================================
@@ -1008,8 +1008,6 @@ int get_params(struct boot_param_t* para
void
yaboot_text_ui(void)
{
-#define MAX_HEADERS 32
-
struct boot_file_t file;
int result;
static struct boot_param_t params;
@@ -1244,11 +1242,6 @@ load_elf32(struct boot_file_t *file, loa
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");
@@ -1382,11 +1375,6 @@ load_elf64(struct boot_file_t *file, loa
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");
The comparison against MAX_HEADERS doesn't match the error message and we are dynamically allocating memory for the program headers, so there should not be a limit. Signed-off-by: Anton Blanchard <anton@samba.org> ---