]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - ld/lexsup.c
PR24806, Linking with -T inside --start-group/--end-group
authorAlan Modra <amodra@gmail.com>
Wed, 31 Jul 2019 13:40:40 +0000 (23:10 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 1 Aug 2019 05:08:57 +0000 (14:38 +0930)
commit776ab89fe3cdce91cd644058c9fcda0c506f995b
treec9b51eed5f4873eb3ccdf0b144318e4beb722ebb
parent5c1e6d53a518442741f05175dbded0d1880f4759
PR24806, Linking with -T inside --start-group/--end-group

This patch processes INSERT AFTER and INSERT BEFORE in a user -T
script when such a script is invoked on the command line inside
--start-group/--end-group.  Also, ld now warns when the user simply
forgot --end-group.

PR 24806
* ldlang.c (process_insert_statements): Add start of list
parameter.  Use rather than lang_os_list.head.  Process insert
statements inside group statements with a recursive call.
(lang_process): Adjust process_insert_statements call.
* lexsup.c (parse_args): Warn when adding missing --end-group.
ld/ChangeLog
ld/ldlang.c
ld/lexsup.c