Commit Graph

25665 Commits

Author SHA1 Message Date
Ian Lance Taylor 3994e2c66d 1999-09-12 Donn Terry <donn@interix.com>
* objcopy.c (parse_flags): Handle "noload", "debug", and "share".
	* binutils.texi, objcopy.1: Document new flags.
1999-09-12 18:33:05 +00:00
Ian Lance Taylor 3de3906459 1999-09-12 Donn Terry <donn@interix.com>
* ar.c (counted_name_mode): New static variable.
	(counted_name_counter): New static variable.
	(map_over_members): Handle counted mode.
	(usage): Mention N modifier.
	(main): Handle N modifier.
	(delete_members): Handle counted mode.
	* binutils.texi, ar.1: Document N modifier.
1999-09-12 18:14:07 +00:00
Ian Lance Taylor 946d15cab8 1999-09-12 Donn Terry <donn@interix.com>
* ar.c (print_contents): Change printing of member name for
	POSIX.2 conformance.
1999-09-12 17:47:19 +00:00
Ian Lance Taylor c8446de592 1999-09-12 Donn Terry <donn@interix.com>
* ar.c (output_filename): Make const.
	(open_inarch): If creating a new empty archive, set
	output_filename.
1999-09-12 17:43:21 +00:00
Ian Lance Taylor fe84ea5db2 * ar.c (full_pathname): New static variable.
(map_over_members): Call normalize on command line parameter.
	(usage): Mention P modifier.
	(normalize): If full_pathname is true, don't do anything.
	(main): Accept P modifier.
	* binutils.texi, ar.1: Document P modifier.
1999-09-12 17:34:19 +00:00
Ian Lance Taylor 71add73133 * pe.em: Don't include "../bfd/libbfd.h".
(gld_${EMULATION_NAME}_after_open): Use xmalloc rather than
	bfd_alloc.
1999-09-12 16:59:56 +00:00
Ian Lance Taylor 45455cddda 1999-09-12 Donn Terry <donn@interix.com>
* ld.h (ld_abort): Declare.
	(abort): Define.
	* ldmisc.c (ld_abort): Define.
1999-09-12 16:59:49 +00:00
Ian Lance Taylor be4514d38d 1999-09-12 Donn Terry <donn@interix.com>
* scripttempl/pe.sc: Use ${ENTRY} rather than _mainCRTStartup.
	Move .bss section after .rdata.  Move .reloc section after .rsrc.
1999-09-12 16:48:02 +00:00
Ian Lance Taylor c3d002bb17 Define ENTRY in PE emulation files. Also:
* emulparams/i386pe.sh (ENTRY): Define as _mainCRTStartup.
1999-09-12 16:45:16 +00:00
Ian Lance Taylor d98dd8ba26 1999-09-12 Donn Terry <donn@interix.com>
* lexsup.c (parse_args): Use strtoul for --split-by-reloc
	argument.
1999-09-12 16:40:09 +00:00
Ian Lance Taylor 03983865c3 1999-09-12 Donn Terry <donn@interix.com>
* lexsup.c (parse_args): If we get an unrecognized argument,
	mention --help.
1999-09-12 16:35:20 +00:00
Ian Lance Taylor 49147fca36 * cofflink.c (coff_link_add_symbols): Look for special MSVC string
constant symbols, and avoid multiple definition errors on them.
1999-09-12 16:28:20 +00:00
Ian Lance Taylor bb8fe706a0 1999-09-12 Donn Terry <donn@interix.com>
* ldlang.c (section_already_linked): Use comdat information if it
	is available.
1999-09-12 16:10:00 +00:00
Ian Lance Taylor 777690b647 * ld-scripts/script.exp: Add --image-base 0 for PE targets. 1999-09-12 15:59:48 +00:00
Ian Lance Taylor 1069dd8da7 * pe-dll.h: New file.
* pe-dll.c: Include "pe-dll.h".  Mark unused arguments as needed
	to avoid warnings.
	(edata_sz, reloc_sz): Change from int to size_t.
	(pe_details_type): Change type of imagebase_reloc from int to
	unsigned int.
	(pe_detail_list): Fully initialize last entry.
	(pe_dll_id_target): Change parameter to const.
	(pe_dll_generate_def_file): Likewise.
	(pe_dll_generate_implib): Likewise.
	(pe_implied_import_dll): Likewise.  Change dll_name to const.
	* emultempl/pe.em: Include "pe-dll.h".  Remove declarations now in
	pe-dll.h.
	(init): Fully initialize __dll__ entry.
	(gld_${EMULATION_NAME}_after_open): Remove unused variables
	sequence, elt, and i.
	* deffile.h: Add preprocessor guard.
	* deffilep.y (def_debug): Remove.
	* Makefile.am: Rebuild dependencies.
	(HFILES): Add pe-dll.h.
