* 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.
This commit is contained in:
Ian Lance Taylor
1994-09-20 21:16:11 +00:00
parent 237402b49b
commit 8603728123
4 changed files with 35 additions and 7 deletions

View File

@@ -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':