2009-12-24 Robert Millan <rmh.grub@aybabtu.com>

* include/multiboot.h (struct multiboot_aout_symbol_table)
	(struct multiboot_elf_section_header_table): New structure
	declarations (stolen from GRUB Legacy).
	(struct multiboot_info): Replace opaque `syms' with a.out and ELF
	table information.
	
	(multiboot_aout_symbol_table_t, multiboot_elf_section_header_table_t)
	(multiboot_info_t, multiboot_memory_map_t, multiboot_module_t): New
	type aliases.
This commit is contained in:
Robert Millan 2009-12-24 14:15:32 +00:00
parent 681c70ab14
commit eeed10b4dd
2 changed files with 41 additions and 2 deletions

View file

@ -1,3 +1,15 @@
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
* include/multiboot.h (struct multiboot_aout_symbol_table)
(struct multiboot_elf_section_header_table): New structure
declarations (stolen from GRUB Legacy).
(struct multiboot_info): Replace opaque `syms' with a.out and ELF
table information.
(multiboot_aout_symbol_table_t, multiboot_elf_section_header_table_t)
(multiboot_info_t, multiboot_memory_map_t, multiboot_module_t): New
type aliases.
2009-12-24 Robert Millan <rmh.grub@aybabtu.com> 2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
* include/multiboot.h: Make comments src2texi-friendly. * include/multiboot.h: Make comments src2texi-friendly.

View file

@ -1,5 +1,5 @@
/* multiboot.h - Multiboot header file. */ /* multiboot.h - Multiboot header file. */
/* Copyright (C) 2003,2007,2008,2009 Free Software Foundation, Inc. /* Copyright (C) 1999,2003,2007,2008,2009 Free Software Foundation, Inc.
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to * of this software and associated documentation files (the "Software"), to
@ -121,6 +121,26 @@ struct multiboot_header
multiboot_uint32_t depth; multiboot_uint32_t depth;
}; };
/* The symbol table for a.out. */
struct multiboot_aout_symbol_table
{
multiboot_uint32_t tabsize;
multiboot_uint32_t strsize;
multiboot_uint32_t addr;
multiboot_uint32_t reserved;
};
typedef struct multiboot_aout_symbol_table multiboot_aout_symbol_table_t;
/* The section header table for ELF. */
struct multiboot_elf_section_header_table
{
multiboot_uint32_t num;
multiboot_uint32_t size;
multiboot_uint32_t addr;
multiboot_uint32_t shndx;
};
typedef struct multiboot_elf_section_header_table multiboot_elf_section_header_table_t;
struct multiboot_info struct multiboot_info
{ {
/* Multiboot info version number */ /* Multiboot info version number */
@ -140,7 +160,11 @@ struct multiboot_info
multiboot_uint32_t mods_count; multiboot_uint32_t mods_count;
multiboot_uint32_t mods_addr; multiboot_uint32_t mods_addr;
multiboot_uint32_t syms[4]; union
{
multiboot_aout_symbol_table_t aout_sym;
multiboot_elf_section_header_table_t elf_sec;
} u;
/* Memory Mapping buffer */ /* Memory Mapping buffer */
multiboot_uint32_t mmap_length; multiboot_uint32_t mmap_length;
@ -167,6 +191,7 @@ struct multiboot_info
multiboot_uint16_t vbe_interface_off; multiboot_uint16_t vbe_interface_off;
multiboot_uint16_t vbe_interface_len; multiboot_uint16_t vbe_interface_len;
}; };
typedef struct multiboot_info multiboot_info_t;
struct multiboot_mmap_entry struct multiboot_mmap_entry
{ {
@ -177,6 +202,7 @@ struct multiboot_mmap_entry
#define MULTIBOOT_MEMORY_RESERVED 2 #define MULTIBOOT_MEMORY_RESERVED 2
multiboot_uint32_t type; multiboot_uint32_t type;
} __attribute__((packed)); } __attribute__((packed));
typedef struct multiboot_mmap_entry multiboot_memory_map_t;
struct multiboot_mod_list struct multiboot_mod_list
{ {
@ -190,6 +216,7 @@ struct multiboot_mod_list
/* padding to take it to 16 bytes (must be zero) */ /* padding to take it to 16 bytes (must be zero) */
multiboot_uint32_t pad; multiboot_uint32_t pad;
}; };
typedef struct multiboot_mod_list multiboot_module_t;
#endif /* ! ASM_FILE */ #endif /* ! ASM_FILE */