summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--Makefile.am9
-rw-r--r--i386/Makefrag.am5
-rw-r--r--i386/ldscript8
4 files changed, 22 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index d3379e8..b68945c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2007-02-19 Thomas Schwinge <tschwinge@gnu.org>
+ * Makefile.am (gnumach_LINKFLAGS): New variable.
+ (gnumach_LINK): Use that one instead of the previously used
+ `LINKFLAGS_gnumach'.
+ * i386/Makefrag.am (LINKFLAGS_gnumach): Rename to `gnumach_LINKFLAGS',
+ move into [PLATFORM_at] and pass `_START'.
+ * i386/ldscript: Don't hardcode a _start address of 0x100000, but make
+ it configurable via `_START'.
+
Add a `--enable-platform' option for future use. Allow building
without any Linux code.
* Makefile.am: Don't include `linux/Makefrag.am' in there...
diff --git a/Makefile.am b/Makefile.am
index baa5ecf..6bca83a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -94,9 +94,11 @@ nodist_libkernel_a_SOURCES =
MOSTLYCLEANFILES += \
$(nodist_libkernel_a_SOURCES)
-gnumach_o_LDADD =
-gnumach_o_LDADD += \
+gnumach_o_LDADD = \
libkernel.a
+
+gnumach_SOURCES =
+gnumach_LINKFLAGS =
# Makerules: how to do some things.
include Makerules.am
@@ -140,8 +142,7 @@ clib-routines.o: gnumach-undef gnumach-undef-bad
$(CCLD) -nostdlib -nostartfiles -r -static \
-o $@ `sed 's/^/-Wl,-u,/' < $<` -x c /dev/null -lc
-gnumach_SOURCES =
-gnumach_LINK = $(LD) $(LINKFLAGS) $(LINKFLAGS_$@) -o $@
+gnumach_LINK = $(LD) $(LINKFLAGS) $(gnumach_LINKFLAGS) -o $@
gnumach_LDADD = gnumach.o clib-routines.o
#
diff --git a/i386/Makefrag.am b/i386/Makefrag.am
index f70e63c..7d573db 100644
--- a/i386/Makefrag.am
+++ b/i386/Makefrag.am
@@ -194,8 +194,11 @@ nodist_libkernel_a_SOURCES += \
EXTRA_DIST += \
i386/ldscript
-LINKFLAGS_gnumach = \
+if PLATFORM_at
+gnumach_LINKFLAGS += \
+ --defsym _START=0x100000 \
-T '$(srcdir)'/i386/ldscript
+endif
#
# Installation.
diff --git a/i386/ldscript b/i386/ldscript
index 19a5c76..2195af3 100644
--- a/i386/ldscript
+++ b/i386/ldscript
@@ -47,10 +47,12 @@ SECTIONS
} =0x90909090
.plt : { *(.plt) }
/*
- * _start needs to be at 0x100000, so that's where .text will be begin
- * and .text.start will be first in there. See also i386/i386at/boothdr.S.
+ * There are specific requirements about entry points, so we have it
+ * configurable via `_START': `.text' will begin there and `.text.start' will
+ * be first in there. See also `i386/i386at/boothdr.S' and
+ * `LINKFLAGS_gnumach' in `i386/Makefrag.am'.
*/
- . = 0x100000;
+ . = _START;
.text :
{
*(.text.start)