aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1993-09-17 22:11:00 +0000
committerIan Lance Taylor <ian@airs.com>1993-09-17 22:11:00 +0000
commit9a467cb2b52cd7a0d9a20260b5e447a9c6c811d1 (patch)
tree4fd31f34e9f7ede565e422685bf5ece6f315b049 /ld
parent4f6d6db937840a32374dd40fc693875ec4589ddc (diff)
downloadfsf-binutils-gdb-9a467cb2b52cd7a0d9a20260b5e447a9c6c811d1.zip
fsf-binutils-gdb-9a467cb2b52cd7a0d9a20260b5e447a9c6c811d1.tar.gz
fsf-binutils-gdb-9a467cb2b52cd7a0d9a20260b5e447a9c6c811d1.tar.bz2
Finish up support for i386-sysv4 (without shared libraries):
* ld.h (flag_is_weak): Define. * ldlang.c (print_symbol): Mention whether symbol is weak. (print_input_section): Print weak symbols as globals. * ldmain.c (refize): Do not zero out BSF_WEAK flag. (enter_global_ref): Do not warn if a weak symbol redefines a global symbol. Do not let a weak symbol redefine a common symbol. (enter_file_symbols): Treat weak symbols as global symbols. (subfile_wanted_p): Do not pull in an object file from a archive just to resolve an undefined weak symbol. * ldmisc.c (vfinfo): Don't needlessly malloc space after a fatal error; the error might be that malloc has run out of space. * ldsym.c (write_file_locals): Treat weak symbols as global. * configure.in (i[34]86-*-sysv4*, i[34]86-*-elf*): New targets; use i386-elf. * config/i386v4.mh: New file; set NATIVE_LIB_DIRS to /usr/ccs/lib. * config/i386-elf.mt: New file; set EMUL to elf_i386. * emulparams/elf_i386.sh: New file. * scripttempl/elf.sc: Use ${NOP} as filler (defaults to 0). * Makefile.in (NATIVE_LIB_DIRS): Define to be empty. (ALL_EMULATIONS): Add em_elf_i386.o. (GENSCRIPTS): Pass NATIVE_LIB_DIRS as sixth argument. (em_elf_i386.c): New target, like other em_*.c targets. ($(LD_PROG)): Pass $(CFLAGS) to $(CC). * genscripts.sh: Accept NATIVE_LIB_DIRS as sixth argument. If nonempty, and configured for native, add it to LIB_PATH.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog29
-rw-r--r--ld/ldsym.c9
2 files changed, 34 insertions, 4 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index cf3edc2..67dde5f 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,32 @@
+Fri Sep 17 17:52:24 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
+
+ Finish up support for i386-sysv4 (without shared libraries):
+ * ld.h (flag_is_weak): Define.
+ * ldlang.c (print_symbol): Mention whether symbol is weak.
+ (print_input_section): Print weak symbols as globals.
+ * ldmain.c (refize): Do not zero out BSF_WEAK flag.
+ (enter_global_ref): Do not warn if a weak symbol redefines a
+ global symbol. Do not let a weak symbol redefine a common symbol.
+ (enter_file_symbols): Treat weak symbols as global symbols.
+ (subfile_wanted_p): Do not pull in an object file from a archive
+ just to resolve an undefined weak symbol.
+ * ldmisc.c (vfinfo): Don't needlessly malloc space after a fatal
+ error; the error might be that malloc has run out of space.
+ * ldsym.c (write_file_locals): Treat weak symbols as global.
+ * configure.in (i[34]86-*-sysv4*, i[34]86-*-elf*): New targets;
+ use i386-elf.
+ * config/i386v4.mh: New file; set NATIVE_LIB_DIRS to /usr/ccs/lib.
+ * config/i386-elf.mt: New file; set EMUL to elf_i386.
+ * emulparams/elf_i386.sh: New file.
+ * scripttempl/elf.sc: Use ${NOP} as filler (defaults to 0).
+ * Makefile.in (NATIVE_LIB_DIRS): Define to be empty.
+ (ALL_EMULATIONS): Add em_elf_i386.o.
+ (GENSCRIPTS): Pass NATIVE_LIB_DIRS as sixth argument.
+ (em_elf_i386.c): New target, like other em_*.c targets.
+ ($(LD_PROG)): Pass $(CFLAGS) to $(CC).
+ * genscripts.sh: Accept NATIVE_LIB_DIRS as sixth argument. If
+ nonempty, and configured for native, add it to LIB_PATH.
+
Fri Sep 17 13:07:39 1993 Stan Shebs (shebs@rtl.cygnus.com)
* scripttempl/{h8300.sc,h8500.sc,i386coff.sc,m68kcoff.sc,sh.sc}:
diff --git a/ld/ldsym.c b/ld/ldsym.c
index 65c95a6..1070713 100644
--- a/ld/ldsym.c
+++ b/ld/ldsym.c
@@ -474,14 +474,15 @@ write_file_locals (output_buffer)
if (p->section == 0)
p->section = &bfd_abs_section;
- if (flag_is_global (p->flags))
+ if (flag_is_global (p->flags)
+ || flag_is_weak (p->flags))
{
- /* We are only interested in outputting
- globals at this stage in special circumstances */
+ /* If this symbol is marked as occurring now, rather than
+ at the end, output it now. This is used for COFF C_EXT
+ FCN symbols. FIXME: There must be a better way. */
if (bfd_asymbol_bfd (p) == entry->the_bfd
&& flag_is_not_at_end (p->flags))
{
- /* And this is one of them */
*(output_buffer++) = p;
p->flags |= BSF_KEEP;
}