/* dl-386.c - arch-dependent part of loadable module support */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002,2005,2007,2009 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
/* Check if EHDR is a valid ELF header. */
{
/* Check the magic numbers. */
return GRUB_ERR_NONE;
}
/* Relocate symbols. */
{
Elf_Shdr *s;
unsigned i;
/* Find a symbol table. */
i < e->e_shnum;
i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
if (s->sh_type == SHT_SYMTAB)
break;
if (i == e->e_shnum)
entsize = s->sh_entsize;
i < e->e_shnum;
i++, s = (Elf_Shdr *) ((char *) s + e->e_shentsize))
{
/* Find the target segment. */
break;
if (seg)
{
rel++)
{
return grub_error (GRUB_ERR_BAD_MODULE,
"reloc offset is out of the segment");
{
case R_386_32:
break;
case R_386_PC32:
break;
}
}
}
}
return GRUB_ERR_NONE;
}