From 8603728123aff1957f47f724033f6fbac176d873 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 20 Sep 1994 21:16:11 +0000 Subject: [PATCH] * ld.h (args_type): Add new field endian. * lexsup.c (parse_args): Handle -EB and -EL by setting command_line.endian. * ldgram.y (ifile_p1): Accept OUTPUT_FORMAT with three arguments. * ldlang.c (lang_add_output_format): Add arguments big and little. If command_line.endian is set, use it to select big or little rather than the default. Changed all callers. * ldlang.h (lang_add_output_format): Update declaration. * emulparams/elf32mipb.sh: Define BIG_OUTPUT_FORMAT and LITTLE_OUTPUT_FORMAT. * emulparams/elf32mipl.sh: Likewise. * emulparams/mipsbig.sh: Likewise. * emulparams/mipsbsd.sh: Likewise. * emulparams/mipsidt.sh: Likewise. * emulparams/mipsidtl.sh: Likewise. * emulparams/mipslit.sh: Likewise. * scripttempl/elf.sc: Define BIG_OUTPUT_FORMAT and LITTLE_OUTPUT_FORMAT if not already defined. Pass them to OUTPUT_FORMAT. * scripttempl/mips.sc: Pass BIG_OUTPUT_FORMAT and LITTLE_OUTPUT_FORMAT to OUTPUT_FORMAT. * scripttempl/mipsbsd.sc: Likewise. --- ld/ChangeLog | 28 ++++++++++++++++++++++++++++ ld/emulparams/elf32mipb.sh | 2 ++ ld/emulparams/elf32mipl.sh | 2 ++ ld/lexsup.c | 10 +++------- 4 files changed, 35 insertions(+), 7 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index 19ffb234aa4..8eebbc91995 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,8 +1,36 @@ Tue Sep 20 14:35:27 1994 Ian Lance Taylor (ian@sanguine.cygnus.com) + * ld.h (args_type): Add new field endian. + * lexsup.c (parse_args): Handle -EB and -EL by setting + command_line.endian. + * ldgram.y (ifile_p1): Accept OUTPUT_FORMAT with three arguments. + * ldlang.c (lang_add_output_format): Add arguments big and little. + If command_line.endian is set, use it to select big or little + rather than the default. Changed all callers. + * ldlang.h (lang_add_output_format): Update declaration. + * emulparams/elf32mipb.sh: Define BIG_OUTPUT_FORMAT and + LITTLE_OUTPUT_FORMAT. + * emulparams/elf32mipl.sh: Likewise. + * emulparams/mipsbig.sh: Likewise. + * emulparams/mipsbsd.sh: Likewise. + * emulparams/mipsidt.sh: Likewise. + * emulparams/mipsidtl.sh: Likewise. + * emulparams/mipslit.sh: Likewise. + * scripttempl/elf.sc: Define BIG_OUTPUT_FORMAT and + LITTLE_OUTPUT_FORMAT if not already defined. Pass them to + OUTPUT_FORMAT. + * scripttempl/mips.sc: Pass BIG_OUTPUT_FORMAT and + LITTLE_OUTPUT_FORMAT to OUTPUT_FORMAT. + * scripttempl/mipsbsd.sc: Likewise. + + * Makefile.in (ldgram.h): Make separate target from ldgram.c, + depending upon ldgram.c, so that a parallel make does not try to + build both at once. + * configure.in (mips*el-elf*): New target. * Makefile.in (ALL_EMULATIONS): Add eelf32mipb.o and eelf32mipl.o. (eelf32mipl.c): New target. + * config/mipsl-elf32.mt: New file. * emulparams/elf32mipl.sh: New file. diff --git a/ld/emulparams/elf32mipb.sh b/ld/emulparams/elf32mipb.sh index 154b9dfaabc..470497d8fc6 100644 --- a/ld/emulparams/elf32mipb.sh +++ b/ld/emulparams/elf32mipb.sh @@ -1,5 +1,7 @@ SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-bigmips" +BIG_OUTPUT_FORMAT="elf32-bigmips" +LITTLE_OUTPUT_FORMAT="elf32-littlemips" TEXT_START_ADDR=0x0400000 DATA_ADDR=0x10000000 MAXPAGESIZE=0x40000 diff --git a/ld/emulparams/elf32mipl.sh b/ld/emulparams/elf32mipl.sh index 4a710dc820c..bb91f350cce 100644 --- a/ld/emulparams/elf32mipl.sh +++ b/ld/emulparams/elf32mipl.sh @@ -1,5 +1,7 @@ SCRIPT_NAME=elf OUTPUT_FORMAT="elf32-littlemips" +BIG_OUTPUT_FORMAT="elf32-bigmips" +LITTLE_OUTPUT_FORMAT="elf32-littlemips" TEXT_START_ADDR=0x0400000 DATA_ADDR=0x10000000 MAXPAGESIZE=0x40000 diff --git a/ld/lexsup.c b/ld/lexsup.c index 21e8f12d82d..1102efd0062 100644 --- a/ld/lexsup.c +++ b/ld/lexsup.c @@ -186,14 +186,10 @@ parse_args (argc, argv) command_line.interpreter = optarg; break; case OPTION_EB: - /* FIXME: This is currently ignored. It means - ``produce a big-endian object file''. It could - be used to select an output format. */ + command_line.endian = ENDIAN_BIG; break; case OPTION_EL: - /* FIXME: This is currently ignored. It means - ``produce a little-endian object file''. It could - be used to select an output format. */ + command_line.endian = ENDIAN_LITTLE; break; case 'e': lang_add_entry (optarg, 1); @@ -257,7 +253,7 @@ parse_args (argc, argv) lang_add_output (optarg, 0); break; case OPTION_OFORMAT: - lang_add_output_format (optarg, 0); + lang_add_output_format (optarg, (char *) NULL, (char *) NULL, 0); break; case 'i': case 'r': -- 2.30.2