This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Symbol Separation


Reference :

http://gcc.gnu.org/ml/gcc-patches/2003-07/msg00130.html
http://gcc.gnu.org/ml/gcc/2003-02/msg00170.html

I bootstrapped on powerpc-darwin. GCC dejagnu tests does
not reveal new regressions.

OK to commit ?
Thank you,
-Devang

[ If approved, I'll bootstrap and run dejagnu test on linux-i686
  before committing this patch]

2003-07-11 Devang Patel <dpatel@apple.com>

* cppss.c : New file.
* Makefile.in (LIBCPP_OBJS): Add cppss.o
(cppss.o): Add.
* c-common.c (cb_restore_write_symbols): New function.
(cb_clear_write_symbols): Same.
(cb_start_symbol_repository): Same.
(cb_end_symbol_repository): Same.
(cinfo_outdir): New.
(cinfo_file): New.
* c-common.h (cinfo_file): New.
* c-lex.c (init_c_lex): Init call backs for symbol separation.
* c-objc-common.c (c_common_write_context): New function.
(c_objc_common_finish_file): Write context info for symbol
separation.
* c-opts.c (OPT__output_pch_): Set make_pch.
(OPT_Winvalid_sr): New.
(c_common_parse_file): Check availablility of symbol repository
for main input file. Also initialize symbol separation.
* c.opt (Winvalid-sr): New.
* common.opt (fsave-repository): New.
* cppfiles.c (struct include_file): New member - suppress_dbg.
(open_file_pch): Find and validate .cinfo.
(stack_include_file): If valid symbol repository is found then
suppress debug info by clearing write_symbols.
(suppress_dbg_info): New function.
(cpp_check_symbol_repository): New function.
* cpphash.h (enum cpp_cinfo_state): New.
(struct cpp_reader): New member - cinfo_state.
* cpplib.c (_cpp_pop_buffer): If debug info. was suppressed for
the buffer being popped then restore original status.
* cpplib.h (struct cpp_options): New members - make_pch, use_ss
and warn_invalid_sr.
* cpppch.c (count_defs): Do not count builtins for symbol
separation.
(write_defs): Do not write builtins for symbol separation.
(cpp_valid_state): Issue appropriate warning, when -Winvalid-sr is set.
* dbxout.c (struct gcc_debug_hooks): New four hooks --
dbxout_restore_write_symbols, dbxout_clear_write_symbols,
dbxout_start_symbol_repository and dbxout_end_symbol_repository.
(dbxout_restore_write_symbols): New function.
(dbxout_clear_write_symbols): New function.
(dbxout_start_symbol_repository): New function.
(dbxout_end_symbol_repository): New function.
(dbxout_start_source_file): Add write_symbols check.
(dbxout_end_source_file): Same.
* debug.c (struct gcc_debug_hooks): Four new hooks.
(debug_nothing_charstar_long): New.
* debug.h (struct gcc_debug_hooks): For new hooks.
* flags.h (orig_write_symbols): New.
(flag_grepository): New.
(cinfo_outdier): New.
* gcc.c (pch): New.
(dbg_ss): New.
(asm_options): Check -fsave-repository.
(static_specs): Add pch and dbg_ss.
* opts.c (OPT_fsave_repository_): New.
* toplev.c (orig_write_symbols): New.
(flag_grepository): New.
(decode_g_option): Decode -grepository.


        doc
        * invoke.texi: Document -fsave-repository and -grepository

        testsuite:
        gcc.dg/ss/ss.exp: New file.
        gcc.dg/ss/README: New file.
        gcc.dg/ss/one.c: New test.
        gcc.dg/ss/one.ssh: New file.
        gcc.dg/ss/ss-cmd1.c: New test.




Attachment: cppss.c
Description: Text document

Attachment: ss.diff
Description: Binary data


Attachment: README
Description: Binary data

Attachment: ss.exp
Description: Binary data

Attachment: one.c
Description: Text document

Attachment: one.ssh
Description: Binary data

Attachment: ss-cmd1.c
Description: Text document





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]