• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


コミットメタ情報

リビジョン1753ed681125949b081376dd97056a3f2930e7d7 (tree)
日時2016-07-05 18:36:08
作者Jan Beulich <jbeulich@nove...>
コミッターJan Beulich

ログメッセージ

ld: track linker-definedness of symbols

Keep "lineno" as zero while not processing any script, and use it being
zero to set the "linker_def" field to true.

変更サマリ

差分

--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
1+2016-07-05 Jan Beulich <jbeulich@suse.com>
2+
3+ * ldexp.c (exp_fold_tree_1): Set linker_def field based on
4+ assignment line number.
5+ * ldlex.l (lineno): Drop initializer.
6+ (<<EOF>>): Set lineno to zero after reaching top of stack.
7+
18 2016-07-04 H.J. Lu <hongjiu.lu@intel.com>
29
310 PR ld/20321
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -1182,7 +1182,7 @@ exp_fold_tree_1 (etree_type *tree)
11821182 h->type = bfd_link_hash_defined;
11831183 h->u.def.value = expld.result.value;
11841184 h->u.def.section = expld.result.section;
1185- h->linker_def = 0;
1185+ h->linker_def = ! tree->assign.type.lineno;
11861186 if (tree->type.node_class == etree_provide)
11871187 tree->type.node_class = etree_provided;
11881188
--- a/ld/ldlex.l
+++ b/ld/ldlex.l
@@ -39,9 +39,8 @@
3939 yylex and yyparse (indirectly) both check this. */
4040 input_type parser_input;
4141
42-/* Line number in the current input file.
43- (FIXME Actually, it doesn't appear to get reset for each file?) */
44-unsigned int lineno = 1;
42+/* Line number in the current input file. */
43+unsigned int lineno;
4544
4645 /* The string we are currently lexing, or NULL if we are reading a
4746 file. */
@@ -460,7 +459,10 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)*
460459 <<EOF>> {
461460 include_stack_ptr--;
462461 if (include_stack_ptr == 0)
463- yyterminate ();
462+ {
463+ lineno = 0;
464+ yyterminate ();
465+ }
464466 else
465467 yy_switch_to_buffer (include_stack[include_stack_ptr]);
466468