ld: Don't define __start_SECNAME/__stop_SECNAME for -r
authorH.J. Lu <hjl.tools@gmail.com>
Tue, 13 Jun 2017 20:04:56 +0000 (13:04 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Tue, 13 Jun 2017 20:04:56 +0000 (13:04 -0700)
commitb27685f2016c510d03ac9a64f7b04ce8efcf95c4
tree7e43b79b7f20a99f4581372ebb87e42bc430f184
parent01ec7a272201de84be1ca2c557e58d97891f288c
ld: Don't define __start_SECNAME/__stop_SECNAME for -r

__start_SECNAME and __stop_SECNAME shouldn't be defined for "ld -r".

* ldlang.c (lang_set_startof): Skip if config.build_constructors
is FALSE.
* testsuite/ld-elf/sizeofc.d: New file.
* testsuite/ld-elf/startofc.d: Likewise.
ld/ChangeLog
ld/ldlang.c
ld/testsuite/ld-elf/sizeofc.d [new file with mode: 0644]
ld/testsuite/ld-elf/startofc.d [new file with mode: 0644]