merge mainline into gdb

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-02-18 21:00:13 +01:00
commit 515e8007fc
465 changed files with 26882 additions and 11400 deletions

View file

@ -42,6 +42,8 @@ extern grub_uint8_t _start[];
extern grub_uint8_t _end[];
extern grub_uint8_t _edata[];
#pragma GCC diagnostic warning "-Wsuggest-attribute=noreturn"
grub_uint32_t
grub_get_rtc (void)
{

View file

@ -21,6 +21,7 @@
#include <grub/elf.h>
#include <grub/misc.h>
#include <grub/err.h>
#include <grub/i18n.h>
/* Check if EHDR is a valid ELF header. */
grub_err_t
@ -32,7 +33,7 @@ grub_arch_dl_check_header (void *ehdr)
if (e->e_ident[EI_CLASS] != ELFCLASS32
|| e->e_ident[EI_DATA] != ELFDATA2LSB
|| e->e_machine != EM_386)
return grub_error (GRUB_ERR_BAD_OS, "invalid arch specific ELF magic");
return grub_error (GRUB_ERR_BAD_OS, N_("invalid arch dependent ELF magic"));
return GRUB_ERR_NONE;
}
@ -54,7 +55,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
break;
if (i == e->e_shnum)
return grub_error (GRUB_ERR_BAD_MODULE, "no symtab found");
return grub_error (GRUB_ERR_BAD_MODULE, N_("no symbol table"));
entsize = s->sh_entsize;
@ -100,6 +101,10 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
*addr += (sym->st_value - (Elf_Word) seg->addr
- rel->r_offset);
break;
default:
return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
N_("relocation 0x%x is not implemented yet"),
ELF_R_TYPE (rel->r_info));
}
}
}

View file

@ -34,7 +34,7 @@ static struct multiboot_info kern_multiboot_info;
static grub_uint8_t mmap_entries[sizeof (struct multiboot_mmap_entry) * 32];
void
grub_machine_mmap_init ()
grub_machine_mmap_init (void)
{
if (! startup_multiboot_info)
grub_fatal ("Unable to find Multiboot Information (is CONFIG_MULTIBOOT disabled in coreboot?)");

View file

@ -39,7 +39,7 @@ extern char _end[];
static grub_uint64_t mem_size, above_4g;
void
grub_machine_mmap_init ()
grub_machine_mmap_init (void)
{
grub_uint8_t high, low, b, c, d;
grub_cmos_read (QEMU_CMOS_MEMSIZE_HIGH, &high);

View file

@ -46,7 +46,7 @@
* This is the area for all of the special variables.
*/
.p2align 2 /* force 4-byte alignment */
.p2align 5 /* force 4-byte alignment */
protstack:
.long GRUB_MEMORY_MACHINE_PROT_STACK
@ -79,7 +79,7 @@ protstack:
* description.
*/
.p2align 2 /* force 4-byte alignment */
.p2align 5 /* force 4-byte alignment */
gdt:
.word 0, 0
.byte 0, 0, 0, 0
@ -113,6 +113,7 @@ gdt:
.byte 0, 0x92, 0, 0
.p2align 5
/* this is the GDT descriptor */
gdtdesc:
.word 0x27 /* limit */