[cfe-dev] [PATCH] options -ffunction-sections and -fdata-sections
clattner at apple.com
Mon Apr 12 17:39:54 PDT 2010
On Apr 8, 2010, at 1:43 AM, Sylvere Teissier wrote:
> Chris Lattner a écrit :
>> On Apr 7, 2010, at 3:25 PM, Sylvere Teissier wrote:
>> Hi Sylvere,
>> I agree that they can't be happen with linkonce linkage... but this
>> should be handled in the backend, not in the frontend.
>> TargetLoweringObjectFileELF::SelectSectionForGlobal is in charge of
>> picking the section to use of a global, can you put this logic there?
> Hi Chris,
> Perhaps I don't understand correctly your remark but that's what this
> patch does: The function
> TargetLoweringObjectFileELF::SelectSectionForGlobal is modified.
> There are 2 patchs: 1 for llvm tree and 1 for clang tree.
Aha, I either wildly misread your patch or read an earlier one, sorry about that!
I applied your llvm patch here (with a few changes + testcase):
and your clang patch here:
Can you write a testcase for the clang part?
More information about the cfe-dev