Cleaned up map file printing.
authorSteve Chamberlain <steve@cygnus>
Fri, 14 Jun 1991 20:16:51 +0000 (20:16 +0000)
committerSteve Chamberlain <steve@cygnus>
Fri, 14 Jun 1991 20:16:51 +0000 (20:16 +0000)
Added support for bcs linkage

Added NOLOAD, DESCT, COPY and OVERLAY keyword (though they don't do
anything yet)

ld/Makefile.in
ld/ldgldm88kbcs.c
ld/ldgldm88kbcs.script

index 6dfab10388c6655ae2af83b0f60a6b04cb5a3959..36d31be513443b773b023fa3dd1d3fbfd75d3df6 100644 (file)
@@ -8,7 +8,7 @@ srcdir = .
 
 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
@@ -68,10 +68,10 @@ LDCSOURCES=ldlang.c ldmain.c ldwrite.c ldlnk960.c ldgld.c ldgld68k.c \
        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
 
@@ -84,12 +84,14 @@ all: Makefile $(PROCESSED_SCRIPTS) $(LD_PROG)
 
 $(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)
@@ -121,8 +123,10 @@ mkscript: mkscript.c
 
 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 
@@ -153,9 +157,6 @@ stage3:     force
        - 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
index c89b38d383c5a7b74daa202af30fb59fa09494b9..f3e9d96d06263549e5af4a4589d6870e38d0988a 100755 (executable)
@@ -49,7 +49,8 @@ extern bfd *output_bfd;
 
 static void gldm88kbcs_before_parse()
 {
-
+  extern char lprefix;
+  lprefix = '@';
 }
 
 
index ae7cb85009e9cb691d5661eb42b7b30b8cba31f8..c4cb37ee1dba28ca9e2f5c21a798061c1d9a673d 100755 (executable)
@@ -1,36 +1,40 @@
+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 = .;
     }                                  
 }
 
 
+