diff options
author | Ian Lance Taylor <ian@airs.com> | 1993-09-17 22:11:00 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1993-09-17 22:11:00 +0000 |
commit | 9a467cb2b52cd7a0d9a20260b5e447a9c6c811d1 (patch) | |
tree | 4fd31f34e9f7ede565e422685bf5ece6f315b049 /ld/ldsym.c | |
parent | 4f6d6db937840a32374dd40fc693875ec4589ddc (diff) | |
download | gdb-9a467cb2b52cd7a0d9a20260b5e447a9c6c811d1.zip gdb-9a467cb2b52cd7a0d9a20260b5e447a9c6c811d1.tar.gz 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/ldsym.c')
-rw-r--r-- | ld/ldsym.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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; } |