[syslinux] [PATCH 0/5] Deleting __intcall() from Syslinux

Matt Fleming matt at console-pimps.org
Mon Jul 16 13:32:22 PDT 2012


From: Matt Fleming <matt.fleming at intel.com>

Since we can't use __intcall() for EFI, and since we can now have the
ELF module code resolve all our symbols at runtime, we should delete
as many references to __intcall() as possible and just access the
symbols directly.

The most interesting patch is the support for weak symbols. We need to
be able to reference derivative-specific symbols from common code, but
currently we'll halt execution at runtime when we have undefined
symbols. This is a problem, for example, when we need to reference PXE
functions from common code. The solution proposed here is to define
any symbols that are deriviative-specific (and so may not even *exist*
for some derivatives) to be weak, that way the ELF module code can
resolve them to a default function that should never be invoked (and
will print an error message and halt execution if it is).

Matt Fleming (5):
  core/elflink: Delete ADV code that's already in ldlinux
  ldlinux: Stop using the internal KT_* image types
  lib/sys/module: Add support for weak symbols
  elflink: Replace __intcall() with direct function calls
  Use pxe_call() instead of COMBOOT API

 com32/chain/utility.c                 |   30 ++-------
 com32/cmenu/libmenu/syslnx.c          |   22 +++----
 com32/elflink/ldlinux/chainboot.c     |    5 +-
 com32/elflink/ldlinux/execute.c       |   52 +++++++-------
 com32/elflink/ldlinux/ldlinux.c       |   43 ++++++-------
 com32/elflink/ldlinux/readconfig.c    |   16 +++++
 com32/include/menu.h                  |    7 --
 com32/include/syslinux/boot.h         |   10 +++
 com32/include/syslinux/config.h       |    5 ++
 com32/include/syslinux/features.h     |   10 +--
 com32/include/syslinux/pxe_api.h      |    4 +
 com32/lib/Makefile                    |    1 -
 com32/lib/sys/ansicon_write.c         |    4 +-
 com32/lib/sys/gpxe.c                  |   14 +---
 com32/lib/sys/module/common.c         |   10 +++-
 com32/lib/sys/module/elf_module.c     |   15 ++++-
 com32/lib/sys/rawcon_read.c           |   20 +++---
 com32/lib/sys/rawcon_write.c          |    8 +--
 com32/lib/sys/serial_write.c          |    8 +--
 com32/lib/sys/stdcon_write.c          |   15 ++---
 com32/lib/sys/xserial_write.c         |    8 +--
 com32/lib/syslinux/cleanup.c          |   12 ++--
 com32/lib/syslinux/features.c         |   51 --------------
 com32/lib/syslinux/ipappend.c         |   20 ++----
 com32/lib/syslinux/keyboard.c         |   14 +---
 com32/lib/syslinux/pxe_dns.c          |   14 +---
 com32/lib/syslinux/pxe_get_cached.c   |   11 +---
 com32/lib/syslinux/pxe_get_nic.c      |   12 +---
 com32/lib/syslinux/run_command.c      |    9 +--
 com32/lib/syslinux/run_default.c      |   10 +--
 com32/lib/syslinux/runimage.c         |   19 ++---
 com32/lib/syslinux/serial.c           |   19 +++--
 com32/lib/syslinux/shuffle.c          |    9 +--
 com32/lib/syslinux/version.c          |   21 ++++---
 com32/lib/syslinux/video/fontquery.c  |   16 ++---
 com32/lib/syslinux/video/reportmode.c |   11 +--
 com32/libupload/upload_tftp.c         |   18 +----
 com32/menu/menumain.c                 |    6 +-
 com32/menu/readconfig.c               |    2 +-
 com32/modules/gpxecmd.c               |   11 +---
 com32/modules/pxechn.c                |   16 +----
 com32/modules/sanboot.c               |   11 +---
 com32/samples/resolv.c                |   17 +----
 core/comboot.inc                      |    1 +
 core/console.c                        |    7 +--
 core/diskfs.inc                       |    2 +-
 core/elflink/advwrite.c               |   45 -------------
 core/elflink/setadv.c                 |  116 ---------------------------------
 core/font.c                           |    4 +-
 core/fs/pxe/pxe.c                     |    7 +--
 core/fs/pxe/pxe.h                     |    2 -
 core/hello.c                          |    6 +--
 core/include/bios.h                   |    1 -
 core/include/core.h                   |   16 +++++
 core/include/graphics.h               |    5 ++
 core/isolinux.asm                     |    2 +-
 56 files changed, 271 insertions(+), 579 deletions(-)
 delete mode 100644 com32/lib/syslinux/features.c
 delete mode 100644 core/elflink/advwrite.c
 delete mode 100644 core/elflink/setadv.c

-- 
1.7.4.4




More information about the Syslinux mailing list