ld: Set non_ir_ref_regular for --undefined SYMBOL
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 4 Jul 2018 13:27:58 +0000 (06:27 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 4 Jul 2018 13:29:13 +0000 (06:29 -0700)
commit94d401b8b88a76b1372ce44e805516756a4f737b
tree62f580d5a657896a602fad555ea6b11c7cdc48fa
parentb14b7ff14ffe911ec562004304841cf7d2775a19
ld: Set non_ir_ref_regular for --undefined SYMBOL

Set non_ir_ref_regular to TRUE for symbols forced into the output file
so that they won't be removed by garbage collection with LTO.

PR ld/23309
* ldlang.c (insert_undefined): Set non_ir_ref_regular to TRUE.
* plugin.c (is_visible_from_outside): Don't scan entry_symbol.
* testsuite/ld-plugin/pr23309.c: New file.
* testsuite/ld-plugin/pr23309.d: Likewise.
ld/ChangeLog
ld/ldlang.c
ld/plugin.c
ld/testsuite/ld-plugin/lto.exp
ld/testsuite/ld-plugin/pr23309.c [new file with mode: 0644]
ld/testsuite/ld-plugin/pr23309.d [new file with mode: 0644]
This page took 0.028426 seconds and 4 git commands to generate.