summaryrefslogtreecommitdiffstats
path: root/src/arch/x86/scripts
Commit message (Collapse)AuthorAgeFilesLines
* [efi] Centralise architecture-independent EFI Makefile and linker scriptMichael Brown2016-03-121-110/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fix building on older versions of binutilsMichael Brown2016-02-191-6/+20
| | | | | | | | | | | | | Some older versions of binutils have issues with both the use of PROVIDE() and the interpretation of numeric literals within a section description. Work around these older versions by defining the required numeric literals outside of any section description, and by automatically determining whether or not to generate extra space for page tables rather than relying on LDFLAGS. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [librm] Generate page tables for 64-bit buildsMichael Brown2016-02-191-0/+12
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [bios] Add bin-x86_64-pcbios build platformMichael Brown2016-02-161-0/+254
| | | | | | | | | | | | | | Move most arch/i386 files to arch/x86, and adjust the contents of the Makefiles and the include/bits/*.h headers to reflect the new locations. This patch makes no substantive code changes, as can be seen using a rename-aware diff (e.g. "git show -M5"). This patch does not make the pcbios platform functional for x86_64; it merely allows it to compile without errors. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fix %.licence build targetMichael Brown2013-07-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Our use of --gc-sections causes the linker to discard the symbols defined by FILE_LICENCE(), meaning that the resulting licence determination is incomplete. We must use the KEEP() directive in the linker script to force the linker to not discard the licence symbols. Using KEEP(*(COMMON)) would be undesirable, since there are some symbols in COMMON which we may wish to discard. Fix by placing symbols defined by PROVIDE_SYMBOL() (which is used by FILE_LICENCE()) into a special ".provided" section, which we then mark with KEEP(). All such symbols are zero-length, so there is no cost in terms of the final binary size. Since the symbols are no longer in COMMON, the linker will reject symbols with the same name coming from multiple objects. We therefore append the object name to the licence symbol, to ensure that it is unique. Reported-by: Marin Hannache <git@mareo.fr> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Eliminate unused sections at link-timeMichael Brown2011-02-221-1/+3
| | | | | | | | | Use -ffunction-sections, -fdata-sections, and --gc-sections to automatically prune out any unreferenced sections. This saves around 744 bytes (uncompressed) from the rtl8139.rom build. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Enable automated extraction of error usage reportsMichael Brown2010-05-311-0/+2
| | | | | | | Add preprocessor magic to the error definitions to enable every error usage to be tracked. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Fix .efi and .efidrv linkingPiotr Jaroszyński2010-05-271-2/+0Star
| | | | | | | | | | | | | | The linker chooses to look for _start first and always picks efidrvprefix.o to satisfy it (probably because it's earlier in the archive) which causes a multiple definition error when the linker later has to pick efiprefix.o for other symbols. Fix by using EFI-specific TGT_LD_FLAGS with an explicit entry point. Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Joshua Oreman <oremanj@rwcr.net> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [linker] Expand and correct symbol requirement macrosJoshua Oreman2009-11-211-0/+1
| | | | | | | | | | | | | | | REQUIRE_SYMBOL() formerly used a formulation of symbol requirement that would allow a link to succeed despite lacking a required symbol, because it did not introduce any relocations. Fix by renaming it to REQUEST_SYMBOL() (since the soft-requirement behavior can be useful) and add a REQUIRE_SYMBOL() that truly requires. Add EXPORT_SYMBOL() and IMPORT_SYMBOL() for REQUEST_SYMBOL()-like behavior that allows one to make use of the symbol, by combining a weak external on the symbol itself with a REQUEST_SYMBOL() of a second symbol. Signed-off-by: Marty Connor <mdc@etherboot.org>
* [efi] Allow for .efidrv images as well as .efi imagesMichael Brown2009-01-081-1/+0Star
| | | | | | Merge in the changes that allow for building EFI driver images (that can be loaded using the EFI shell's "load" command) as well as EFI applications.
* [efi] Use elf2efi utility in place of efilinkMichael Brown2009-01-071-0/+106
elf2efi converts a suitable ELF executable (containing relocation information, and with appropriate virtual addresses) into an EFI executable. It is less tightly coupled with the gPXE build process and, in particular, does not require the use of a hand-crafted PE image header in efiprefix.S. elf2efi correctly handles .bss sections, which significantly reduces the size of the gPXE EFI executable.