aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@cygnus>1995-10-18 21:21:38 +0000
committerKen Raeburn <raeburn@cygnus>1995-10-18 21:21:38 +0000
commitd19dcb671529004ecd8a06e38a00d9b8fb380ccd (patch)
tree64a2968b947f759397dda90e1b9d9a4b81a52c30 /bfd
parent5a2846e3ddb533ded11de37a3e17638d554b6894 (diff)
downloadgdb-d19dcb671529004ecd8a06e38a00d9b8fb380ccd.zip
gdb-d19dcb671529004ecd8a06e38a00d9b8fb380ccd.tar.gz
gdb-d19dcb671529004ecd8a06e38a00d9b8fb380ccd.tar.bz2
Use one active frag and one obstack per frag chain:
* 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.
Diffstat (limited to 'bfd')
0 files changed, 0 insertions, 0 deletions