aboutsummaryrefslogtreecommitdiff
path: root/gas/config/obj-coff.c
AgeCommit message (Collapse)AuthorFilesLines
2001-11-15Update all uses of md_apply_fix to use md_apply_fix3. Make it a void function.Nick Clifton1-5/+1
2001-10-08Fix 2 xcoff line number problemsTom Rix1-1/+2
2001-09-18 * dwarf2dbg.c (dwarf2_directive_file): Avoid signed/unsigned warning.Alan Modra1-9/+10
* write.c (set_symtab): Update bfd_alloc declaration. Use a temp var to ensure bfd_alloc arg is the right type. (write_object_file): Cast args of bfd_seek. Replace bfd_write with bfd_bwrite. * config/obj-coff.c: Replace calls to bfd_write with calls to bfd_bwrite. Cast args of bfd_seek. * config/obj-elf.c (obj_elf_change_section): Avoid signed/unsigned warning. * config/tc-mn10300.c (set_arch_mach): Make param unsigned. * config/tc-tic54x.c (tic54x_mlib): Replace bfd_read call with call to bfd_bread.
2001-08-09 * symbols.c: Add missing prototypes.Alan Modra1-13/+26
* config/e-i386elf.c: Likewise. * config/e-i386coff.c: Likewise. * config/e-i386aout.c: Likewise. * config/obj-coff.c: Likewise. (def_symbol_in_progress, stack): Move definition. * config/obj-elf.c: Add missing prototypes. (obj_elf_change_section): Make static. (obj_elf_parse_section_letters): Likewise. (obj_elf_section_word): Likewise. (obj_elf_section_type): Likewise.
2001-07-11Don't merge if the storage class of the non-debug symbol is C_NULL.Nick Clifton1-1/+10
2001-06-30Treat a .ln directive outside of a function as a .appline directive.Nick Clifton1-5/+5
2001-06-10Branch hints for Pentium4 as insn modifiers, and some minor tweaksAlan Modra1-2/+2
to formatting.
2001-05-25 * config/obj-ieee.c (write_object_file): Set finalize_syms.Alan Modra1-2/+3
* config/obj-coff.c (write_object_file): Likewise. * (size_section): Remove rs_space assert as fr_symbol is no longer removed. (fill_section): Likewise.
2001-05-24Fix for gas seg fault and neg line numbersTom Rix1-0/+5
2001-05-22 * symbols.c (resolve_symbol_value): Remove "finalize" param,Alan Modra1-4/+4
instead use finalize_syms directly. Don't treat expressions specially with regard to finalize_syms. Update calls to self. (resolve_local_symbol): Update call to resolve_symbol_value. (S_GET_VALUE): Likewise. Return resolve_symbol_value if !finalize_syms. * symbols.h (resolve_symbol_value): Update prototype. * config/obj-aout.c (obj_crawl_symbol_chain): Update call to resolve_symbol_value. * config/obj-bout.c (obj_crawl_symbol_chain): Likewise. * config/obj-coff.c (do_relocs_for): Likewise. (yank_symbols): Likewise. (fixup_segment): Likewise. * config/obj-vms.c (obj_crawl_symbol_chain): Likewise. * config/tc-mips.c (md_convert_frag): Likewise. * config/tc-ppc.c (ppc_frob_symbol): Likewise. (ppc_fix_adjustable): Likewise. * dwarf2dbg.c (dwarf2dbg_estimate_size_before_relax): Likewise. (dwarf2dbg_convert_frag): Likewise. * ehopt.c (eh_frame_estimate_size_before_relax): Likewise. (eh_frame_convert_frag): Likewise. * expr.c (make_expr_symbol): Likewise. * write.c (adjust_reloc_syms): Likewise. (write_object_file): Likewise. (relax_segment): Likewise. (fixup_segment): Likewise. (finalize_syms): Init to zero, and update comment. (write_object_file): Set finalize_syms to 1 rather than 2. * doc/internals.texi (sy_value): Mention finalize_syms. (S_GET_VALUE): Remove restriction on when S_GET_VALUE can be called.
2001-04-25Check to see if the filename symbol has been initialised before extractingNick Clifton1-5/+6
its symbol index.
2001-03-30Pass finalize_syms on calls to resolve_symbol_value.Alan Modra1-4/+4
2001-03-08Fix copyright noticesNick Clifton1-1/+2
2001-02-27Set SEC_NEVER_LOAD when the 'n' flag is used.Nick Clifton1-2/+2
2001-02-11fix formattingNick Clifton1-7/+7
2000-12-28 * as.h (rs_align_test): New.Richard Henderson1-3/+9
* frags.c (NOP_OPCODE): Move default from read.c. (MAX_MEM_FOR_RS_ALIGN_CODE): New default. (frag_align_code): New. * frags.h (frag_align_code): Declare. * read.c (NOP_OPCODE): Remove. (do_align): Use frag_align_code. * write.c (NOP_OPCODE): Remove. (get_recorded_alignment): New. (cvt_frag_to_fill): Handle rs_align_test. (relax_segment): Likewise. (subsegs_finish): Align last subseg in section to the section alignment. Use frag_align_code. * write.h (get_recorded_alignment): Declare. * config/obj-coff.c (size_section): Handle rs_align_test. (fill_section, fixup_mdeps): Likewise. (write_object_file): Use frag_align_code. * config/tc-alpha.c (alpha_align): Use frag_align_code. (alpha_handle_align): New. * config/tc-alpha.h (HANDLE_ALIGN): New. (MAX_MEM_FOR_RS_ALIGN_CODE): New. * config/tc-i386.h (md_do_align): Use frag_align_code. (MAX_MEM_FOR_RS_ALIGN_CODE): New. * config/tc-ia64.c (ia64_md_do_align): Don't do code alignment. (ia64_handle_align): New. * config/tc-ia64.h (HANDLE_ALIGN): New. (MAX_MEM_FOR_RS_ALIGN_CODE): New. * config/tc-m32r.c (m32r_do_align): Remove. (m32r_handle_align): New. (fill_insn): Use frag_align_code. * config/tc-m32r.h (md_do_align): Remove. (HANDLE_ALIGN, MAX_MEM_FOR_RS_ALIGN_CODE): New. * config/tc-m88k.c, config/tc-m88k.h: Similarly. * config/tc-mips.c, config/tc-mips.h: Similarly. * config/tc-sh.c (sh_cons_align): Use rs_align_test. (sh_handle_align): Likewise. Handle rs_align_code. (sh_do_align): Remove. * config/tc-sh.h (md_do_align): Remove. (MAX_MEM_FOR_RS_ALIGN_CODE): New. * config/tc-sparc.c (sparc_cons_align): Use rs_align_test. (sparc_handle_align): Likewise. Handle rs_align_code. * config/tc-sparc.h (md_do_align): Remove. (MAX_MEM_FOR_RS_ALIGN_CODE): New.
2000-12-012000-11-30 Philip Blundell <pb@futuretv.com>Phil Blundell1-1/+1
* config/obj-coff.c (obj_coff_weak): Use S_SET_WEAK if it exists, even in non BFD_ASSEMBLER case.
2000-11-282000-11-27 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-3/+3
* config/obj-aout.h: Fix formatting. * config/obj-bout.h: Likewise. * config/obj-coff.c: Likewise. * config/obj-coff.h: Likewise. * config/obj-elf.h: Likewise. * config/obj-som.h: Likewise. * config/obj-vms.c: Likewise. * config/obj-vms.h: Likewise. * config/tc-h8300.h: Likewise. * config/tc-ns32k.h: Likewise. * config/tc-sparc.h: Likewise. * config/tc-tic54x.h: Likewise. * config/tc-z8k.h: Likewise.
2000-11-082000-11-07 H.J. Lu <hjl@gnu.org>H.J. Lu1-0/+1
* doc/as.texinfo (.symver): Updated for versioned symbol reference. * obj.h (format_ops): Add the frob_file_before_adjust field. * config/obj-aout.c (aout_format_ops): Set the frob_file_before_adjust field to 0. * config/obj-coff.c (coff_format_ops): Likewise. * config/obj-ecoff.c (ecoff_format_ops): Likewise. * config/obj-elf.c (obj_elf_symver): Allow duplicated version name. (elf_frob_file_before_adjust): New function to remove unneeded versioned symbols from the symbol table. (elf_format_ops): Set the frob_file_before_adjust field to elf_frob_file_before_adjust. * config/obj-elf.h (obj_frob_file_before_adjust): Defined if not defined. * config/obj-multi.h (obj_frob_file_before_adjust): Defined.
2000-09-122000-09-12 Kazu Hirata <kazu@hxi.com>Kazu Hirata1-96/+72
* config/obj-aout.c: Fix formatting. * config/obj-aout.h: Likewise. * config/obj-bout.c: Likewise. * config/obj-bout.h: Likewise. * config/obj-coff.c: Likewise. * config/obj-coff.h: Likewise.
2000-08-222000-08-22 H.J. Lu <hjl@gnu.org>H.J. Lu1-0/+36
* config.in (STRICTCOFF): New for strict COFF. * configure.in: Define STRICTCOFF for i386-*-msdosdjgpp*, i386-*-go32* and i386-go32-rtems*. * configure: Rebuilt. * config/obj-coff.c (obj_coff_endef): Follow the historical behavior if STRICTCOFF is not defined. * doc/internals.texi: Document STRICTCOFF.
2000-08-14Set the debug flag for storage types C_ARG, C_REGPARM, C_FIELD, C_MOS, C_MOE,Nick Clifton1-4/+1
C_MOU, and C_EOS.
2000-07-24* config/obj-coff.c (obj_frob_symbol): Don't mergeDJ Delorie1-0/+3
labels. Don't merge if the symbol isn't constant. Return immediately if a symbol is merged.
2000-07-20* config/obj-coff.c (obj_frob_symbol): revert previous change,DJ Delorie1-16/+10
it breaks linking against DLLs.
2000-07-17Don't merge labels. Don't merge if the symbol isn't constant. Don't callNick Clifton1-10/+16
S_SET_EXTERNAL if the storage class is already set.
2000-07-12 Add padding to the last section when aligning it increases its size.Nick Clifton1-2/+14
2000-07-06oops - omitted frpom previous deltaNick Clifton1-1/+1
2000-07-06Applied Mark Elbrecht <snowball3@bigfoot.com>'s patch to implementNick Clifton1-0/+7
TC_COFF_SECTION_DEFAULT_ATTRIBUTES.
2000-06-29Do not change an existing section's attributes if a flags argument isn'tNick Clifton1-12/+29
present. Warn if the new attributes don't match the section's current attributes.
2000-06-17Typo fix: Change BFD_ASSEMLER to BFD_ASSEMBLER.Nick Clifton1-1/+1
2000-05-22 * obj.h (struct format_ops): New members begin, app_file,Hans-Peter Nilsson1-1/+16
s_set_other, s_set_desc, s_get_type, s_set_type, separate_stab_sections, init_stab_section. * config/obj-multi.h: Update GPL notice to v2. (obj_begin): New. (obj_app_file): New. (S_SET_SIZE): Test s_set_size for NULL before calling. (S_SET_ALIGN): Similar for s_set_align. (S_SET_OTHER): New. (S_SET_DESC): New. (S_GET_TYPE): New. (S_SET_TYPE): New. (SEPARATE_STAB_SECTIONS): New. (INIT_STAB_SECTION): New. (EMIT_SECTION_SYMBOLS): New. (AOUT_STABS) [OBJ_MAYBE_AOUT]: Define. * config/obj-elf.h: Update GPL notice to v2. Mention that this file is included from obj-multi.h. (obj_begin): Wrap definition in ifndef. (elf_file_symbol): Constify declaration. (obj_app_file): Ditto. (SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB): Wrap in ifndef SEPARATE_STAB_SECTIONS. * config/obj-elf.c (elf_s_set_other): New. (elf_file_symbol): Constify argument. (elf_separate_stab_sections): New. (elf_init_stab_section): New. (elf_format_ops): Add new members. Remove comma at end. * config/obj-ecoff.c (ecoff_separate_stab_sections): New. (ecoff_format_ops): Add new fields. Remove comma at end. Mention inconsistency for emit_section_symbols. * config/obj-coff.h (c_dot_file_symbol): Constify declaration. * config/obj-coff.c (c_dot_file_symbol): Constify argument. (coff_separate_stab_sections): New. (coff_format_ops): Add new members. * config/obj-aout.c (obj_aout_sec_sym_ok_for_reloc): New. (obj_aout_s_set_other): New. (obj_aout_s_set_desc): New. (obj_aout_s_get_type): New. (obj_aout_s_set_type): New. (obj_aout_separate_stab_sections): New. (aout_format_ops): New members added. Use obj_aout_process_stab, not 0. Use obj_aout_sec_sym_ok_for_reloc, not 0. (obj_aout_frob_symbol): Add ATTRIBUTE_UNUSED to args as appropriate. (obj_aout_line, obj_aout_weak, obj_aout_type): Ditto.
2000-04-26 Add XCOFF64 support.Clinton Popetz1-1/+1
bfd: * Makefile.am (coff64-rs6000.lo): New rule. * Makefile.in: Regenerate. * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data, xcoff_is_local_label_name, xcoff_rtype2howto, xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p, xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap, xcoff_write_archive_contents): No longer static, and prefix with _bfd_. (NO_COFF_SYMBOLS): Define. (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in, xcoff64_swap_aux_out): New functions; handle xcoff symbol tables internally. (MINUS_ONE): New macro. (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS relocation. (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in, coff_SWAP_aux_out): Map to the new functions. * coff64-rs6000.c: New file. * libcoff.h (bfd_coff_backend_data): Add new fields _bfd_coff_force_symnames_in_strings and _bfd_coff_debug_string_prefix_length. (bfd_coff_force_symnames_in_strings, bfd_coff_debug_string_prefix_length): New macros for above fields. * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic. Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead of using coff_swap_sym_in directly. (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64. (coff_set_flags) Set magic for XCOFF64. (coff_compute_section_file_positions): Add symbol name length to string section length if bfd_coff_debug_string_prefix_length is true. (coff_write_object_contents): Don't do reloc overflow for XCOFF64. (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of using coff_swap_lineno_in directly. (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings and _bfd_coff_debug_string_prefix_length fields. * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force symbol names into strings table when bfd_coff_force_symnames_in_strings is true. * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR, SET_RELOC_VADDR): New macros. (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros. (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C code. (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64 changes within RS6000COFF_C specific code. (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC, MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO. * reloc.c (bfd_perform_relocation, bfd_install_relocation): Extend existing hack on target name. * xcofflink.c (XCOFF_XVECP): Extend existing hack on target name. * coff-tic54x.c (ticof): Keep up to date with new fields in bfd_coff_backend_data. * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define targ_selvecs to include rs6000coff64_vec for rs6000. * configure.in: Add rs6000coff64_vec case. * cpu-powerpc.c: New bfd_arch_info_type. gas: * as.c (parse_args): Allow md_parse_option to override -a listing option. * config/obj-coff.c (add_lineno): Change type of offset parameter from "int" to "bfd_vma." * config/tc-ppc.c (md_pseudo_table): Add "llong" and "machine." (ppc_mach, ppc_subseg_align, ppc_target_format): New. (ppc_change_csect): Align correctly for XCOFF64. (ppc_machine): New function, which discards "ppc_machine" line. (ppc_tc): Cons for 8 when code is 64 bit. (md_apply_fix3): Don't check operand->insert. Handle 64 bit relocations. (md_parse_option): Handle -a64 and -a32. (ppc_xcoff64): New. * config/tc-ppc.h (TARGET_MACH): Define. (TARGET_FORMAT): Move to function. (SUB_SEGMENT_ALIGN): Use ppc_subseg_align. include: * include/coff/rs6k64.h: New file. opcodes: * configure.in: Add bfd_powerpc_64_arch. * disassemble.c (disassembler): Use print_insn_big_powerpc for 64 bit code.
2000-02-222000-02-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>Ian Lance Taylor1-3/+3
* config/obj-coff.c (add_lineno): Accept non-positive lineno with warning, and bump it to 1.
2000-02-03octets vs bytes changes for GASTimothy Wall1-4/+11
2000-01-26This set of patches add support for aout emulation on the x86Alan Modra1-36/+20
assembler. ie. You will be able to do "as --em=i386aout" on an x86 linux-elf assembler to generate aout format object files, rather than using a separate assembler. The aout emulation is enabled by giving "--enable-targets=i386-linuxaout" to configure. Oh yeah, there's a couple of fixes too. Error messages shouldn't be passed to printf in the format arg just in case someone puts a `%' in the message.
1999-09-12 * write.c (write_relocs): Call SET_SECTION_RELOCS if it isIan Lance Taylor1-0/+2
defined. * config/obj-coff.h (SET_SECTION_RELOCS): Define. * doc/internals.texi (Object format backend): Document SET_SECTION_RELOCS.
1999-09-121999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1-3/+31
* config/obj-coff.c (obj_coff_ident): Add BFD_ASSEMBLER version. (obj_pseudo_table): Always handle ".ident" with obj-coff_ident.
1999-09-121999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1-0/+5
* config/obj-coff.c (coff_frob_symbol): Prohibit weak common symbols.
1999-09-121999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1-4/+15
* 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-121999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1-10/+26
* 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-121999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1-0/+55
* config/obj-coff.c (obj_coff_loc): New static function. (obj_pseudo_table): Add "loc".
1999-09-121999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1-0/+6
* config/obj-coff.c (add_lineno): Check that the line number is positive.
1999-09-121999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1-10/+32
* 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-121999-09-11 Donn Terry <donn@interix.com>Ian Lance Taylor1-4/+4
* config/obj-coff.c (obj_coff_section): Default to setting SEC_LOAD. Don't set SEC_DATA for 'w' modifier.
1999-09-07 * config/obj-coff.c: Add ATTRIBUTE_UNUSED as needed forIan Lance Taylor1-13/+13
BFD_ASSEMBLER code.
1999-09-02Enable --emulation={i386coff,i386elf} for i386 gas.Alan Modra1-10/+4
1999-08-08 * doc/as.texinfo (Section): Document 's' flag for COFF version.Ian Lance Taylor1-0/+2
1999-08-08 Mumit Khan <khan@xraylith.wisc.edu> * config/obj-coff.c (obj_coff_section): Handle 's' (shared) section flag.
1999-08-03 * config/obj-coff.c (coff_frob_symbol): Always update set_end withIan Lance Taylor1-66/+62
next_set_end even if the end symbol is being discarded. * gasp.c: Add ATTRIBUTE_UNUSED as needed for non-BFD_ASSEMBLER. * output-file.c, symbols.c, config/tc-i386.c: Likewise. * config/obj-coff.c: Likewise. (seg_info_type): Remove. (seg_info_off_by_4): Change to array of segT. (s_get_segment): Adjust accordingly. (obj_pseudo_table): Fully initialize sentinel entry.
1999-06-261999-06-26 Mumit Khan <khan@xraylith.wisc.edu>Ian Lance Taylor1-1/+1
* config/obj-coff.c (obj_coff_section): Mark writable sections as data.
1999-06-19 * config/tc-ppc.c: Update for symbol handling changes.Ian Lance Taylor1-2/+2
* config/obj-coff.c: Likewise.