mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
* 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.
This commit is contained in:
parent
d17fc4c990
commit
c96386c4d8
10
ld/ChangeLog
10
ld/ChangeLog
@ -1,3 +1,13 @@
|
||||
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
|
||||
|
3
ld/ld.h
3
ld/ld.h
@ -61,6 +61,9 @@ typedef struct
|
||||
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;
|
||||
|
||||
|
@ -179,7 +179,8 @@ ld [ -o @var{output} ] @var{objfile}@dots{}
|
||||
[ -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
|
||||
|
||||
@ -597,6 +598,21 @@ preceding @samp{-L} options. Multiple @samp{-T} options accumulate.
|
||||
@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
|
||||
|
@ -889,6 +889,10 @@ ldlang_open_output (statement)
|
||||
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:
|
||||
|
@ -158,6 +158,7 @@ main (argc, argv)
|
||||
|
||||
/* 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;
|
||||
|
11
ld/lexsup.c
11
ld/lexsup.c
@ -99,11 +99,13 @@ parse_args (argc, argv)
|
||||
{"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}
|
||||
};
|
||||
@ -279,6 +281,9 @@ parse_args (argc, argv)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user