aboutsummaryrefslogtreecommitdiff
path: root/ld/Makefile.in
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1991-10-11 23:47:05 +0000
committerPer Bothner <per@bothner.com>1991-10-11 23:47:05 +0000
commitb7e24eef35ad6cfad5ebe645144d6dd28c0ce10a (patch)
treead052dc7d604224a4b4b664a207874e1a0af855d /ld/Makefile.in
parent6b58372076941752b0333890dbf0d2096ce64f97 (diff)
downloadgdb-b7e24eef35ad6cfad5ebe645144d6dd28c0ce10a.zip
gdb-b7e24eef35ad6cfad5ebe645144d6dd28c0ce10a.tar.gz
gdb-b7e24eef35ad6cfad5ebe645144d6dd28c0ce10a.tar.bz2
* news.sc: Add alignment for data segment.
* ldtemplate: Add (yet another) script to get for -n or -N options. (These need different alignment than ZMAGIC files.) * Makefile.in: Add stuff for new foo.xn scripts. These are generated by replacing "ALIGN(0x...00)" by ".".
Diffstat (limited to 'ld/Makefile.in')
-rw-r--r--ld/Makefile.in28
1 files changed, 20 insertions, 8 deletions
diff --git a/ld/Makefile.in b/ld/Makefile.in
index d52b73c..71523b1 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -52,7 +52,7 @@ SCRIPTS = ldgld68k.sc ldgld.sc \
CFLAGS = $(INCLUDES) $(DEBUG) $(HDEFINES) $(TDEFINES) $(CDEFINES)
LINTFLAGS = $(INCLUDES) $(EXTRA_DEF)
-.SUFFIXES: .y .x .xr .xu .sc .scu .scr $(SUFFIXES)
+.SUFFIXES: .y .x .xr .xu .xn .sc .scu .scr .scn $(SUFFIXES)
# go directly to ld.new in case this ld isn't capable of
# linking native object on this host. It can be renamed on
@@ -63,6 +63,8 @@ LD_PROG = ld.new
# sed is used to transform this script into two variant forms:
# A .scr script is for linking without relocation (-r flag).
# A .scu script is like .scr, but *do* create constructors.
+# A .scu script is for linking to non-demand-paged output (-N or -n).
+# The diference is that segments should (need) not be page aligned.
# A sed pattern to translate .sc to .scu:
SED_MAKE_RELOC_WITH_CONSTRUCTORS=\
@@ -73,13 +75,19 @@ SED_MAKE_RELOC_WITH_CONSTRUCTORS=\
-e "/data/s/[.]data .*:/.data :/"
# A sed pattern to translate .scu to .scr:
SED_REMOVE_CONSTRUCTORS= -e /CONSTRUCTORS/d
+# A sed pattern to translate .sc to .scn:
+# We assume that any reasonable page size ends with 00
+# (Some things are aligned on 8-byte boundaries; ignore those.)
+SED_DONT_ALIGN= -e '/ALIGN/s/ALIGN( *0x[0-9a-fA-F]*00 *)/./'
.sc.scu:
sed $(SED_MAKE_RELOC_WITH_CONSTRUCTORS) $< >$*.scu
+.sc.scn:
+ sed $(SED_DONT_ALIGN) $< >$*.scn
.scu.scr:
sed $(SED_REMOVE_CONSTRUCTORS) < $< >$*.scr
-# Each .sc .scr or .scu script is filtered by mkscript
+# Each .sc .scr .scu or .scn script is filtered by mkscript
# into a string literal that can be included in a .c program.
.sc.x:
if [ "x"$(LIB_PATH) = "x" ]; then ./mkscript < $< >$*.x ; \
@@ -92,11 +100,15 @@ SED_REMOVE_CONSTRUCTORS= -e /CONSTRUCTORS/d
./mkscript < $< >$*.xu
.scr.xr:
./mkscript < $< >$*.xr
+.scn.xn:
+ ./mkscript < $< >$*.xn
.sc.xu:
sed $(SED_MAKE_RELOC_WITH_CONSTRUCTORS) < $< | ./mkscript >$*.xu
.sc.xr:
sed $(SED_MAKE_RELOC_WITH_CONSTRUCTORS) $(SED_REMOVE_CONSTRUCTORS) \
< $< | ./mkscript >$*.xr
+.sc.xn:
+ sed $(SED_DONT_ALIGN) < $< | ./mkscript >$*.xn
# for self hosting
BFDLIB=$(unsubdir)/../bfd$(subdir)/libbfd.a
@@ -162,12 +174,12 @@ ldm88k.c: $(srcdir)/ldtemplate
-e s/"<target>"/m88kbcs/g -e s/"<TARGET>"/M88KBCS/g <$< >$@
# The .c files for these are generated from ldtemplete.
-ldgld.o: ./mkscript ldgld.x ldgld.xr ldgld.xu
-news.o: ./mkscript news.x news.xr news.xu
-ebmon29k.o: ./mkscript ebmon29k.x ebmon29k.xr ebmon29k.xu
-ldgld68k.o: ./mkscript ldgld68k.x ldgld68k.xr ldgld68k.xu
-ldglda29k.o: ./mkscript ldglda29k.x ldglda29k.xr ldglda29k.xu
-ldm88k.o: ./mkscript ldm88k.x ldm88k.xr ldm88k.xu
+ldgld.o: ./mkscript ldgld.x ldgld.xr ldgld.xu ldgld.xn
+news.o: ./mkscript news.x news.xr news.xu news.xn
+ebmon29k.o: ./mkscript ebmon29k.x ebmon29k.xr ebmon29k.xu ebmon29k.xn
+ldgld68k.o: ./mkscript ldgld68k.x ldgld68k.xr ldgld68k.xu ldgld68k.xn
+ldglda29k.o: ./mkscript ldglda29k.x ldglda29k.xr ldglda29k.xu ldglda29k.xn
+ldm88k.o: ./mkscript ldm88k.x ldm88k.xr ldm88k.xu ldm88k.xn
# The .c files for these are (for now) specially written (not ldtemplete).
ldgld960.o: ./mkscript ldgld960.x