+Wed Jun 15 01:54:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ * ld.h (ld_config_type): Add new field traditional_format.
+ * lexsup.c (parse_args): Add traditional_format to longopts, and
+ handle it.
+ * ldmain.c (main): Initialize config.traditional_format to false.
+ * ldlang.c (ldlang_open_output): Set BFD_TRADITIONAL_FORMAT in BFD
+ flags of output_bfd according to config.traditional_format.
+ * ld.texinfo: Document -traditional-format.
+
Tue Jun 14 23:10:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* ldctor.c (ldctor_add_entry): Add entries to a set in the order
boolean magic_demand_paged;
boolean make_executable;
+ /* If true, request BFD to use the traditional format. */
+ boolean traditional_format;
+
/* If true, doing a dynamic link. */
boolean dynamic_link;
[ -r | -Ur ] [ -S ] [ -s ] [ -sort-common ] [ -stats ]
[ -T @var{commandfile} ]
[ -Ttext @var{org} ] [ -Tdata @var{org} ]
- [ -Tbss @var{org} ] [ -t ] [ -u @var{symbol}] [-V] [-v] [ -version ]
+ [ -Tbss @var{org} ] [ -t ] [ -traditional-format ]
+ [ -u @var{symbol}] [-V] [-v] [ -version ]
[ -warn-common ] [ -y @var{symbol} ] [ -X ] [-x ]
@end smallexample
@item -t
Print the names of the input files as @code{ld} processes them.
+@kindex -traditional-format
+@cindex traditional format
+@item -traditional-format
+For some targets, the output of @code{ld} is different in some ways from
+the output of some existing linker. This switch requests @code{ld} to
+use the traditional format instead.
+
+@cindex dbx
+For example, on SunOS, @code{ld} combines duplicate entries in the
+symbol string table. This can reduce the size of an output file with
+full debugging information by over 30 percent. Unfortunately, the SunOS
+@code{dbx} program can not read the resulting program (@code{gdb} has no
+trouble). The @samp{-traditional-format} switch tells @code{ld} to not
+combine duplicate entries.
+
@item -u @var{symbol}
@kindex -u @var{symbol}
@cindex undefined symbol
output_bfd->flags |= WP_TEXT;
else
output_bfd->flags &= ~WP_TEXT;
+ if (config.traditional_format)
+ output_bfd->flags |= BFD_TRADITIONAL_FORMAT;
+ else
+ output_bfd->flags &= ~BFD_TRADITIONAL_FORMAT;
break;
case lang_target_statement_enum:
/* Initialize the data about options. */
trace_files = trace_file_tries = version_printed = false;
+ config.traditional_format = false;
config.build_constructors = true;
config.dynamic_link = false;
command_line.force_common_definition = false;
{"Tdata", required_argument, NULL, OPTION_TDATA},
#define OPTION_TTEXT 167
{"Ttext", required_argument, NULL, OPTION_TTEXT},
-#define OPTION_UR 168
+#define OPTION_TRADITIONAL_FORMAT 168
+ {"traditional-format", no_argument, NULL, OPTION_TRADITIONAL_FORMAT},
+#define OPTION_UR 169
{"Ur", no_argument, NULL, OPTION_UR},
-#define OPTION_VERSION 169
+#define OPTION_VERSION 170
{"version", no_argument, NULL, OPTION_VERSION},
-#define OPTION_WARN_COMMON 170
+#define OPTION_WARN_COMMON 171
{"warn-common", no_argument, NULL, OPTION_WARN_COMMON},
{NULL, no_argument, NULL, 0}
};
case OPTION_TTEXT:
set_section_start (".text", optarg);
break;
+ case OPTION_TRADITIONAL_FORMAT:
+ config.traditional_format = true;
+ break;
case OPTION_UR:
link_info.relocateable = true;
config.build_constructors = true;