Avoid an infinite cycle with private linkage and -f{data|function}-sections.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 19 Feb 2014 01:28:30 +0000 (01:28 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 19 Feb 2014 01:28:30 +0000 (01:28 +0000)
commitfaaa5532749f4445dd6a02ad3be13472aaeae235
tree7d300dbe47cbbed6e51ea20d02e6042afbf7295d
parent7a8ca279cde02a44bf8c77e20eac1bd5bdbf582b
Avoid an infinite cycle with private linkage and -f{data|function}-sections.

When outputting an object we check its section to find its name, but when
looking for the section with -ffunction-section we look for the symbol name.

Break the loop by requesting a name with the private prefix when constructing
the section name. This matches the behavior before r201608.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201622 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetLowering.h
lib/CodeGen/TargetLoweringBase.cpp
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
test/CodeGen/X86/global-sections.ll