aboutsummaryrefslogtreecommitdiff
path: root/ld/ldmain.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1993-12-11 22:55:55 +0000
committerIan Lance Taylor <ian@airs.com>1993-12-11 22:55:55 +0000
commitfcf276c4958f7cc906ec389f003aa2a713c98528 (patch)
tree6f9a19c2ca8cac0625898fa485a46ffeb17c6382 /ld/ldmain.c
parent2c6635a46f894fc4e3c0ea6a9023f0ae43b3451f (diff)
downloadgdb-fcf276c4958f7cc906ec389f003aa2a713c98528.zip
gdb-fcf276c4958f7cc906ec389f003aa2a713c98528.tar.gz
gdb-fcf276c4958f7cc906ec389f003aa2a713c98528.tar.bz2
Made many changes to eliminate gcc warnings. Made various
cosmetic changes, declared various things in header files, removed various extern declarations from .c files. No substantive changes.
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r--ld/ldmain.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 30baa96..8d50add 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -23,11 +23,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "config.h"
#include "ld.h"
+#include "ldsym.h"
#include "ldmain.h"
#include "ldmisc.h"
#include "ldwrite.h"
#include "ldgram.h"
-#include "ldsym.h"
+#include "ldexp.h"
#include "ldlang.h"
#include "ldemul.h"
#include "ldlex.h"
@@ -44,19 +45,13 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <string.h>
-static char *get_emulation ();
-static void set_scripts_dir ();
-
-/* IMPORTS */
-extern boolean lang_has_input_file;
-extern boolean force_make_executable;
-extern boolean relaxing;
-extern boolean had_script;
+static char *get_emulation PARAMS ((int, char **));
+static void set_scripts_dir PARAMS ((void));
/* EXPORTS */
char *default_target;
-char *output_filename = "a.out";
+const char *output_filename = "a.out";
/* Name this program was invoked by. */
char *program_name;
@@ -1214,6 +1209,17 @@ subfile_wanted_p (entry)
(bfd_asymbol_bfd (com)->usrdata))->common_section =
bfd_make_section_old_way (bfd_asymbol_bfd (com), "COMMON");
}
+
+ /* If the symbol is not in the generic
+ common section, we must make sure the
+ BFD has a section to hang it on to. */
+ if (com->section != &bfd_com_section
+ && (com->section->owner
+ != bfd_asymbol_bfd (com)))
+ bfd_make_section
+ (bfd_asymbol_bfd (com),
+ bfd_get_section_name (bfd_asymbol_bfd (com),
+ com->section));
}
}
ASSERT (p->udata == 0);