1999-09-12 15:27:48 +00:00
Ian Lance Taylor 2be9b2c7ee 1999-09-12 Donn Terry <donn@interix.com>
* emultempl/pe.em (PE_DEF_SECTION_ALIGNMENT): If
	OVERRIDE_SECTION_ALIGNMENT is defined, change to that.
	(gld_${EMULATION_NAME}_before_parse): Use EXECUTABLE_NAME if it is
	defined, rather than a.exe.
	(init): Define __subsystem__ as ${SUBSYSTEM}.
	(set_pe_subsystem): Add ${INITIAL_SYMBOL_CHAR} before entry symbol
	name.
1999-09-12 14:52:33 +00:00
Ian Lance Taylor 1b69a0bfca * ldlang.c (open_output): Change local variable desired_endian
from int to enum bfd_endian.
1999-09-12 14:50:15 +00:00
Ian Lance Taylor ff65f4f015 * emulparams/arm_epoc_pe.sh: Define SUBSYSTEM and
INITIAL_SYMBOL_CHAR.
	* emulparams/armpe.sh: Likewise.
	* emulparams/morepe.sh: Likewise.
	* emulparams/ppcpe.sh: Likewise.
	* emulparams/i386pe.sh (SUBSYSTEM): Define as PE_DEF_SUBSYSTEM.
1999-09-12 14:49:05 +00:00
Ian Lance Taylor 86b21447e7 1999-09-12 Donn Terry <donn@interix.com>
* libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most
	significant bit is set.
1999-09-12 14:27:21 +00:00
Ian Lance Taylor 61feeec2ee 1999-09-12 Donn Terry <donn@interix.com>
* gas/all/gas.exp: Run cofftag test for i*86-*-interix*.
	* lib/gas-defs.exp: Add perror if can not read .d file.
1999-09-12 05:32:04 +00:00
Ian Lance Taylor d33e1d248c 1999-09-11 Donn Terry <donn@interix.com>
* config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust
	BFD_RELOC_RVA relocations.
1999-09-12 05:09:50 +00:00
Ian Lance Taylor c0c949c786 * config/tc-i386.c (md_apply_fix3): Add horrible adjustments to
the value if TE_PE and a global defined symbol.
1999-09-12 05:06:09 +00:00
Ian Lance Taylor 18dc2407f4 1999-09-11 Donn Terry <donn@interix.com>
* config/tc-i386.c (md_undefined_symbol): Compare the name against
	the macro GLOBAL_OFFSET_TABLE_NAME, rather than assuming that it
	starts with "_G".
1999-09-12 03:50:42 +00:00
Ian Lance Taylor 945a1a6b98 * write.c (write_relocs): Call SET_SECTION_RELOCS if it is
defined.
	* config/obj-coff.h (SET_SECTION_RELOCS): Define.
	* doc/internals.texi (Object format backend): Document
	SET_SECTION_RELOCS.
1999-09-12 03:44:42 +00:00
Ian Lance Taylor 12951dca76 fix copyright 1999-09-12 03:34:29 +00:00
Ian Lance Taylor 79d292aaa2 1999-09-11 Donn Terry <donn@interix.com>
* config/tc-i386.c (tc_i386_fix_adjustable): Don't adjust
	relocations against global symbols if TE_PE.
1999-09-12 03:18:54 +00:00
Ian Lance Taylor 7a6284c477 1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (obj_coff_ident): Add BFD_ASSEMBLER version.
	(obj_pseudo_table): Always handle ".ident" with obj-coff_ident.
1999-09-12 03:07:49 +00:00
Ian Lance Taylor 8828d86202 1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (coff_frob_symbol): Prohibit weak common
	symbols.
1999-09-12 02:59:54 +00:00
Ian Lance Taylor 9690c54dda 1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (obj_coff_endef): Don't merge labels, or
	symbols which do not have a constant value, or tags with
	non-tags.  Remove the symbol from the list before adding it at the
	end.
1999-09-12 02:55:58 +00:00
Ian Lance Taylor 23dab925ad 1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Handle .ef
	C_FCN symbol differently if TE_PE.
	(obj_coff_line) [BFD_ASSEMBLER]: Always use the line number which
	appears in the pseudo-op, rather coff_line_base which is only set
	for a .bf symbol.
1999-09-12 02:49:28 +00:00
Ian Lance Taylor 28428223eb 1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (obj_coff_loc): New static function.
	(obj_pseudo_table): Add "loc".
1999-09-12 02:39:52 +00:00
Ian Lance Taylor e8a3ab752d 1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (add_lineno): Check that the line number is
	positive.
1999-09-12 02:34:00 +00:00
Ian Lance Taylor 0561a208f8 1999-09-11 Donn Terry <donn@interix.com>
* expr.c (expr): Change first parameter to int.
	* config/obj-coff.c: Add declarations for static functions.
	(coff_frob_symbol): Use SYM_AUXENT.
	* config/tc-i386.h (flag_16bit_code): Don't declare.
1999-09-12 02:27:58 +00:00
Ian Lance Taylor 0723899b7e comment change 1999-09-12 02:27:31 +00:00
Ian Lance Taylor 2ab9b79ef9 1999-09-11 Donn Terry <donn@interix.com>
* config/atof-ieee.c (atof_ieee): Change what_kind to int.
	* config/atof-vax.c (flonum_gen2vax): Change format_letter to
	int.
	(md_atof): Return NULL rather than 0.
	* config/tc-i386.c (md_atof): Change type to int.
1999-09-12 02:12:38 +00:00
Ian Lance Taylor 5881e4aab3 1999-09-11 Donn Terry <donn@interix.com>
* config/obj-coff.c (obj_coff_section): Default to setting
	SEC_LOAD.  Don't set SEC_DATA for 'w' modifier.
1999-09-12 02:08:55 +00:00
Ian Lance Taylor 2fbadf2cf5 1999-09-11 Donn Terry <donn@interix.com>
* libpei.h (_bfd_pei_final_link_postscript): Declare.
	(coff_final_link_postscript): Define.
	* peigen.c (_bfd_pei_swap_aouthdr_out): Don't set value for data
	directory entries here.
	(_bfd_pei_final_link_postscript): New function.
1999-09-12 00:45:26 +00:00
Ian Lance Taylor 8c42d01089 1999-09-11 Donn Terry <donn@interix.com>
* peigen.c (_bfd_pei_swap_scnhdr_out): Remove code which sets
	section flags based on the section name.
1999-09-12 00:32:32 +00:00
Ian Lance Taylor cb43721da5 1999-09-11 Donn Terry <donn@interix.com>
* peicode.h (coff_swap_scnhdr_in): If COFF_IMAGE_WITH_PE, the
	get the overflow of the s_nlnno field from the s_nreloc field.
	* peigen.c (_bfd_pei_swap_scnhdr_out): If doing a final link, swap
	the s_nlnno overflow of the .text section into the s_nreloc
	field.
1999-09-12 00:30:27 +00:00
Ian Lance Taylor 5933bdc9a1 1999-09-11 Donn Terry <donn@interix.com>
* peigen.c (add_data_entry): Declare.
	(pei_swap_aouthdr_out): Get image size right.  Set linker version
	more intuitively.
	(pei_swap_scnhdr_out): Test for UNINIT section, not .bss.
	(pe_print_idata): Code cleanup, print more info, get rid of (now)
	extraneous ImageBase.
	(pe_print_edata): Likewise.
	(pe_print_pdata): Likewise.  Print exception entries.
	(pe_print_reloc): Likewise.  Print MIPS_JMPADDR.
	(tbl): Make const, add "UNKNOWN".
	(_bfd_pe_print_private_bfd_data_common): Print timestamp.
	(_bfd_pe_bfd_copy_private_bfd_data_common): Don't copy deleted
	section data directory.
	(_bfd_pe_bfd_copy_private_section_data): Copy pe_flags.
