This patch is optional and if the changes it makes are not desirable, it
can be dropped from the series without affecting any of the others. I
included it so i386-cygwin-img.lds and i386-pc-kernel.lds would use the
same mechanism for setting the image base address.
Regards,
Nicholas Vinson
On 2/13/26 20:05, Nicholas Vinson wrote:
This patch updates conf/i386-cygwin-img.lds to use the _grub_text_base
symbol just like conf/i386-pc-kernel.lds. It also updates configure.ac
to account for this change.
Signed-off-by: Nicholas Vinson <[email protected]>
---
conf/i386-cygwin-img.lds | 1 +
configure.ac | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/conf/i386-cygwin-img.lds b/conf/i386-cygwin-img.lds
index 578da91b0..26935ce92 100644
--- a/conf/i386-cygwin-img.lds
+++ b/conf/i386-cygwin-img.lds
@@ -2,6 +2,7 @@
SECTIONS
{
+ . = _grub_image_base;
.text :
{
start = . ;
diff --git a/configure.ac b/configure.ac
index 94218e014..6367afddc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1453,8 +1453,8 @@ if test x$grub_cv_target_cc_link_format = x-arch,i386 ||
test x$grub_cv_target_c
TARGET_IMG_CFLAGS="-static"
TARGET_IMG_LDFLAGS='-nostdlib -static -Wl,-preload -Wl,-segalign,20'
TARGET_IMG_LDFLAGS_AC='-nostdlib -static -Wl,-preload -Wl,-segalign,20'
- TARGET_IMG_BASE_LDOPT="-Wl,-image_base"
- TARGET_IMG_BASE_LDOPT_ARG_SEP=","
+ TARGET_IMG_BASE_LDOPT="-Wl,--defsym,_grub_text_base"
+ TARGET_IMG_BASE_LDOPT_ARG_SEP="="
TARGET_LDFLAGS_OLDMAGIC=""
elif test x$grub_cv_target_cc_link_format = x-mi386pe || test
x$grub_cv_target_cc_link_format = x-mi386pep ; then
TARGET_APPLE_LINKER=0
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel