[cfe-dev] [PATCH] options -ffunction-sections and -fdata-sections

Chris Lattner 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?
>> 
>> -Chris
> 
> 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):
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20100412/099668.html

and your clang patch here:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20100412/029278.html

Can you write a testcase for the clang part?

Thanks!

-Chris



More information about the cfe-dev mailing list