Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x68k/stand Pass address constants from Makefile to ...



details:   https://anonhg.NetBSD.org/src/rev/f042676916df
branches:  trunk
changeset: 467234:f042676916df
user:      isaki <isaki%NetBSD.org@localhost>
date:      Sat Jan 18 05:41:48 2020 +0000

description:
Pass address constants from Makefile to ldscript.

diffstat:

 sys/arch/x68k/stand/boot/Makefile                  |  3 ++-
 sys/arch/x68k/stand/boot/boot.ldscript             |  2 +-
 sys/arch/x68k/stand/boot_ufs/Makefile              |  3 ++-
 sys/arch/x68k/stand/boot_ufs/boot_ufs.ldscript     |  4 ++--
 sys/arch/x68k/stand/boot_ustar/Makefile            |  3 ++-
 sys/arch/x68k/stand/boot_ustar/boot_ustar.ldscript |  2 +-
 sys/arch/x68k/stand/xxboot/Makefile.xxboot         |  4 +++-
 sys/arch/x68k/stand/xxboot/xxboot.ldscript         |  4 ++--
 8 files changed, 15 insertions(+), 10 deletions(-)

diffs (135 lines):

diff -r f70974ba2bb0 -r f042676916df sys/arch/x68k/stand/boot/Makefile
--- a/sys/arch/x68k/stand/boot/Makefile Sat Jan 18 05:07:34 2020 +0000
+++ b/sys/arch/x68k/stand/boot/Makefile Sat Jan 18 05:41:48 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.31 2019/06/14 14:15:53 isaki Exp $
+#      $NetBSD: Makefile,v 1.32 2020/01/18 05:41:48 isaki Exp $
 
 NOMAN=         # defined
 
@@ -42,6 +42,7 @@
 #CPPFLAGS+=    -DDEBUG
 CFLAGS=                -Wno-main -Os -m68020-60
 LINKFLAGS=     -N -static -T ${.CURDIR}/../boot/boot.ldscript
+LINKFLAGS+=    --defsym=TEXTADDR=0x$(TEXT)
 ELF2AOUT_OPTS= -O
 LIBIOCS!=      cd $M/stand/libiocs && ${PRINTOBJDIR}
 LIBSA!=                cd $M/stand/libsa && ${PRINTOBJDIR}