1999-09-12 00:22:01 +00:00
Ian Lance Taylor 7d2b58d612 1999-09-11 Donn Terry <donn@interix.com>
* libpei.h (_bfd_pe_bfd_get_symbol_info): Declare.
	* peigen.c (_bfd_pe_bfd_get_symbol_info): New function.
	* peicode.h (coff_get_symbol_info): Define.
1999-09-12 00:02:11 +00:00
Ian Lance Taylor 0717ebb780 1999-09-11 Donn Terry <donn@interix.com>
* config.bfd (i[3456]86-*-interix*): Set targ_cflags to
	-DSTRICT_PE_FORMAT.
	* coffcode.h (styp_to_sec_flags): Check STRICT_PE_FORMAT rather
	than __INTERIX.
	(coff_classify_symbol): Re-revert 1999-08-08 patch if
	STRICT_PE_FORMAT.
1999-09-11 23:46:09 +00:00
Ian Lance Taylor 650f5dd8d8 add some comments about peigen.c 1999-09-11 23:38:11 +00:00
Ian Lance Taylor 277d1b5e45 1999-09-11 Donn Terry <donn@interix.com>
* libpei.h: New file, broken out of peicode.h.
	* peigen.c: New file, broken out of peicode.h.
	* peicode.h: A bunch of code moved out to libpei.h and peigen.c.
	* configure.in: Add peigen.lo to list of files required for each
	PE target.
	* Makefile.am: Rebuild dependencies.
	(BFD32_BACKENDS): Add peigen.lo.
	(BFD32_BACKENDS_CFILES): Add peigen.c.
	(SOURCE_HFILES): Add libpei.h.
	* configure, Makefile.in: Rebuild.
1999-09-11 23:37:28 +00:00
Ian Lance Taylor e166a60fd9 1999-09-11 Donn Terry <donn@interix.com>
* peicode.h (coff_swap_scnhdr_in): Don't check for a special
	section name of _BSS; check IMAGE_SCN_CNT_UNINITIALIZED_DATA
	instead.  Don't clear the s_paddr field for an uninitialized data
	section.
1999-09-11 22:52:20 +00:00
Ian Lance Taylor 1135238bd0 1999-09-11 Donn Terry <donn@interix.com>
* coffcode.h (coff_mkobject_hook): Set timestamp field in
	coff_data_type to f_timdat.
	* peicode.h (pe_mkobject_hook): Likewise.
1999-09-11 22:46:37 +00:00
Ian Lance Taylor 05bf877ad1 1999-09-11 Donn Terry <donn@interix.com>
* peicode.h (coff_swap_filehdr_in): Check the NT executable magic
	number if COFF_IMAGE_WITH_PE.
1999-09-11 22:41:54 +00:00
Ian Lance Taylor 4cfec37b92 1999-09-11 Donn Terry <donn@interix.com>
* coffcode.h (coff_mkobject_hook): If COFF_WITH_PE, set HAS_DEBUG
	to the reverse of IMAGE_FILE_DEBUG_STRIPPED.
	(coff_write_object_contents): Set IMAGE_FILE_DEBUG_STRIPPED if
	there is no SEC_DEBUGGING section.
	* peicode.h (pe_mkobject_hook): Set HAS_DEBUG to the reverse of
	IMAGE_FILE_DEBUG_STRIPPED.
1999-09-11 22:33:45 +00:00
Ian Lance Taylor 33d7d19757 1999-09-11 Donn Terry <donn@interix.com>
* pe-i386.c (COFF_LONG_FILENAMES): Define.
	(COFF_SECTION_ALIGNMENT_ENTRIES): Define.
	* pei-i386.c (COFF_LONG_FILENAMES): Define.
	(COFF_SECTION_ALIGNMENT_ENTRIES): Define.
1999-09-11 22:17:33 +00:00
Ian Lance Taylor 402ef9d421 1999-09-11 Donn Terry <donn@interix.com>
* coffswap.h (IMAGE_BASE): Don't define.
	* pei-arm.c (IMAGE_BASE): Don't define.
	* pei-i386.c (IMAGE_BASE): Don't define.
	* pei-mcore.c (IMAGE_BASE): Don't define.
	* pei-ppc.c (IMAGE_BASE): Don't define.
1999-09-11 22:10:33 +00:00