Move ctors symbol in its own section to force alignment.
Add -g3 flag for release compilation.
This commit is contained in:
parent
6545450f02
commit
5d20632984
|
@ -2416,9 +2416,9 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s
|
|||
|
||||
#Jief removed lto flag. It is set in CLover.dsc, from the env var 'DISABLE_LTO'
|
||||
DEBUG_GCC53_X64_CC_FLAGS = DEF(GCC53_X64_CC_FLAGS) -g3 -O0
|
||||
RELEASE_GCC53_X64_CC_FLAGS = DEF(GCC53_X64_CC_FLAGS) -Os -Werror
|
||||
RELEASE_GCC53_X64_CC_FLAGS = DEF(GCC53_X64_CC_FLAGS) -g3 -Os -Werror
|
||||
DEBUG_GCC53_X64_CXX_FLAGS = DEF(GCC53_X64_CC_FLAGS) -g3 -O0
|
||||
RELEASE_GCC53_X64_CXX_FLAGS = DEF(GCC53_X64_CC_FLAGS) -Os -Werror
|
||||
RELEASE_GCC53_X64_CXX_FLAGS = DEF(GCC53_X64_CC_FLAGS) -g3 -Os -Werror
|
||||
|
||||
#
|
||||
#
|
||||
|
|
|
@ -45,6 +45,9 @@ SECTIONS {
|
|||
.data ALIGN(ALIGNOF(.text)) : ALIGN(CONSTANT(COMMONPAGESIZE)) {
|
||||
*(.data .data.* .gnu.linkonce.d.*)
|
||||
*(.bss .bss.*)
|
||||
}
|
||||
|
||||
.ctors ALIGN(CONSTANT(COMMONPAGESIZE)) : {
|
||||
__beginning_of_section_ctors = .; /* create symbol for start of section */
|
||||
KEEP (*(.ctors .init_array)) /* .ctors is used on macOS, .init_array on Linux */
|
||||
__end_of_section_ctors = .; /* create symbol for end of section */
|
||||
|
|
|
@ -125,7 +125,7 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
adr="$(grep "$image_base_str" ./serial0_qemu_out.log | awk '{printf "0x%x",$6}')"
|
||||
adr="$(grep "$image_base_str" ./serial0_qemu_out.log | awk '{printf "0x%x",$NF}')"
|
||||
echo adr="$adr"
|
||||
|
||||
GDB=gdb
|
||||
|
|
|
@ -116,7 +116,7 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
adr="$(grep "$image_base_str" ./serial0_qemu_out.log | awk '{printf "0x%x",$6}')"
|
||||
adr="$(grep "$image_base_str" ./serial0_qemu_out.log | awk '{printf "0x%x",$NF}')"
|
||||
echo adr="$adr"
|
||||
|
||||
|
||||
|
|
|
@ -2826,15 +2826,12 @@ RefitMain (IN EFI_HANDLE ImageHandle,
|
|||
// }
|
||||
if ( !EFI_ERROR(Status) ) {
|
||||
DBG("CloverX64 : Image base = 0x%llX\n", (uintptr_t)LoadedImage->ImageBase); // do not change, it's used by grep to feed the debugger
|
||||
} else {
|
||||
DBG("CloverX64 : Image base = 0\n");
|
||||
}
|
||||
#ifdef JIEF_DEBUG
|
||||
gBS->Stall(2500000); // to give time to gdb to connect
|
||||
// PauseForKey(L"press\n");
|
||||
#endif
|
||||
}
|
||||
gBS->Stall(2500000); // to give time to gdb to connect
|
||||
|
||||
#ifdef CLOVER_BUILD
|
||||
construct_globals_objects(gImageHandle); // do this after self.getSelfLoadedImage() is initialized
|
||||
|
|
Loading…
Reference in New Issue