dl.c revision 2
2N/A/* dl.c - loadable module support */ 2N/A * GRUB -- GRand Unified Bootloader 2N/A * Copyright (C) 2002,2003,2004,2005,2007,2008,2009 Free Software Foundation, Inc. 2N/A * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * GRUB is free software: you can redistribute it and/or modify 2N/A * it under the terms of the GNU General Public License as published by 2N/A * the Free Software Foundation, either version 3 of the License, or 2N/A * (at your option) any later version. 2N/A * GRUB is distributed in the hope that it will be useful, 2N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of 2N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2N/A * GNU General Public License for more details. 2N/A * You should have received a copy of the GNU General Public License 2N/A/* Force native word size */ 2N/A/* Platforms where modules are in a readonly area of memory. */ 2N/A/* The size of the symbol table. */ 2N/A/* The symbol table (using an open-hash). */ 2N/A/* Simple hash function. */ 2N/A/* Resolve the symbol name NAME and return the address. 2N/A Return NULL, if not found. */ 2N/A/* Register a symbol with the name NAME and the address ADDR. */ 2N/A/* Unregister all the symbols defined in the module MOD. */ 2N/A/* Return the address of a section whose index is N. */ 2N/A/* Check if EHDR is a valid ELF header. */ 2N/A /* Check the header size. */ 2N/A /* Check the magic numbers. */ 2N/A/* Load all segments from memory specified by E. */ 2N/A /* Resolve a global symbol. */ 2N/A /* FIXME: free descriptor once it's not used anymore. */ 2N/A "unknown symbol type `%d'", (
int)
type);
2N/A/* Me, Vladimir Serbinenko, hereby I add this module check as per new 2N/A GNU module policy. Note that this license check is informative only. 2N/A Modules have to be licensed under GPLv3 or GPLv3+ (optionally 2N/A multi-licensed under other licences as well) independently of the 2N/A presence of this check and solely by linking (module loading in GRUB 2N/A constitutes linking) and GRUB core being licensed under GPLv3+. 2N/A Be sure to understand your license obligations. 2N/A/* Load a module from core memory. */ 2N/A /* Make sure that every section is within the core. */ 2N/A /* Me, Vladimir Serbinenko, hereby I add this module check as per new 2N/A GNU module policy. Note that this license check is informative only. 2N/A Modules have to be licensed under GPLv3 or GPLv3+ (optionally 2N/A multi-licensed under other licences as well) independently of the 2N/A presence of this check and solely by linking (module loading in GRUB 2N/A constitutes linking) and GRUB core being licensed under GPLv3+. 2N/A Be sure to understand your license obligations. 2N/A/* Load a module from the file FILENAME. */ 2N/A /* We must close this before we try to process dependencies. 2N/A Some disk backends do not handle gracefully multiple concurrent 2N/A opens of the same device. */ 2N/A/* Load a module using a symbolic name. */ 2N/A/* Unload the module MOD. */ 2N/A/* Unload unneeded modules. */ 2N/A /* Because grub_dl_remove modifies the list of modules, this 2N/A implementation is tricky. */