diff options
author | Ian Lance Taylor <ian@airs.com> | 1996-08-01 17:35:49 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1996-08-01 17:35:49 +0000 |
commit | 582dd77f6571a3b9ca89d715d1522b68b2507feb (patch) | |
tree | 270378b4c50fe9c9e7c1b48dcbeb9cf7882213a7 /ld/ldlang.c | |
parent | 8efb80797cacf61ac0857cb9b149cac079356a3b (diff) | |
download | gdb-582dd77f6571a3b9ca89d715d1522b68b2507feb.zip gdb-582dd77f6571a3b9ca89d715d1522b68b2507feb.tar.gz gdb-582dd77f6571a3b9ca89d715d1522b68b2507feb.tar.bz2 |
* ld.h (check_nocrossrefs): Declare.
* ldlang.h (struct lang_nocrossref): Define.
(struct lang_nocrossrefs): Define.
(nocrossref_list): Declare.
(lang_add_nocrossref): Declare.
* ldlex.l: Recognize NOCROSSREFS keyword.
* ldgram.y (%union): Add nocrossref field.
(NOCROSSREFS): New terminal.
(ifile_p1): Recognize NOCROSSREFS.
(nocrossref_list): New nonterminal.
* ldlang.c (nocrossref_list): Define.
(lang_add_nocrossref): New function.
* ldmain.c (main): If nocrossref_list is not NULL, call
check_nocrossrefs.
(warning_callback): Free symbols if there is no place to store
them.
(notice): Call add_cref if nocrossref_list is not NULL.
* ldcref.c: Include "ldexp.h" and "ldlang.h".
(check_nocrossrefs): New function.
(check_nocrossref): New static function.
(struct check_refs_info): Define.
(check_refs, check_reloc_refs): New static functions.
* Makefile.in: Rebuild dependencies.
* ld.texinfo (Option Commands): Document NOCROSSREFS.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r-- | ld/ldlang.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c index ae844be..b7a0493 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -142,6 +142,7 @@ boolean lang_has_input_file = false; boolean had_output_filename = false; boolean lang_float_flag = false; boolean delete_output_file_on_failure = false; +struct lang_nocrossrefs *nocrossref_list; etree_type *base; /* Relocation base - or null */ @@ -3617,3 +3618,20 @@ lang_record_phdrs () u->output_section_statement.name, pl->name); } } + +/* Record a list of sections which may not be cross referenced. */ + +void +lang_add_nocrossref (l) + struct lang_nocrossref *l; +{ + struct lang_nocrossrefs *n; + + n = (struct lang_nocrossrefs *) xmalloc (sizeof *n); + n->next = nocrossref_list; + n->list = l; + nocrossref_list = n; + + /* Set notice_all so that we get informed about all symbols. */ + link_info.notice_all = true; +} |