Marvin Häuser
3bc4011a1e
BsseTools/lds: Drop ARM unwind info section
2023-04-11 09:27:39 +02:00
Marvin Häuser
08778e2a3d
ImageTool: Abstract executable generation
2023-04-11 09:27:35 +02:00
Marvin Häuser
75fcd420f6
ImageTool: Distinguish between non-ELF/PE and incompatible ELF/PE
2023-04-10 22:40:52 +02:00
Marvin Häuser
1fc65bdb8d
ImageTool: Correctly emit VirtualSize as ImageSize for non-XIP
2023-04-10 22:39:42 +02:00
Marvin Häuser
d27a576b86
ImageTool: Explicitly convert IR to XIP for PE emission
2023-04-10 22:39:42 +02:00
Marvin Häuser
0bfa467344
ImageTool: Use realloc() for IR segment enlarging
2023-04-10 22:39:42 +02:00
Marvin Häuser
2f91fddf99
Drop premature UE support
2023-04-10 22:21:15 +02:00
Mikhail Krichanov
d58d5c1bc3
ImageTool: Extended debug printings.
2023-04-10 10:31:53 +02:00
Mikhail Krichanov
7abc3faeec
ImageTool: Made compilation of EFI_IMAGE_MACHINE selection conditional.
2023-04-10 10:31:53 +02:00
Marvin Häuser
373bb081ee
ImageTool: Fix ARM image generation
2023-04-10 10:31:53 +02:00
Marvin Häuser
23e0a765a5
BaseTools/tools_def: Declare -Wno-unknown-warning-option for XCODE5
2023-04-02 00:04:46 +02:00
Marvin Häuser
b1851ef38d
BaseTools/ImageTool: Fix PeScan error handling
2023-04-02 00:04:46 +02:00
Marvin Häuser
d5eecc2e2d
BaseTools/ImageTool: Use AllocateAlignedCodePages() for images
2023-04-02 00:04:28 +02:00
Marvin Häuser
240e920841
BaseTools/ImageTool: Consume CommonMemoryAllocationLib
2023-04-01 23:59:10 +02:00
Marvin Häuser
f3fedad22d
BaseTools/CommonLib: Guarantee 8-byte alignment for AllocatePool()
2023-04-01 19:17:12 +02:00
Marvin Häuser
c382e9c571
BaseTools/CommonLib: Consume MemoryAllocationLib
2023-03-30 17:15:19 +02:00
Marvin Häuser
0cd5908c7f
BaseTools/ImageTool: Rename PreferredAddress to BaseAddress
2023-03-30 00:18:28 +02:00
Marvin Häuser
6ececb9b0c
BaseTools/GenFvInternalLib: Remove unused BaseOfCode parameter
2023-03-29 21:37:14 +02:00
Marvin Häuser
d5e49c5c2d
BaseTools/GenFv: Remove duplicated alignment macros
2023-03-28 23:52:27 +02:00
Marvin Häuser
ea97361c29
ImageTool: Fix SymbolsPathLen inconsistencies
2023-03-28 23:52:27 +02:00
Marvin Häuser
e958f25835
BaseTools/DevicePath: Consume MdePkg/UefiDevicePathLib
...
BaseTools has been duplicating and adapting code that is defined in
MdePkg and MdeModulePkg. This leads to desync issues where the same
symbols may be backed by different functions with slightly different
semantics and also fixes that apply only to BaseTools or only to MdePkg
and MdeModulePkg.
To address these issues, update BaseTools/Source/C to utilize the code
from MdePkg and MdeModulePkg.
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2023-03-17 15:16:23 +03:00
Marvin Häuser
d24e8eb64a
BaseTools/CommonLib: Consume MdePkg and MdeModulePkg
...
BaseTools has been duplicating and adapting code that is defined in
MdePkg and MdeModulePkg. This leads to desync issues where the same
symbols may be backed by different functions with slightly different
semantics and also fixes that apply only to BaseTools or only to MdePkg
and MdeModulePkg.
To address these issues, update BaseTools/Source/C to utilize the code
from MdePkg and MdeModulePkg.
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2023-03-17 15:16:23 +03:00
Mikhail Krichanov
789aa9ded5
BaseTools: Returned -march=armv7-a -mthumb for ARM compilation, removed useless ARCHASM_FLAGS.
2023-03-16 15:33:03 +03:00
Mikhail Krichanov
aba1c68ac1
ImageTool: Fixed compilation for AARCH64.
2023-03-16 15:33:03 +03:00
Mikhail Krichanov
9b440f29ea
BaseTools: Removed useless OBJCOPY_FLAGS, ARCHCC_FLAGS and PLATFORM_FLAGS, defined OBJCOPY_PATH for ARM, AARCH64.
2023-03-16 15:33:03 +03:00
Mikhail Krichanov
75fcf75121
BaseTools: Added draft of ARM, AARCH64 support.
2023-03-16 15:33:03 +03:00
Mikhail Krichanov
a0f5b70883
ImageTool: Made SizeOfImage equal maximum virtual address.
2023-03-16 12:20:13 +03:00
Mikhail Krichanov
c9e1823fbc
BaseTools: Placed MdeBuildOptions.dsc.inc into tools_def.txt.
2023-03-16 12:20:13 +03:00
Mikhail Krichanov
2a18a22be4
BaseTools: Made !ifdef-choice configurable on command line.
2023-03-16 12:20:13 +03:00
Mikhail Krichanov
1d0697c7ab
BaseTools: Added support for !ifdef constructions inside tools_def.txt.
2023-03-16 12:20:13 +03:00
Marvin Häuser
daca49e23f
ImageTool/PeScan: Drop redundant size clamping
2023-03-16 12:20:13 +03:00
Mikhail Krichanov
8978439c82
ImageTool: Returned ImageBuffer for section, reloc parsing.
2023-03-16 12:20:13 +03:00
Mikhail Krichanov
1bb6e60e7d
ImageTool: Removed corruption tolerant DebugInfo search assuming mtoc is fixed.
2023-03-16 12:20:13 +03:00
Mikhail Krichanov
526c4b13ab
ImageTool: Refactored out Pointer.
2023-03-16 12:20:13 +03:00
Mikhail Krichanov
2bb2e22db8
BaseTools: Reduced minimal alignment to 32 bytes.
2023-03-16 12:20:13 +03:00
Mikhail Krichanov
6117177c2e
BaseTools: Added MDEPKG_REDUCE_FW_SIZE and MDEPKG_MERGE_RODATA_INTO_TEXT build options.
2023-03-16 12:20:13 +03:00
Mikhail Krichanov
7836cea3bd
BaseTools: Fixed VS2019 build by removing EFI_IMAGE_SCN_MEM_DISCARDABLE flag from .xdata and .pdata sections and as a result correcting DataRVA inside .hii.
2023-03-13 20:48:55 +06:00
Marvin Häuser
9f35d83d71
BaseTools/tools_def: Introduce MTOC_PREFIX environment variable
...
Most compiler toolchains and tools have support for PREFIX environment
variables to specify their location, but Apple mtoc does not. While
it used to be in a stable install location, it has recently been
deprecated and ocmtoc is maintained as a fork. Homebrew has accepted
ocmtoc into its repository, including its ARM version. As Homebrew on
ARM does not install its packages into /usr/local, XCODE5 currently
does not work on Apple silicon with ocmtoc installed via Homebrew.
Introduce the MTOC_PREFIX environment variable to customize the
installation location of Apple mtoc or ocmtoc.
Signed-off-by: Marvin Häuser <mhaeuser@posteo.de>
2023-03-06 20:16:39 +01:00
Savva Mitrofanov
b78e1e0e5a
BaseTools: Fix MSVC build due to missing Crc32 symbols
...
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-02-22 17:39:14 +06:00
Marvin Häuser
418524ac00
BaseTools: Rename __RELOC_FIX to __RO_RELOCS
2023-02-12 14:51:26 +01:00
Marvin Häuser
f5b2118058
BaseTools: Add -require_read_only_relocs to MTOC_FLAGS
2023-02-12 14:51:26 +01:00
Marvin Häuser
742a1e3326
BaseTools: Support read-only data for ASLC
2023-02-12 14:51:26 +01:00
Marvin Häuser
1eff93c8e2
BaseTools: ASLC files may not contain relocs
2023-02-12 14:51:26 +01:00
Marvin Häuser
bb53e3652b
BaseTools: Fix __RELOC_FIX generation to always use a populated section
2023-02-12 14:51:26 +01:00
Mikhail Krichanov
76d8185b5c
ImageTool: Fixed "Blue Screen" problem for CLANGDWARF.
2023-02-10 14:00:28 +03:00
Savva Mitrofanov
9e4ebf488e
BaseTools/tools_def: Add read_only_relocs arg to X64 target on XCODE5
...
For now "-read_only_relocs suppress" is safe, as relocations can now
target __TEXT without triggering the issue with Mach-O relocation
offsets
Signed-off-by: Savva Mitrofanov <savvamtr@gmail.com>
2023-02-10 14:00:28 +03:00
Mikhail Krichanov
0212a1af87
ImageTool: Refactored relocs calculation.
2023-02-10 14:00:28 +03:00
Mikhail Krichanov
4a7bcc4251
ImageTool: Fixed GOTPCREL relocations for GCC5.
2023-02-10 14:00:28 +03:00
Mikhail Krichanov
8e421ef0e3
BaseTools: Fixed sh_addralign field in ELF files, removed useless checks in ImageTool.
2023-02-10 14:00:28 +03:00
Mikhail Krichanov
8e6e4d1be4
ImageTool: Removed recalculation of virtual addresses, asssuming they are the same both in ELF and PE files.
2023-02-10 14:00:28 +03:00