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
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.... 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>])
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
> 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....What would the semantic be of having section_flags but no section name?> 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 avoids the above mentioned problem, so it is probably better. Cheers, Rafael
On Fri, Apr 19, 2013 at 01:50:04PM -0700, Reed Kotler 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....Awful :)> so then > > void x(int i) __attributes__((section("mysection"), > section_flags("aw"), section_type("@progbits")) ;This too.> or maybe extend the syntax of section > > section(<name> [<section_flags>] [,<type>])Better and what I meant. Joerg