PR23648, Symbols based on MEMORY regions confuse --gc-sections
authorAlan Modra <amodra@gmail.com>
Wed, 19 Sep 2018 03:52:43 +0000 (13:22 +0930)
committerAlan Modra <amodra@gmail.com>
Wed, 19 Sep 2018 05:38:48 +0000 (15:08 +0930)
commit7f0cfc6eb8bbead5c9a1ff3a8dec11d93304f5ad
tree2d682ff49058d53ffb215f9e8f4980ae514a2c40
parentaa654ee8f830ca0d4d31bad0ff18b9e6261267fd
PR23648, Symbols based on MEMORY regions confuse --gc-sections

Running lang_do_memory_regions earlier seems a reasonable solution to
gaining better values for symbols prior to lang_gc_sections.

PR ld/23648
* ldlang.c (lang_process): Move lang_do_memory_regions earlier.
Comment on lang_do_assignments call.
* ldgram.y (origin_exp): Don't assign region->current.
ld/ChangeLog
ld/ldgram.y
ld/ldlang.c