| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
This patch changes only strings, no program code.
Reported-by: Ady <ady-sf@hotmail.com>
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
|
| |
|
|
| |
Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
|
| | |
|
| |
|
|
|
| |
This makes the module_* functions accessible to COM32 modules.
MODULE_INIT and MODULE_EXIT are not used anymore.
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
syslinux-5.10-pre2
Conflicts:
NEWS
com32/include/netinet/in.h
com32/include/sys/cpu.h
com32/lib/Makefile
core/Makefile
core/fs/diskio.c
core/fs/pxe/pxe.h
core/init.c
core/mem/free.c
core/mem/malloc.c
mk/devel.mk
version
|
| | |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Welcome to Syslinux 5.10.
Conflicts:
NEWS
com32/lib/Makefile
com32/lib/sys/open.c
com32/lib/syslinux/ipappend.c
com32/modules/Makefile
com32/modules/prdhcp.c
core/Makefile
core/cmdline.inc
core/com32.inc
core/comboot.inc
core/configinit.inc
core/fs/chdir.c
core/fs/fs.c
core/fs/pxe/dnsresolv.c
core/fs/pxe/pxe.c
core/fs/pxe/pxe.h
core/idle.c
core/include/ctype.h
core/init.inc
core/mem/init.c
core/parseconfig.inc
core/runkernel.inc
core/syslinux.ld
core/ui.inc
doc/comboot.txt
version
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Add compiler barriers around instructions that muck with the interrupt
state and so on.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
At least gPXE/iPXE apparently enters the NBP with the interrupt line
disabled at the PIC; explicitly enable it instead.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
Makefile
NEWS
com32/cmenu/Makefile
com32/elflink/ldlinux/Makefile
com32/gfxboot/Makefile
com32/gpllib/Makefile
com32/include/sys/module.h
com32/lib/Makefile
com32/lib/sys/module/elf_module.c
com32/menu/Makefile
com32/rosh/Makefile
com32/samples/Makefile
core/init.c
mk/elf.mk
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It's easy for cur_module and prev_module to get out of sync with
reality (the actual module that is running), so add module_current()
which returns the module at the head of the module_list, i.e. the
module that was loaded most recently. Better still, by using the list
we don't have to do any kind of stacking of module pointers ourselves.
This fixes a bug where cur_module contained a stale pointer (the
module had actually been unloaded) but the pointer value had since
been reallocated for a new module in spawn_load(), meaning that the
following check,
if (!strcmp(cur_module->name, module->name))
was always going to be true, even though *no* module was actually
loaded at this point as we were reloading ldlinux.c32 from
start_ldlinux(). This could have been fixed with a NULL-assignment
after module_unload(), but using the modules_head list to detect the
current module is much cleaner.
Note that the core module loaded in load_env32() is always on the
list, therefore module_current() will always return a valid pointer.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Meant to handle symbols exported from the core, but we just
pregenerate the dynamic section instead.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |\ \ \
| |/ /
| | |
| | |
| | | |
Conflicts:
com32/lib/sys/module/common.c
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
We should use the same method of opening files as the module code when
searching for extensions. In particular, we should search all of PATH.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The old COM32 loading code would drop the user at a command prompt
once execution returned from the COM32 amodule. We need to replicate
this because most callers of execute() don't expect it to return.
This bug was noticed when loading a COM32 module from
vesamenu.c32. Once execution returned from the COM32 module the
display became garbled because no code exists to reinitialise the
screen for VGA.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| |\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
Makefile
com32/elflink/ldlinux/adv.c
com32/elflink/ldlinux/kernel.c
com32/elflink/ldlinux/ldlinux.c
com32/include/bitsize/stddef.h
com32/include/bitsize/stdint.h
com32/include/stdint.h
com32/include/sys/module.h
com32/include/sys/x86_64/bitops.h
com32/include/syslinux/linux.h
com32/lib/Makefile
com32/lib/sys/ansicon_write.c
com32/lib/sys/module/elfutils.h
com32/lib/sys/vesa/efi/fill.h
com32/lib/syslinux/load_linux.c
com32/lib/syslinux/serial.c
com32/lib/syslinux/shuffle.c
core/conio.c
core/elflink/config.c
core/elflink/load_env32.c
core/graphics.c
core/include/graphics.h
core/init.c
core/pxelinux.asm
mk/elf.mk
mk/lib.mk
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We can't store the DT_NEEDED entries in the bss because 'needed[]'
will be overwritten with recursive calls to module_load(). Make the
list part of struct elf_module instead.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Commit 8e0ed96bff7 ("elf: Support __constructor and __destructor")
failed to add a prototype for the newly introduced _module_unload()
function, which resulted in the following build warning being
introduced,
sys/module/exec.c: In function ‘spawn_load’:
sys/module/exec.c:222:3: warning: implicit declaration of function ‘_module_unload’
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
dump_elf_module() doesn't have any callers (it's call site is
commented out in module_load()) and it's definition currently emits
the following build warning,
In file included from exit.c:34:0:
../include/sys/module.h: In function ‘dump_elf_module’:
../include/sys/module.h:123:55: warning: unused parameter ‘module’
Just delete it. If anyone needs a similar function in future it is
trivial to write.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
There are a number of initialisation steps that need to be performed
*every* time a config file is loaded. Reload ldlinux.c32 so that we
can re-initialise the environment whenever a new config file is
loaded. This involves unloading all the modules that have been loaded
since ldlinux.c32. Luckily the list of loaded modules is sorted by
load order, which means it's trivial to "pop" them from the front of
the list.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The old way of specifying functions that need to be run before/after a
main function has never worked for ELF modules. Instead, the only way
to get similiar behaviour was by using the MODULE_INIT() and
MODULE_EXIT() macros, but no one seems to have bothered converting the
old __constructor users over. Anyway, the old way is superior because
it allows multiple functions be specified. Delete the MODULE_* macros
as there's only one user of them in the entire tree.
We can also get rid of the UNKNOWN_MODULE constant because now a
module doesn't need a __module_init_ptr symbol to be classed as a
library - if a module isn't an executable, it's a library, there's no
such thing as an unknown type.
It's no longer necessary to explicitly call
__syslinux_get_ipappend_strings() from ldlinux.c because the
__constructor tag on the version in com32/lib/syslinux will take care
of invoking it before ldlinux.c32's main() is executed.
Also, since we've refactored unload_module() to now run a module's
destructors let's minimise the number of callers by deleting
load_library() and unload_library(), which were only called by the
test module in com32/elflink.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
resolution and relocation
of symbols for both ELF32 and ELF64 environments. With this, syslinux.efi built for i386 and x86_64
can load the respective native command modules dynamically. The architecture dependent files
are split into respective subdirectories (com32/lib/sys/module/i386 & com32/lib/sys/module/x86_64)
for the build environment to pick.
Files changed for commit:
com32/include/sys/elfcommon.h
com32/include/sys/module.h and its i386/ x86_64/ specific files
com32/lib/sys/module/i386/common.[ch] and its counterpart in x86_64
com32/lib/sys/module/i386/elfutils.h and its counterpart in x86_64
com32/lib/sys/module/i386/elf_module.c and its counterpart in x86_64
com32/lib/sys/module/i386/shallow_module.c and its counterpart in x86_64
The implementation of com32/elflink/load_env32.c now takes care of both i386 and x86_64 to set up
elf module system.
Remanants of the unused old i386-only files, if any, need to be pruned.
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move the standard definitions of constants, variously-sized ints,limits into
respective architecture specific files. com32/include/bitsize holds the standard
header files that in turn include bitsize32 or bitsize64 based on the architecture.
The makefiles should build pick the right ones based on architecture.
Files com32/include/sys/cpu.h, com32/include/sys/bitops.h now have
architecture specific files underneath to define relevant macros definitions.
com32/include/setjmp.h has architecture specific counterparts underneath.
ssize_t in dos/stdlib.h is appropriately defined based on architecture to be able
to support building for 32bit and 64bit environments.
Remanants of the unused old i386-only files, if any, need to be pruned.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
The ELF file format uses DT_NEEDED entries in the dynamic section to
name any shared library dependencies. Instead of rolling our own
dependency logic via the modules.dep file and elf_gen_dep.sh script
use the DT_NEEDED entries.
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ldlinux now contains all the code necessary to load and execute
modules, none is contained in the core.
This change also allows us to change the spawn_load() prototype and to
push the job of processing arguments to executable functions (e.g. the
contents of char *argv[] as passed to a module's main function) into
ldlinux/execute.c instead of doing it in spawn_load(). Moving it into
ldlinux/ makes sense because the only core user of spawn_load() is
load_env32() and we don't require any sort of argument processing in
that path.
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To make it easier to move existing COM32 modules over to ELF modules
without having to modify them we need to search for and run their
main() functions when they're loaded instead of requiring their
initial function to be labeled with MODULE_MAIN().
Currently, we require all executable ELF modules to specify their
initial function with the use of the MODULE_MAIN() macro and not via
the traditional method of naming it main(). However, there are weird
restrictions on what functions can be passed to MODULE_MAIN(), for
instance, they must be declared static.
This patch makes life much simpler and allows executable ELF modules
to be loaded without the MODULE_MAIN() wrapper, but rather by naming
their initial function main(). All the modules in com32/modules can
now be run as ELF modules without any modifications.
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
|
| |\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We need the recent Makefile filename changes to be merged into the
elflink branch because it will make things simpler when converting all
modules to ELF format.
Conflicts:
com32/Makefile
com32/modules/Makefile
version
|
| | |
| |
| |
| |
| |
| | |
The proper output for the byte-sized output of "setc" is "=qm".
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |\ \
| |/ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
The argument to an "m" constraint is an object, not a pointer to an
object. For a void pointer it needs to be cast to an indirectable
type (like char) and then indirected.
Reported-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The bit test instructions returns the tested bit in CF, not the
inverse of the tested bit in ZF. I don't know how I got that idea...
Reported-by: Matt Fleming <matt.fleming@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |\ \
| |/
| |
| |
| |
| |
| | |
Conflicts:
com32/lib/Makefile
com32/lib/sys/open.c
version
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a centralized bitops header <sys/bitops.h> which uses x86 bitops
instructions. This is necessary to keep gcc 4.5 from aborting
compilation due to the inlined code being larger than the non-inlined
version, and well, we should really use the bitops.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There's only one function required for printing debugging information
and that is dprintf() - there is no need to invent another. dprintf()
is also superior to mp() because it can be enabled/disabled on a
per-file basis via the DEBUG symbol.
Switch all users of mp() to dprintf() and leave them disabled (don't
define the DEBUG) so we have a less verbose boot by default.
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
As times() is just an accessor function for accessing __ms_timer it's
worth marking it as static inline so that we don't incur any function
call overhead just for accessing a symbol.
Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ELF modules basically work
Conflicts:
com32/Makefile
com32/lib/Makefile
com32/lua/etc/luavs.bat
core/fs/getcwd.c
core/include/fs.h
core/pmapi.c
libinstaller/syslxmod.c
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
com32/include/sys/times.h
com32/include/syslinux/config.h
com32/include/syslinux/pmapi.h
com32/include/unistd.h
com32/include/zconf.h
com32/include/zlib.h
dos/Makefile
dos/errno.h
dos/string.h
dos/syslinux.c
dosutil/eltorito.asm
dosutil/mdiskchk.c
dosutil/mdiskchk.com
extlinux/Makefile
extlinux/fat.h
extlinux/main.c
libfat/libfat.h
libfat/open.c
libinstaller/Makefile
libinstaller/setadv.c
libinstaller/syslinux.h
libinstaller/syslxcom.c
libinstaller/syslxcom.h
libinstaller/syslxint.h
libinstaller/syslxmod.c
libinstaller/syslxopt.c
libinstaller/syslxopt.h
linux/Makefile
linux/syslinux.c
|
| | |
| |
| |
| |
| | |
Otherwise it will be global and can't be searched, still don't know
the real reason
|
| | | |
|
| | |
| |
| |
| | |
also make sure the compiling passed
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
modify these files to make compile pass
modified: com32/MCONFIG
modified: com32/Makefile
modified: com32/include/klibc/compiler.h
modified: com32/include/sys/elfcommon.h
modified: com32/lib/Makefile
modified: com32/lib/free.c
modified: com32/lib/malloc.c
|
| |/
|
|
|
|
|
| |
Previously, clock_t was 16 bits and counted timer ticks, now make it
32 bits and count milliseconds.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
| |
CPUID functions were apparently broken when made PIC-safe; clean up
and fix.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
Do the actual idling in protected mode. This both allows PM code a
more efficient interface, but also handles bugs in HVM implementations
which don't handle HLT in real mode.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
| |
Conversion macros to change between d_type and st_mode values.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
| |
Add an enum for the DT_* constants for the d_type field.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
| |
The 16-bit API to opendir/readdir/closedir was confused, had a memory
leak, and was incompatible with Syslinux 3.x anyway. Replace it with
a pure 32-bit API.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Resolved Conflicts:
com32/Makefile
com32/lib/sys/open.c
com32/modules/Makefile
dos/Makefile
dos/com16.ld
dos/syslinux.c
version
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| | |
| |
| |
| |
| |
| | |
Impact: avoid code duplication
This will make code more generic, hdt will need it ;)
|
| |\ \
| |/ |
|
| | |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
com32/cmenu/libmenu/com32io.h
com32/gplinclude/dmi/dmi.h
com32/gplinclude/dmi/dmi_base_board.h
com32/gplinclude/dmi/dmi_memory.h
com32/gplinclude/dmi/dmi_system.h
com32/gpllib/dmi/dmi.c
com32/gpllib/dmi/dmi_memory.c
com32/include/sys/pci.h
com32/lib/pci/scan.c
com32/modules/Makefile
Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
|