destdir = /usr/local
-version=`awk '{print substr ($$4, 2, length ($$4) - 3); }' $(srcdir)/../gcc/version.c`
+version=`$(srcdir)/../gcc$(subdir)/gcc -dumpversion`
prefix = $(destdir)
bindir = $(prefix)/bin
libdir = $(prefix)/lib
ldgldm88kbcs.c \
ldgld960.c ldemul.c ldver.c ldmisc.c ldexp.c ldsym.c ldfile.c ldvanilla.c
-GENERATED_SOURCES=ldgramtb.c ldlex.c ldgramtb.h
-GENERATED_HEADERS=ldgramtb.h
+GENERATED_SOURCES=ldgram.c ldlex.c ldgram.h
+GENERATED_HEADERS=ldgram.h
-LDSOURCES=$(LDCSOURCES) ldgram.y ldlex.l ldgramtb.h
+LDSOURCES=$(LDCSOURCES) ldgram.y ldlex.l ldgram.h
BFDSOURCES=../../bfd/common/*.c
$(PROCESSED_SCRIPTS): mkscript $(SCRIPTS)
-ldgramtb.o ldgramtb.h:ldgram.y
- $(YACC) $<
- mv y.tab.c ldgramtb.c
- mv y.tab.h ldgramtb.h
- $(CC) -c $(CFLAGS) ldgramtb.c
- mv ldgramtb.o ldgram.o
+ldgram.c:ldgram.y
+ $(YACC) $(VPATH)/ldgram.y
+ mv y.tab.c ldgram.c
+ mv y.tab.h ldgram.h
+
+ldlex.c:ldlex.l
+ lex -t $(VPATH)/ldlex.l >ldlex.c
+
#$(BFDLIB): $(BFDSOURCES)
ldgld.o: $(PROCESSED_SCRIPTS) ldgld.c
-ldlex.c: ldlex.l ldgramtb.h
-ldlex.o: ldlex.c ldgramtb.h
+ldlex.c: ldlex.l ldgram.h
+ldlex.o: ldlex.c ldgram.h
+ldgram.o: ldgram.c
+ldgram.c:ldgram.y
ldgld68k.x :ldgld68k.script
ldgld68kUr.x :ldgld68kUr.script
- mv -f $(STAGESTUFF) stage3
- (cd stage3 ; ln -s $(LD_PROG) ld)
-comparison: force
- for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
-
de-stage1: force
- (cd stage1 ; mv -f * ..)
- rm ld
+TARGET(m88kbcs)
OUTPUT_FORMAT(m88kbcs)
OUTPUT_ARCH(m88k)
+ENTRY(__start)
SEARCH_DIR(/lib)
SEARCH_DIR(/usr/lib)
SEARCH_DIR(/usr/local/lib)
-__DYNAMIC = 0;
SECTIONS
{
- .text 0x2020 BLOCK(0x2000):
- {
- CREATE_OBJECT_SYMBOLS
- *(.text)
- _etext = ALIGN( 0x2000);
+ .text 0x10000 + SIZEOF_HEADERS :
+ {
+ __.text.start = .;
+ __.init.start = .;
+ LONG(0xf400c001)
+ __.init.end = .;
+ *(.text)
+ __.tdesc_start = .;
+ *(.tdesc)
+ __.text_end = .;
+ __.initp.start = .;
+ __.initp.end =.;
+
+ _etext =.;
+ }
+ .data SIZEOF(.text) + ADDR(.text) + 0x400000:
+ {
+ *(.data)
+ _edata = .;
}
- .data ALIGN(0x2000) :
- {
- *(.data)
- ___DTOR_LIST__ = . ;
- LONG((___CTOR_LIST__ - .) / 4 -2)
- *(___DTOR_LIST__)
- LONG(0)
- ___CTOR_LIST__ = . ;
- LONG((_edata - .) / 4 -2)
- *(___CTOR_LIST__)
- LONG(0)
- _edata = .;
- }
.bss SIZEOF(.data) + ADDR(.data) :
- {
- *(.bss)
- [COMMON]
- _end = .;
+ {
+ *(.bss)
+ [COMMON]
+ _end = .;
+ ___end = .;
}
}
+