aboutsummaryrefslogtreecommitdiff
path: root/gas/subsegs.c
AgeCommit message (Collapse)AuthorFilesLines
1995-10-18Use one active frag and one obstack per frag chain:Ken Raeburn1-58/+57
* frags.c (frags): Variable deleted. (frag_alloc): New function. (frag_grow, frag_more, frag_variant, frag_now_fix, frag_append_1_char): Refer to frchain_now->frch_obstack instead of frags variable. (frag_new): Ditto. Verify that frch_last and frag_now match on entry and exit, and that old frag_now has non-zero type. Replace "know" uses with "assert". Use frag_alloc instead of mucking with obstack alignment. * frags.h (frags): Declaration deleted. * subsegs.h (struct frchain): Add new field frch_frag_now. * subsegs.c (frchains, dummy_frag, absolute_frchain): New static variables. (subsegs_begin): Initialize frchains obstack. Under gcc, don't give it any stricter alignment than frchainS structures need. Do not initialize frags obstack. Set frag_now to point to dummy_obstack. Initialize absolute_frchain. (subseg_set_rest): Save and restore frag_now in frch_frag_now field of frchainS. Don't create new frags on section switch, and use frag_alloc when creating a new frag chain. For absolute section, set frchain_now to absolute_frchain. Verify that frch_last and frag_now match on entry and exit. Initialize per-chain obstack, and under gcc, set required alignment to that needed by fragS structure. * write.c (chain_frchains_together_1): Verify fr_type is nonzero. In one test case of Mike's (i386-linux, over 300K lines of .s code with lots of stabs records), run time and memory use are reduced by about 1/3. Might introduce some problems in cases that use the frag obstacks in unusual ways. Test suite does pass for i386-linux and sparc-solaris targets though.
1995-08-08 * struc-symbol.h (struct symbol): Add sy_mri_common bit.Ian Lance Taylor1-15/+19
* read.h (mri_comon_symbol): Declare. (s_mri_common): Declare. * read.c (mri_line_label): New static variable. (mri_common_symbol): New global variable. (potable): Add "common" and "common.s". (read_a_source_file): In MRI mode, set mri_line_label for a label at the start of a line. (s_mri_common): New function. (s_space): Handle mri_common_symbol. * symbols.c (colon): Change return value from void to symbolS *, and return new symbol. If mri_common_symbol is set, attach the new symbol to it. (resolve_symbol_value): Handle an sy_mri_common symbol. * symbols.h (colon): Change return value in declaration. * subsegs.c (subseg_set_rest): Clear mri_common_symbol. (subseg_set (both versions)): Likewise. * frags.c (frag_more): Warn if mri_common_symbol is not NULL. * write.c (adjust_reloc_syms): Skip sy_mri_common symbols. (write_object_file): Discard sy_mri_common symbols. (fixup_segment): Change relocations against sy_mri_common symbols to be against the common symbol itself. * config/obj-coff.c (yank_symbols): Discard sy_mri_common symbols. (fixup_segment): Change relocations against sy_mri_common symbols to be against the common symbol itself. * config/obj-aout.c (obj_crawl_symbol_chain): Discard sy_mri_common symbols.
1994-07-14* config/obj-aout.c (obj_aout_frob_symbol): Use bfd_ind_section_ptr andKen Raeburn1-3/+3
bfd_und_section_ptr. * subsegs.c (subseg_set_rest): Compare segT values directly, without casting to int first.
1994-07-13Updated some copyrights, cleaned up some header-file comments, and:Ken Raeburn1-4/+14
* symbols.c (symbol_create): New function, most of the guts of the old symbol_new function. (symbol_new): Now just checks symbol_table_frozen, calls symbol_create, and enters the symbol into the symbol table. * subsegs.c (section_symbol): If EMIT_SECTION_SYMBOLS is not true, and the symbol table is frozen, call symbol_create instead of symbol_new. * symbols.h (symbol_create, symbol_table_frozen): Declare. * symbols.c (symbol_clear_list_pointers): Always a function now. * struc-symbol.h (symbol_clear_list_pointers): Deleted macro version. * symbols.c (debug_verify_symchain): New macro, defined to be verify_symbol_chain or a cast to void, depending on DEBUG_SYMS. (many functions): Invoke debug_verify_symchain unconditionally.
1994-06-21 * subsegs.c (abs_seg_info, und_seg_info): Define if BFD_ASSEMBLER.Ian Lance Taylor1-4/+40
(subseg_change): Store seg_info for bfd_abs_section_ptr in abs_seg_info, and store seg_info for bfd_und_section_ptr in und_seg_info. (subseg_get): Likewise. Also, don't set output_section if it is already set. (seg_info): Define as function. * subsegs.h (seg_info): Declare as function rather than defining as macro. * write.c (relax_and_size_seg): Call seg_info rather than bfd_get_section_userdata.
1994-04-13Tue Apr 12 18:25:13 1994 Stan Shebs (shebs@andros.cygnus.com)Stan Shebs1-18/+29
* subsegs.c (subsegs_begin): Call memset with args in the correct order. (subseg_get): Clear newly allocated seginfo, set its pointer slots to NULL instead of 0. Fixes a problem observed in sparc-lynx progressive.
1994-01-13 * subsegs.c (subseg_get): Accept new argument "force_new". IfJeff Law1-10/+65
set then a new segment is always created. All callers changed. (subseg_force_new): New function. Similar to subseg_new, but always force a new segment to be created.
1993-09-13 * subsegs.c: Renamed non-BFD_ASSEMBLER subseg_new to subseg_set.Ian Lance Taylor1-247/+347
Wrote non-BFD_ASSEMBLER subseg_new. Now subseg_new always takes a section name, and subseg_set always takes a segT. Changed all callers as appropriate. * config/obj-coffbfd.c (change_to_section): Renamed to obj_coff_add_segment. Corrected. Made callers use subseg_new. * config/obj-coffbfd.h (obj_segment_name, obj_add_segment): Define. Also some more gcc warning removal.
1992-06-09 * subsegs.c (subsegs_begin): create bss0_frchainP in the same wasSteve Chamberlain1-1/+6
as data0_frchainP * write.c (write_object_file): various changes to handle data in the BSS segment in much the same was as stuff in the DATA segment. * subsegs.c (subseg_change): allow and handle a change into SEG_BSS.
1992-06-09 * subsegs.c (subseg_change): allow and handle a change into SEG_BSS.Steve Chamberlain1-4/+7
1992-06-04Thu Jun 4 11:59:13 1992 Steve Chamberlain (sac@thepub.cygnus.com)Steve Chamberlain1-12/+16
* expr.c(expr): allow SEG_REGISTER in expressions. * read.c(pseudo_set): register expressions can be the source of a set. * subsegs.c (subseg_new): Now -R forces all changes to SEG_DATA to goto SEG_TEXT (if a.out) * write.c (write_object_file): If a.out don't use the old way for -R. * config/obj-a.out (s_sect): complain if the user tries to use a subsegment with a value which might interfere with out -R hackery. * config/tc-m68k.c (m68k_reg_parse): lookup names in symbol table rather than use ugly if tree. (init_regtable): insert register names into symbol table.
1992-02-21changes from Minh Tran-Le <TRANLE@INTELLICORP.COM> to support i386K. Richard Pixley1-5/+13
coff as it appears to be used on aix386.
1992-02-13force all files to end in "/* end of filename"K. Richard Pixley1-1/+1
1992-02-13White space and comments only. The devo tree prior to this delta isK. Richard Pixley1-210/+238
tagged as "vanilla" for your convenience. There are also some comment changes.
1991-04-04Initial revisionK. Richard Pixley1-0/+279