diff -r f70974ba2bb0 -r f042676916df sys/arch/x68k/stand/boot/boot.ldscript
--- a/sys/arch/x68k/stand/boot/boot.ldscript    Sat Jan 18 05:07:34 2020 +0000
+++ b/sys/arch/x68k/stand/boot/boot.ldscript    Sat Jan 18 05:41:48 2020 +0000
@@ -10,7 +10,7 @@
 PROVIDE (__stack = 0);
 SECTIONS
 {
-  . = 0x6000;
+  . = TEXTADDR;
   .text :
   {
     CREATE_OBJECT_SYMBOLS
diff -r f70974ba2bb0 -r f042676916df sys/arch/x68k/stand/boot_ufs/Makefile
--- a/sys/arch/x68k/stand/boot_ufs/Makefile     Sat Jan 18 05:07:34 2020 +0000
+++ b/sys/arch/x68k/stand/boot_ufs/Makefile     Sat Jan 18 05:41:48 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.31 2020/01/16 13:15:47 isaki Exp $
+#      $NetBSD: Makefile,v 1.32 2020/01/18 05:41:48 isaki Exp $
 
 NOMAN=         # defined
 
@@ -43,6 +43,7 @@
 CPPFLAGS+= -I${COMMONDIR} -I${LIBIOCS} -I${S} -I. -D_STANDALONE
 AFLAGS=           ${CFLAGS:M-[ID]*}
 LINKFLAGS=   -n -Bstatic -T ${.CURDIR}/${BOOT}.ldscript -M
+LINKFLAGS+=  --defsym=TEXTADDR=0x$(TEXT)
 LINKFLAGS+=  -noinhibit-exec   # XXX
 
 .include "${.CURDIR}/../Makefile.booters"
diff -r f70974ba2bb0 -r f042676916df sys/arch/x68k/stand/boot_ufs/boot_ufs.ldscript
--- a/sys/arch/x68k/stand/boot_ufs/boot_ufs.ldscript    Sat Jan 18 05:07:34 2020 +0000
+++ b/sys/arch/x68k/stand/boot_ufs/boot_ufs.ldscript    Sat Jan 18 05:41:48 2020 +0000
@@ -6,7 +6,7 @@
 PROVIDE (__stack = 0);
 SECTIONS
 {
-  . = 0x0f0000;
+  . = TEXTADDR;
   .text :
   {
     CREATE_OBJECT_SYMBOLS
@@ -36,7 +36,7 @@
     edata  =  .;
     _edata  =  .;
   }
-  . = 0x0f2000;
+  . = TEXTADDR + 0x2000;
   .bss :
   {
     __bss_start = .;
diff -r f70974ba2bb0 -r f042676916df sys/arch/x68k/stand/boot_ustar/Makefile
--- a/sys/arch/x68k/stand/boot_ustar/Makefile   Sat Jan 18 05:07:34 2020 +0000
+++ b/sys/arch/x68k/stand/boot_ustar/Makefile   Sat Jan 18 05:41:48 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.25 2020/01/16 13:15:47 isaki Exp $
+#      $NetBSD: Makefile,v 1.26 2020/01/18 05:41:48 isaki Exp $
 
 NOMAN=         # defined
 
@@ -38,6 +38,7 @@
 AFLAGS=           ${CFLAGS:M-[ID]*}
 AFLAGS+=   -Wa,-march=m68000 -Wa,-mcpu=m68000
 LINKFLAGS=   -n -Bstatic -T ${.CURDIR}/${BOOT}.ldscript -M
+LINKFLAGS+=  --defsym=TEXTADDR=0x$(TEXT)
 LINKFLAGS+=  -noinhibit-exec   # XXX
 
 .include "${.CURDIR}/../Makefile.booters"
diff -r f70974ba2bb0 -r f042676916df sys/arch/x68k/stand/boot_ustar/boot_ustar.ldscript
--- a/sys/arch/x68k/stand/boot_ustar/boot_ustar.ldscript        Sat Jan 18 05:07:34 2020 +0000
+++ b/sys/arch/x68k/stand/boot_ustar/boot_ustar.ldscript        Sat Jan 18 05:41:48 2020 +0000
@@ -6,7 +6,7 @@
 PROVIDE (__stack = 0);
 SECTIONS
 {
-  . = 0x00002000;
+  . = TEXTADDR;
   .text :
   {
     CREATE_OBJECT_SYMBOLS
diff -r f70974ba2bb0 -r f042676916df sys/arch/x68k/stand/xxboot/Makefile.xxboot
--- a/sys/arch/x68k/stand/xxboot/Makefile.xxboot        Sat Jan 18 05:07:34 2020 +0000
+++ b/sys/arch/x68k/stand/xxboot/Makefile.xxboot        Sat Jan 18 05:41:48 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.xxboot,v 1.6 2020/01/16 13:15:47 isaki Exp $
+#      $NetBSD: Makefile.xxboot,v 1.7 2020/01/18 05:41:49 isaki Exp $
 
 NOMAN=         # defined
 
@@ -39,6 +39,8 @@
 CPPFLAGS+= -I$M/stand/libiocs -I$M/stand/libsa -I$M/stand/common
 AFLAGS=           ${CFLAGS:M-[ID]*}
 LINKFLAGS=   -n -Bstatic -T ${.CURDIR}/../xxboot.ldscript -M
+LINKFLAGS+=  --defsym=TEXTADDR=0x$(TEXT)
+LINKFLAGS+=  --defsym=TEXTDATASIZE=0x$(TEXTDATASIZE)
 LINKFLAGS+=  -noinhibit-exec   # XXX
 LIBIOCS!= cd $M/stand/libiocs && ${PRINTOBJDIR}
 LIBSA!=          cd $M/stand/libsa && ${PRINTOBJDIR}
diff -r f70974ba2bb0 -r f042676916df sys/arch/x68k/stand/xxboot/xxboot.ldscript
--- a/sys/arch/x68k/stand/xxboot/xxboot.ldscript        Sat Jan 18 05:07:34 2020 +0000
+++ b/sys/arch/x68k/stand/xxboot/xxboot.ldscript        Sat Jan 18 05:41:48 2020 +0000
@@ -6,7 +6,7 @@
 PROVIDE (__stack = 0);
 SECTIONS
 {
-  . = 0x000f0000;
+  . = TEXTADDR;
   .text :
   {
     CREATE_OBJECT_SYMBOLS
@@ -36,7 +36,7 @@
     edata  =  .;
     _edata  =  .;
   }
-  . = 0x0f2000;
+  . = TEXTADDR + TEXTDATASIZE;
   .bss :
   {
     __bss_start = .;



Home | Main Index | Thread Index | Old Index