[LLVMdev] funny llvm bug

Reed Kotler rkotler at mips.com
Fri Apr 19 15:33:09 PDT 2013


I think that Rafaels suggestion of adding a new mips attribute can solve 
my short term needs. It can be an llvm only string type attribute.

Long term, what about just allowing the full gas syntax for .section and 
extending the meaning of section() to be not just name but the full gas 
syntax. So that should work the same as it does for gas/gcc and will 
also work for direct object emitter.

We just have to parse that string and extract flags, type information ,etc.

?????

Reed

On 04/19/2013 02:05 PM, Eric Christopher wrote:
> On Fri, Apr 19, 2013 at 1:50 PM, Reed Kotler <rkotler at mips.com> wrote:
>> On 04/19/2013 12:43 PM, Joerg Sonnenberger wrote:
>>>
>>> On Fri, Apr 19, 2013 at 09:47:28AM -0700, reed kotler wrote:
>>>>
>>>> The clean solution is probably to add two additional function
>>>> attributes to cover these additional pieces, namely "ax" and
>>>> @progbits.
>>>
>>>
>>> Extend the section attribute to allow additional parameters?
>>>
>>> Joerg
>>>
>> The idea would be to create additional function attributes.
>> I have not spent time thinking this through yet.
>>
>> section_flags("flags")
>> section_type("type")
>> others....
>>
>
> This sounds awful.
>
>> so then
>>
>> void x(int i) __attributes__((section("mysection"), section_flags("aw"),
>> section_type("@progbits")) ;
>>
>> or maybe extend the syntax of section
>>
>> section(<name> [<section_flags>] [,<type>])
>>
>
> This not so much.
>
> -eric
>





More information about the llvm-dev mailing list