diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-04-22 21:32:58 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-04-22 21:32:58 +0000 |
commit | 6799c638e59e6861940dd4eec6c59f6466db1f69 (patch) | |
tree | 50617a4074558f081e996288cace442e9b30276d /ld/ldmain.c | |
parent | af50cd91709c17eea54401ee327ee421b8a8b985 (diff) | |
download | gdb-6799c638e59e6861940dd4eec6c59f6466db1f69.zip gdb-6799c638e59e6861940dd4eec6c59f6466db1f69.tar.gz gdb-6799c638e59e6861940dd4eec6c59f6466db1f69.tar.bz2 |
* ldlang.c (lang_size_sections): If _cooked_size is not 0, then
don't clobber it when not relaxing.
* ld.h (ld_config_type): Remove traditional_format field.
* ldmain.c (main): Use link_info.traditional_format rather than
config.traditional_format.
* ldlang.c (ldlang_open_output): Likewise.
* lexsup.c (parse_args): Likewise.
* emultempl/aix.em (gld${EMULATION_NAME}_parse_args): Likewise.
* mpw-eppcmac.c (gldppcmacos_parse_args): Likewise.
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r-- | ld/ldmain.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c index 1096368..aee02e7 100644 --- a/ld/ldmain.c +++ b/ld/ldmain.c @@ -169,7 +169,6 @@ main (argc, argv) /* Initialize the data about options. */ trace_files = trace_file_tries = version_printed = false; whole_archive = false; - config.traditional_format = false; config.build_constructors = true; config.dynamic_link = false; command_line.force_common_definition = false; @@ -181,6 +180,7 @@ main (argc, argv) link_info.shared = false; link_info.symbolic = false; link_info.static_link = false; + link_info.traditional_format = false; link_info.strip = strip_none; link_info.discard = discard_none; link_info.lprefix_len = 1; @@ -660,6 +660,17 @@ multiple_definition (info, name, obfd, osec, oval, nbfd, nsec, nval) asection *nsec; bfd_vma nval; { + /* If either section has the output_section field set to + bfd_abs_section_ptr, it means that the section is being + discarded, and this is not really a multiple definition at all. + FIXME: It would be cleaner to somehow ignore symbols defined in + sections which are being discarded. */ + if ((osec->output_section != NULL + && bfd_is_abs_section (osec->output_section)) + || (nsec->output_section != NULL + && bfd_is_abs_section (nsec->output_section))) + return true; + einfo ("%X%C: multiple definition of `%T'\n", nbfd, nsec, nval, name); if (obfd != (bfd *) NULL) |