diff options
author | Steve Chamberlain <steve@cygnus> | 1991-04-08 23:26:05 +0000 |
---|---|---|
committer | Steve Chamberlain <steve@cygnus> | 1991-04-08 23:26:05 +0000 |
commit | de7c1ff6139ecad81cf4ada557330ae0b3c7b5a6 (patch) | |
tree | 4821c5ee175cf0c70b0d20b6dab9276d74680a96 /ld | |
parent | ad19c0a2d1d72cbee89680aa95d94b35a2a8eb3d (diff) | |
download | gdb-de7c1ff6139ecad81cf4ada557330ae0b3c7b5a6.zip gdb-de7c1ff6139ecad81cf4ada557330ae0b3c7b5a6.tar.gz gdb-de7c1ff6139ecad81cf4ada557330ae0b3c7b5a6.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'ld')
-rwxr-xr-x | ld/Makefile | 48 | ||||
-rwxr-xr-x | ld/ld-emul.c | 2 | ||||
-rwxr-xr-x | ld/ld-lnk960.c | 18 | ||||
-rw-r--r-- | ld/ldgram.y | 13 | ||||
-rw-r--r-- | ld/ldlang.c | 47 |
5 files changed, 48 insertions, 80 deletions
diff --git a/ld/Makefile b/ld/Makefile index 51b596e..a565bbf 100755 --- a/ld/Makefile +++ b/ld/Makefile @@ -3,8 +3,8 @@ # # $Id$ # -srcdir = ../common -VPATH = ../common +srcdir=../common +VPATH=../common BASEDIR = ../.. HOSTDIR = ../$(HOST)/ INCLUDE = $(srcdir)/$(BASEDIR)/include-cygnus @@ -14,9 +14,20 @@ DEBUG = -g #__sun3__#EXTRA_DEF=-DHOST_SYS=SUN3_SYS #__sun4__#EXTRA_DEF=-DHOST_SYS=SUN4_SYS +#__dgux__#EXTRA_DEF=-DHOST_SYS=DGUX_SYS CFLAGS = $(INCLUDES) $(EXTRA_DEF) $(DEBUG) LINTFLAGS = $(INCLUDES) $(EXTRA_DEF) + +.SUFFIXES: .y + +.y.o: + yacc -tvd $< + mv y.tab.c ldgram.tab.c + $(CC) -c $(CFLAGS) ldgram.tab.c + mv ldgram.tab.o ldgram.o + + # go directly to ld.new in case this ld isn't capable of # linking native object on this host. It can be renamed on # install. @@ -25,7 +36,7 @@ PROGS = $(HOSTDIR)/ld.new # for self hosting GNUTARGET=a.out-generic-big LDEMULATION=gld -bfdlib=$(srcdir)/$(BASEDIR)/bfd/$(HOST)/libbfd.a +BFDLIB=$(srcdir)/$(BASEDIR)/bfd/$(HOST)/libbfd.a OBJS= ldgram.o ldlex.o ldlang.o ldmain.o ldwrite.o ldexp.o ld-lnk960.o ld-gld68k.o \ ld-gld.o ld-gld960.o ld-emul.o ldversion.o ldmisc.o ldsym.o ldfile.o @@ -57,32 +68,27 @@ $(BFDLIB): $(BFDSOURCES) $(PROGS): $(OBJS) $(BFDLIB) # (cd ../bfd; make) -# LDEMULATION=gld; export LDEMULATION; GNUTARGET=a.out-generic-big;./ldok -format a.out-generic-big -o ld /lib/crt0.o $(OBJS) $(bfdlib) -lc /usr/local/lib/gcc/sparc/1.91/gnulib -# gld -o ld /lib/crt0.o $(OBJS) $(bfdlib) -lc /usr/local/lib/gcc/sparc/1.91/gnulib - $(CC) -Bstatic -o ld.new $(OBJS) $(bfdlib) +# LDEMULATION=gld; export LDEMULATION; GNUTARGET=a.out-generic-big;./ldok -format a.out-generic-big -o ld /lib/crt0.o $(OBJS) $(BFDLIB) -lc /usr/local/lib/gcc/sparc/1.91/gnulib +# gld -o ld /lib/crt0.o $(OBJS) $(BFDLIB) -lc /usr/local/lib/gcc/sparc/1.91/gnulib + $(CC) -Bstatic -o ld.new $(OBJS) $(BFDLIB) ld1: ld - gcc -v -B./ -o ld1 $(OBJS) $(bfdlib) + gcc -v -B./ -o ld1 $(OBJS) $(BFDLIB) ld2: ld1 mv ld1 ld - gcc -v -B./ -o ld2 $(OBJS) $(bfdlib) + gcc -v -B./ -o ld2 $(OBJS) $(BFDLIB) ld3: ld2 mv ld2 ld - gcc -v -B./ -o ld3 $(OBJS) $(bfdlib) + gcc -v -B./ -o ld3 $(OBJS) $(BFDLIB) ld.dvi:ld.tex tex ld.tex -ldgram.o:ldgram.y - yacc -d ldgram.y - mv y.tab.c ldgram.tab.c - $(CC) -c $(CFLAGS) ldgram.tab.c - mv ldgram.tab.o ldgram.o - -ldgram.tab.h:y.tab.h +ldgram.o: ldgram.y +ldgram.tab.h:ldgram.y cp y.tab.h ldgram.tab.h ldlex.c: ldlex.l ldgram.tab.h @@ -96,11 +102,11 @@ ldlang.o: ldlang.c ldgram.tab.h ld-gld.o: ld-gld.c ld-gld68k.o: ld-gld68k.c ld-gld960.o: ld-gld960.c -ld-emul.o:ld-emul.c -ld-lnk960.o:ld-lnk960.c -ldexp.o:ldexp.c ldgram.tab.h -ldmisc.o:ldmisc.c -ldsym.o:ldsym.c +ld-emul.o: ld-emul.c +ld-lnk960.o: ld-lnk960.c +ldexp.o: ldexp.c ldgram.tab.h +ldmisc.o: ldmisc.c +ldsym.o: ldsym.c clean: - rm -f $(OBJS) $(GENERATED_SOURCES) $(GENERATED_HEADERS) diff --git a/ld/ld-emul.c b/ld/ld-emul.c index 5c20791..80f1329 100755 --- a/ld/ld-emul.c +++ b/ld/ld-emul.c @@ -119,7 +119,7 @@ char *target; ld_emulation = &ld_gld960_emulation; } else { - info("%P%F unrecognised emulation mode: %s",target); + info("%P%F unrecognised emulation mode: %s\n",target); } } diff --git a/ld/ld-lnk960.c b/ld/ld-lnk960.c index 2e012c8..0d9a1fc 100755 --- a/ld/ld-lnk960.c +++ b/ld/ld-lnk960.c @@ -20,9 +20,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ $Id$ $Log$ - Revision 1.2 1991/03/22 23:02:31 steve - Brought up to sync with Intel again. + Revision 1.3 1991/04/08 23:21:26 steve + *** empty log message *** + * Revision 1.2 1991/03/22 23:02:31 steve + * Brought up to sync with Intel again. + * * Revision 1.2 1991/03/15 18:45:55 rich * foo * @@ -199,10 +202,13 @@ lnk960_before_allocation() static void lnk960_after_allocation() { - lang_abs_symbol_at_end_of(".text","_etext"); - lang_abs_symbol_at_end_of(".data","_edata"); - lang_abs_symbol_at_beginning_of(".bss","_bss_start"); - lang_abs_symbol_at_end_of(".bss","_end"); + extern ld_config_type config; + if (config.relocateable_output == false) { + lang_abs_symbol_at_end_of(".text","_etext"); + lang_abs_symbol_at_end_of(".data","_edata"); + lang_abs_symbol_at_beginning_of(".bss","_bss_start"); + lang_abs_symbol_at_end_of(".bss","_end"); + } } static struct diff --git a/ld/ldgram.y b/ld/ldgram.y index c42a3e5..cfd549f 100644 --- a/ld/ldgram.y +++ b/ld/ldgram.y @@ -225,10 +225,10 @@ command_line_option: { force_make_executable = true; } - | OPTION_d { + | OPTION_d { command_line.force_common_definition = true; } - | OPTION_dc + | OPTION_dc { command_line.force_common_definition = true; } @@ -236,16 +236,17 @@ command_line_option: { /* Ignored */ } - | OPTION_dp + | OPTION_dp { command_line.force_common_definition = true; } - | OPTION_format NAME + | OPTION_format NAME { lang_add_target($2); } - | OPTION_Texp { hex_mode =true; } + | OPTION_Texp + { hex_mode =true; } exp { lang_section_start($1, $3); hex_mode = false; } @@ -290,9 +291,11 @@ command_line_option: | OPTION_defsym { ldgram_in_defsym = true; + hex_mode = true; } assignment { + hex_mode = false; ldgram_in_defsym = false; } diff --git a/ld/ldlang.c b/ld/ldlang.c index 173d181..ec3f5a9 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -18,53 +18,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ /* $Id$ * - * $Log$ - * Revision 1.4 1991/03/27 02:29:22 steve - * *** empty log message *** - * - * Revision 1.3 1991/03/27 00:52:49 steve - * *** empty log message *** - * - * Revision 1.2 1991/03/22 23:02:34 steve - * Brought up to sync with Intel again. - * - * Revision 1.3 1991/03/16 22:19:21 rich - * pop - * - * Revision 1.2 1991/03/15 18:52:42 rich - * pop - * - * Revision 1.1 1991/03/13 00:48:23 chrisb - * Initial revision - * - * Revision 1.8 1991/03/10 09:31:28 rich - * Modified Files: - * Makefile config.h ld-emul.c ld-emul.h ld-gld.c ld-gld960.c - * ld-lnk960.c ld.h lddigest.c ldexp.c ldexp.h ldfile.c ldfile.h - * ldgram.y ldinfo.h ldlang.c ldlang.h ldlex.h ldlex.l ldmain.c - * ldmain.h ldmisc.c ldmisc.h ldsym.c ldsym.h ldversion.c - * ldversion.h ldwarn.h ldwrite.c ldwrite.h y.tab.h - * - * As of this round of changes, ld now builds on all hosts of (Intel960) - * interest and copy passes my copy test on big endian hosts again. - * - * Revision 1.7 1991/03/09 03:31:03 sac - * After a fatal info message, the output file is deleted. - * - * Revision 1.6 1991/03/09 03:25:06 sac - * Added support for LONG, SHORT and BYTE keywords in scripts - * - * Revision 1.5 1991/03/06 21:59:31 sac - * Completed G++ support - * - * Revision 1.4 1991/03/06 02:26:02 sac - * Added support for constructor sections. - * Remove parsing ambiguity. - * Lint - * - * Revision 1.3 1991/02/22 17:15:01 sac - * Added RCS keywords and copyrights - * */ |